An Ask Block is used to ask the user a question, where the answer will be recorded in the system and reused in the later stage of the conversation. (See Variable recalling section below)
Ask Block repeats its responses until selected variable is detected.
This answer will be categorized as a what we call variable: names, phone numbers, emails, type of insurance...etc. (See Variables)
The answers will not be overridden in the bot's memory.
- Set your variable by creating an Entity. See Entities to learn one how to create one.
Create an Regex entity type, and then proceed to fill it with variables in the NLU. After that, in the dialogue configuration of the Ask Block, choose the variable that you want to use.
- Add synonyms
- Train the entity so that the Ask block can pick up what user is going to input
When you have created an entity, and subsequently a variable in the NLU, you may want to ask the user in the conversation flow to provide this variable:
A variable will not be memorized if you ask for it in a standard Say block, regardless of whether it is a name, date, city, or phone number.
- Go back to the flow canvas, select Ask block
- Open the settings:
Every time the user inputs a variable that was previously set in the NLU, will be remembered in the conversation session.
Variable recalling is when the bot is summarizing back to the user specific variables.
For example, the user is asking for an insurance quote, so in this case we ask the memory to look up in the context “insurance”, the variable "email" and present the “value” of the email.
This will be replaced in reality with the email the user entered in the previous step. and if another variable is mentioned earlier in the convo, and this case, the insurance type, we can also bring that up in our conversational memory.
Make sure that every Say block that summarize the previously given variable from the user, is preceded by an Ask block. Otherwise the variable will not be saved in the bot's memory.
Here the memory will turn green and recognize that you want to look in the memory of the conversation
then add the name of the context, to find out in the memory of this particular context, what the amount of money was, so had amountofmoney
We are putting a condition here. if the variable is mentioned, if the user does an input, “an amount of money”, and we put less than 20. then here you have an example of confirmation summary, mix and match all these memory strings.
Updated 4 months ago