How to Store User Input in a Variable
The chat bot can take user inputs and store them in variables as well. One can use these data and perform actions such as
Record these user inputs in an excel sheet
Update the data to a third party application such as CRM
Perform data transfer through API and fetch real time data based on user interests
Follow below steps to store the user inputs in custom variables:
Drag a message card to the canvas. Select the type as text.
Type the message : “What is your name?”
Check mark Input Expected from user
MSG91 provides 3 pre-defined variables for one to use, customer_mobile, customer_name and customer_email.
Select customer_name and click on save.
In order to create a custom a variable, follow below steps:
Enter the question in the text card, such as '“ Which country do you live in?”
Check the Input Expected from User check mark.
Type user_country in the store response tab
Click on the “Create user_country” option pop-up.
Click on save.
One can also read the user inputs saved in the variables or use them for the data transfer using APIs.
Drag a message card, and type the message as : “Do you confirm you live in {{user_country}}? “. Click on Save.
This will display/ read the user inputs provided by the user and will let you save it in a variable as well.