Variables and Tags
One of the pillars of your chatbot flow with Xenioo are Variables and Tags: while building your chatbot you will use both extensively to identify your users, store and display relevant runtime data.


Variables are entities defined through a name and value pair. Each variable has a name and an assigned value. While variables are defined globally during chatbot design, they all become bound to each conversation. For example if you define the variable favorite_color in your chabot design, all conversation will have it and each conversation may have a different value assigned.
Xenioo manages both basic, direct valued variables and complex object variables. Direct valued variables are the most common as they just old simple values like favorite_color="red". Complex object variables hold an object instance and can be accessed in both raw JSON value or by property name notation. A variable defined as follows:
favorite_color = {
Can be accessed and automatically parsed both by referring to favorite_color, which will return the full JSON or by, which will just return Red.
There are no limits to the number of variables your chatbot conversation can have.

Default Variables

By default, the following variables are added to your chatbot runtime by Xenioo:
The username (or nickname) of the user, if available.
The first name of the user
The last name of the user
The locale of the user in 4 letters iso format (e.g. en-US)
The channel based user id. This value is unique to the channel
Single use throw away token. The value changes every time it is used
The name of your bot, as set in your settings.
The name of the current conversation channel (e.g. "WhatsApp" )
The last message the user has sent
The last command that was triggered by the user
The locale that Xenioo has detected by NLP or scripting in 4 letters iso format (e.g. en-US)
The last number of failed inputs
Contains true if the last input has triggered a failure. Otherwise false
Contains the current chat state according to the table below
The full date and time of the very first contact your chatbot had with the current user.
The day of the month of the very first contact your chatbot had with the current user.
The full name of the day of the week (e.g. Saturday) of the very first contact your chatbot had with the current user.
The month of the very first contact your chatbot had with the current user.
The year of the very first contact your chatbot had with the current user.

Default Tags

The following tags are created automatically by Xenioo during your chatbot runtime:
This tag is automatically added to a user if a previous conversation is not found. This tag is automatically removed when the user comes back to the chatbot after at least 30 minutes.

Chat State Values

The chat_state variable may contain the following values, depending on the current state of the chat:
The chat is in its default state. Xenioo is controlling your chatbot replies.
An operation has set the request operator flag. The chat is waiting to be taken over by an operator
The chat has been taken over by an operator and its currently managed by a human.
Please note that, depending on the channel and depending on specific user related privacy settings, some of the above variables may not be available. Additional, specific variables, may be added automatically to your chatbot runtime depending on the channel used by the user. Refer to each channel specific information for a complete list.

Privacy Variables

Privacy variables are a special type of variables that cannot be altered in any way from outside or inside the chatbot runtime.
These variables hold the selected privacy preferences of your user and only a Privacy Opt-in Action can alter these variables.


Tags are single named entities that can be attached to the conversation to later filter or switch the flow based on their presence (or the absence). If you do not need to store a value but you need to represent a simple flag, Tags are generally better.
By default, your chatbot will have the following tags:
Automatically added to the conversation on the very first contact. Subsequent conversations with the same user will no longer have this tag.

Data Persistence

Both variables and tags are uniquely stored for each of you chatbot conversation. Every change you make to a variable or tag during your chatbot runtime is scoped to only the current conversation.
Every variable and tag is persisted in the conversation and kept available for any future contact or broadcast until you, or the user, choose to forget it.