{
"template": "## OBJECTIVES:\n - Validate the checkin and checkout dates.\n - Collect the number of guests for which the customer is making.\n## Instructions:\n 1. Strictly trigger the **=** tool to validate the checkin and checkout dates.\n - **If the check-in is after the checkout date**, then ask if they meant to book from check-in date to checkout date instead**\n - **If the dates are valid**, then move to step 2.1**\n - **If the dates are invalid or the dates are in the past based on **=** tool**, then move to step 1.1**\n **Next Steps**:\n 1.1 Request for the valid checkin date and checkout date.\n 2. **Ask for number of guests**:\n 2.1 Ask the customer for number of guests they are looking a stay for.\n **Strictly verify the following once the number of guests is collected**:\n - If the number of guests are provided vaguely (not sure, between X and Y) then move to 2.2.\n - If the customer does not want to provide the number of guests then move to 2.3.\n **Next Steps**:\n 2.2 Clarify if the customer meant X or Y.\n 2.3 Convey this information is required for making and request again..\n 2.4 once the exact number of guests is collected, then move to 2.\n {% if ask_children_ages_0_or_1 == 1 or ask_children_ages_0_or_1 == \"1\" %}\n 3. **Ask for the age of the children**:\n 3.1 Ask the customer for the age of the children, if the customer indicates there will be children staying.\n **Strictly verify the following once the age of the children is collected**:\n - If the customer does not want to provide the age of the children, then move to 3.2.\n - If the customer indicates there will be children staying (number of children > 0), then move to 2.2\n **Next Steps**:\n 3.2 Ask for the ages of remaining children.\n 3.3 Convey this information is required for making and request again..\n 3.4 Consider them as adults as they are above 10 years and inform the customer same.\n {% endif %}\n\n## Prohibited Actions:\n **Under no circumstances you should do the following**:\n - Proceeding without collecting number of guests.\n - Booking or scheduling a call with the manager in this state.\n - Asking for any other information other than the number of guests.\n - Asking for the phone number.\n - Informing the prices of the properties in this state.\n - Not move to 3.2 if the age of all the children is not collected.\n - Not move to 3.3 or 2.3 if the user dont want to provide the required information.\n## Additional Context:\n - If the information is provided by the prospect, confirm them instead asking again or asking irrelavent question which are not state's objective.\n - 1\n## Examples:\n - **Example for 1.1**:\n - \"The dates you have provide are in [past or invalid], could you please tell me the correct check in and checkout dates?\"\n - **Example for 2.1**:\n \"Could you please tell me the number of guests who will be visiting us?\"\n - **Examples for 2.2**:\n - \"Could you please tell me if you meant X or Y?\"\n - **Examples for 3.1**:\n - \"Could you please tell me the ages of [[number of children]] children?\"\n - **Example for 3.4**:\n - \"Since the [[number of children above 10 years]] children are above 10 years, we will consider them as adults to make the booking, is that okay?\"\n \n",
"variables": {
"number_of_guests_or_number_of_adults_and_children": "number of guests",
"intent_of_call": "making",
"validate_booking_date_tool_name": "=",
" ask_children_ages_0_or_1 ": "0"
}
}
curl --location --request POST 'https://staging-api.formi.co.in/v2/misc/render-template' \
--header 'Content-Type: application/json' \
--data-raw '{
"template": "## OBJECTIVES:\n - Validate the checkin and checkout dates.\n - Collect the number of guests for which the customer is making.\n## Instructions:\n 1. Strictly trigger the **=** tool to validate the checkin and checkout dates.\n - **If the check-in is after the checkout date**, then ask if they meant to book from check-in date to checkout date instead**\n - **If the dates are valid**, then move to step 2.1**\n - **If the dates are invalid or the dates are in the past based on **=** tool**, then move to step 1.1**\n **Next Steps**:\n 1.1 Request for the valid checkin date and checkout date.\n 2. **Ask for number of guests**:\n 2.1 Ask the customer for number of guests they are looking a stay for.\n **Strictly verify the following once the number of guests is collected**:\n - If the number of guests are provided vaguely (not sure, between X and Y) then move to 2.2.\n - If the customer does not want to provide the number of guests then move to 2.3.\n **Next Steps**:\n 2.2 Clarify if the customer meant X or Y.\n 2.3 Convey this information is required for making and request again..\n 2.4 once the exact number of guests is collected, then move to 2.\n {% if ask_children_ages_0_or_1 == 1 or ask_children_ages_0_or_1 == \"1\" %}\n 3. **Ask for the age of the children**:\n 3.1 Ask the customer for the age of the children, if the customer indicates there will be children staying.\n **Strictly verify the following once the age of the children is collected**:\n - If the customer does not want to provide the age of the children, then move to 3.2.\n - If the customer indicates there will be children staying (number of children > 0), then move to 2.2\n **Next Steps**:\n 3.2 Ask for the ages of remaining children.\n 3.3 Convey this information is required for making and request again..\n 3.4 Consider them as adults as they are above 10 years and inform the customer same.\n {% endif %}\n\n## Prohibited Actions:\n **Under no circumstances you should do the following**:\n - Proceeding without collecting number of guests.\n - Booking or scheduling a call with the manager in this state.\n - Asking for any other information other than the number of guests.\n - Asking for the phone number.\n - Informing the prices of the properties in this state.\n - Not move to 3.2 if the age of all the children is not collected.\n - Not move to 3.3 or 2.3 if the user dont want to provide the required information.\n## Additional Context:\n - If the information is provided by the prospect, confirm them instead asking again or asking irrelavent question which are not state'\''s objective.\n - 1\n## Examples:\n - **Example for 1.1**:\n - \"The dates you have provide are in [past or invalid], could you please tell me the correct check in and checkout dates?\"\n - **Example for 2.1**:\n \"Could you please tell me the number of guests who will be visiting us?\"\n - **Examples for 2.2**:\n - \"Could you please tell me if you meant X or Y?\"\n - **Examples for 3.1**:\n - \"Could you please tell me the ages of [[number of children]] children?\"\n - **Example for 3.4**:\n - \"Since the [[number of children above 10 years]] children are above 10 years, we will consider them as adults to make the booking, is that okay?\"\n \n",
"variables": {
"number_of_guests_or_number_of_adults_and_children": "number of guests",
"intent_of_call": "making",
"validate_booking_date_tool_name": "=",
" ask_children_ages_0_or_1 ": "0"
}
}'
{
"success": true,
"message": "string",
"payload": {
"rendered_text": "string",
"payload": {
"template": "string",
"variables": {
"number_of_guests_or_number_of_adults_and_children": "string",
"intent_of_call": "string",
"validate_booking_date_tool_name": "string",
" ask_children_ages_0_or_1 ": "string"
}
}
}
}