How to create variables?
On this page, you will find information on how to create variables on the Botmaker platform.
Estimated Reading Time: 08 minutes
A variable is a symbolic name used to store a value. For example, in the variable ${name}, the values can be: “Gabriel,” “Julio,” “Fernando”, etc.
Variables are used to:
Manage the conversation flow; - Save user information; - Create conditioned rules; - Generate reports.
Some variables are provided by default in the platform, and their values can be set automatically or not. You can find out what are the default variables by visiting the “standard variables” tab.
New variables can also be created manually. To learn how to do it, watch the video or follow the tutorial below:
- Step 1 - Access the “intents” menu (Menu>Intents)
-
Step 2 – Click on “New topic” and then on “+” (New intent)
Nota: si ya tienes un hilo creado, simplemente haz clic en “+” (nueva intención)
-
Step 3 - Select the “Answers” tab and then click “Action” > ”Question.”
- Paso 4 - Select the tab “Answers will be saved in”; you can put the name of the variable you want to create and click on “enter” or choose a variable already available.
When the variable is being created, the following screen will appear:
Once the variable is done, the display will change to:
The variable you have created is now available to use.
If you have any questions about whether your variable was created, go to Menu> Settings> Variables.
This screen lists of all variables and labels on the platform
TIP: The variables are usually used for:
- Manage the flow of a conversation;
- Save user data;
- Create rules with conditions;
- Generate reports;
- Delete a variable.
Where to use variables
Variables are instrumental in defining when to activate a rule, define responses in a given context, or filter reports.
Variables used to condition intent triggers:
When applying a condition to activate a trigger, the intent will only be activated when the condition is executed, and the trigger is valid.
####Variables used to condition responses
These variables can be used to give different responses under different circumstances.
Variables as a dynamic text within a response:
The information stored in variables can be used to provide personalized answers to users. This specific content can be used to replace the variable.
Be sure to read the article: Main Variables