What is a variable?

A variable is a textual symbol – in the form such as this {{Variable}} – which associates a value with a symbol. This value can be either a text or a number (such as an address, a vehicle model, a phone number, or a quantity). 

This value is dynamic. It can therefore change as many times as desired, depending on the use of your bot. 

Furthermore, each variable is unique to each user of your bot. Two different users can use variables with the same symbol - {{the choice}} – but their content will differ because they have neither the same car, nor the same phone number, etc.

More information about variables

Variables have no lifespan... These are safely kept into BOTNATION’s databases... as long as your chatbot is active on the platform. You will encounter absolutely no limitation in use nor in number!

For instance, a user consulting your bot approximately once a month, will always be granted full access to its variables.

System variables

As soon as a user starts a conversation with the bot, the system retrieves the information (eventually made available by the user): it stocks these into the value of variables. For instance: 

• The user’s last name {{LASTNAME}}
• The user’s first name {{FIRSTNAME}}
• The user’s gender {{GENDER}}
• The user’s preferred language {{LANGUAGE}}
• URL of last docuement uploaded by the user  {{BN_URL_UPLOAD}}
• Last conversation (entry) from the user {{BN_USER_INPUT}}

• And so on...

Depending on the communication medium or the information shared by a user, these specific bits and pieces of information may not become necessarily available.

You should keep in mind that system variables are not modifiable by the bot: these are only searchable.

Dynamic variables

Unlike the previous type of variables described above, in BOTNATION, you gain full control over dynamic variables. In addition to the possibility of creating and consulting dynamic variables, you may also modify them. 

You can easily create dynamic variables by using the "User Input" element. Let’s take a simple glance at how dynamic variables work!

For example, let’s create the chatbot of a car mechanic which will need to ask its users the make and model of his/her vehicle. 

This specific bot will require a variable named {{vehicle mark}}: the brand of the car will be entered by the user. The same operation will be repeated for the model of the vehicle, in this case {{vehicle model}}. 

To retrieve the information, it will simply be necessary to consult the value of the variable, whose name in this instance is {{vehicle mark}}.

You will soon discover how just much dynamic variables come in really handy in marketing strategies! This data can be used to display promotions, only dedicated to car owners of a specific brand (like "Renault").

By automatically incrementing a {{passage}} variable every time you start a conversation, you can also display a message or promotion dedicated to the most active users of your bot. 

There are several elements which can affect dynamic variables, such as:

• User input
• Condition
• Affect
• Increment
• Decrease
• Random
• Calculation

Import and export variables

Finally, the BOTNATION' system allows to import or export variables collected in an external CRM (like Salesforce, your own database or a simple Google Sheet). All you have to do is use the "Webhook" element.

A command placed on your chatbot can automatically, in real time, reassemble in your management system.

Recommended reading: 

Back to Online Help 

Did this answer your question?