Analytics drives the world, especially in the field of marketing. You want actionable data that you can chew through and with that in mind, the Verloop.io team has given you the ability to create and track ‘variables’.
Variables are used to capture and save useful information during a conversation. You can use these variables in any recipe to store user responses and other state-related information. Finally, you can also export these details once the conversation is finished. This means this feature act as a saviour whenever any data point during the conversation needs to be recorded.
The flexibility of this usage makes it one of the most useable features.
There are two types of variables:
a) System: These are by default system-generated variables. Any default recipe already has these attached.
b) User: These are the variables, created by the user.
With every block you create, your bot has the ability to save the user’s answer as a variable. Creating a new variable is easy.
How to create new variables?
1. Navigate to Settings > Chat > Variables
2. Click on Create new variable in the top right corner
3. Give your variable a name and choose the type of content you want to get stored. You can select from one of the following
c. Positive Integer
4. After you’ve added all the details, click on the Save button. Your variable will be added to the list.
How to use a variable in blocks?
1. Navigate to Bot Recipes > open a recipe > go to a Question block>settings
2. Navigate to advanced settings
3. You can use the variable listed in the “Store user response to a variable” and add the response to the variable in the “Message to be sent when user response is invalid,”
Creating variables while building a recipe
Now you can create recipe variables on the go when building the recipe itself.
While you are working on any button, you can create custom variables on the go. Let’s see how.
1. Click on the New button
The button configures option will pop up as shown above.
2. Click on the variable
3. Click on drop-down button, where the name of the variable is written. Scroll down to the list of variables available, the last option will be “Add New”, as shown below.
4. Create a new variable pop-up screen that will be shown to you, as shown below.
Add the variable name, and select the field type in the variable name field type section, respectively.
Then click on the “save variable” button.
How to change the language of the recipe using the sys_language variable?
To change to a different language, when your users choose the language option, you first need to add the language at the start of creating a recipe.
You can do that by clicking on the “Language button” in the top right corner
Then click on the “Create New” button in the drop down. The pop-up for adding the language name will be shown to you. Add the new language name. Then click on the “Add Language” button to save the changes.
Once you have done this, come back to the recipe block, where you want to give options to customers for choosing their preferred language flow.
Click on the New button, to open its configure options
Click on variables.
Click on the drop-down for selecting the variable.
Click on the sys_language variable.
The language you added earlier will start reflecting in the Variable value section, select the language you want to reflect for that button and that’s it you are done.