The platform distinguishes between two types of variables: “Global” and “Session“.
- The variables “Session“, allow to store the standard data of users: name, surname, telephone, email, image, an id…
- We use “Global” variables to create new fields that add value to our bot.
Imagine that the bot is asking the client if he likes white or blue better. We can store the user’s answer in a global variable, which we’ll call “preferred_color“.
To store a variable you must first create two interactions. When creating the connection between the two, it must be conditioned and then you will have to select the option “Store in global or session variable” and give it a name that should not contain spaces.
Here’s an example:
The stored variable, besides showing it in the “Report” generated by the bot to be able to analyze the data, we can show it within an interaction calling it in the following way:
- Global variables: we will call them in the following way:
- Session variables: we will call them in the following way (the background, when we create it will be blue):
If you want to see how they work I recommend you visit the video: “How do the Global and Session variables work?”