‘Ask a Question’ function allows Assistant to present a question to the end-user and wait for the input to proceed further. You can either ask a ‘simple question’ or an ‘options question’.
Also ‘context variables’ are used to store the user input or data, which can be used later in a conversation. This answer will be saved as a ‘variable’; and you can call the stored ‘value’ in variables in various places whilst building the Assistant.
Note: Dialog execution will stop at the ‘Ask a Question’ node if no other node is present after it. That is, if you’ve created sub-dialogs, those sub-dialogs won’t get executed after a ‘Ask a Question’ node.
The following are the steps to frame a question for the Assistant to ask the user and save the user’s answer.
1. Click on the + sign next to a node and click on Ask a Question function.
2. Type in the question you’d like the Assistant to ask the user under the Question field and give a name for the variable to store the user’s answer under Save the answer as.
3. Use the “Save the answer as:” field to specify a name for the context variable used to store the user’s answer and then click on Save. You can even use the Options Question option for the same example by specifying ready-made clickable options for the user.
Note: You’ll be able to use the data stored in context variables during the execution of the previous nodes/dialogs/sub-dialogs in the new nodes/dialogs/sub-dialogs that you create.