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 4 pre-defined variables for one to use, customer_mobile, customer_name, customer_email and Catalog.

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” or the variable name in the store response tab
Click on the “Create user_country” option pop-up.

Choose the variable type as custom or global
Custom Variable : Variables created in one flow are isolated and couldn’t be accessed in other flows.
Global Variable : Variables can now be defined globally and can be referenced with their values in any part of the bot.
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.