Xenioo Official Docs
  • Welcome!
  • Product Overview
    • Definitions
    • Building & Sending
    • All Integrations
    • Mobile App
    • Artificial Intelligence
    • Reporting Dashboard
    • Professional Service & Support
    • Privacy & Security
    • GDPR
  • Basic Concepts
    • Your Account
      • The Trial plan
      • Upgrading your trial
      • Additional Packages
      • Canceling your current plan
      • Deleting your account
      • Messages Count
      • Data Retention
      • Multi-factor Authentication (MFA)
        • MFA Configuration
        • MFA Login
      • Multiple Owners
    • Designing your Chatbot
      • My Bots
      • Introduction
      • Flow Design
      • Behaviors
      • Interactions
      • Actions and Operations
    • Chatbot Details
      • Chatbot Settings
        • General Settings
        • Localization Settings
        • Conversation Settings
        • Integration Settings
        • Payment Integration Settings
        • Developers Setting
      • Teams
        • Team Permissions
        • Team Message Templates
        • Availability Calendars
        • Takeover Default Message
        • Team Member Access
      • Backup & Restore
      • Master and Child Bot
    • Publishing
      • Live & Draft Chatbots
      • Publish Your Bot
      • Channels
        • Web
          • Web Variables
          • WordPress
          • Widget Customization
            • Initialization
            • Scripting
        • WhatsApp
          • WhatsApp Variables
          • First Message Processing
          • Opt-in QR code generation
        • RCS
          • RCS Variables
          • Configuring Providers
            • LINK Mobility
          • Opt-in QR code generation
        • Google Business Messages (Deprecated)
          • Google Business Messages Variables
        • SMS
          • SMS Variables
          • Configuring Providers
            • LINK Mobility
        • Facebook
          • Facebook Ads Integration
          • Feed Integration
          • Messenger Referral
          • Facebook Variables
          • Moving users from an existing bot to Xenioo
        • Instagram
          • Instagram Variables
        • Telegram
          • Telegram Deep Linking
          • Telegram Variables
        • Slack
          • Configuring Slack
          • Slack Variables
        • Microsoft Teams
          • Microsoft Teams Variables
        • Discord
          • Discord Variables
        • Alexa
          • Troubleshooting
          • Alexa Variables
        • Phone
          • Phone Variables
          • Configuring Providers
            • Voximplant
        • Genesys
          • Genesys Variables
        • Viber
          • Viber Variables
        • Custom
          • REST Reference Guide
          • API Variables
  • Artificial Intelligence
    • NLP
      • Intents
      • Expressions
      • Entities
        • Creating Manually
        • Entity Types
        • Synonims
      • Training & Testing your Model
        • Using the NLP Parse Logs
        • Importing Intents From File
      • NLP Master
    • Large Language Models
      • Settings
      • Guidelines
      • Resources
      • Functions
      • Train & Test
  • Database
    • Xenioo Database
    • Collections
      • Import And Export Collections Data
    • Database API Interface
      • Url Filtering Syntax
      • Read Record
      • Save To Collection
      • Delete From Collection
      • Query Collection
        • Open Query
        • Read Records
      • CSV Direct Data
  • Broadcasts
    • Broadcasts
      • Settings
        • On Demand
          • HubSpot
        • On Date And Time
        • On Time
        • On Trigger
        • On Interval
        • On Conversation State Changed
    • Broadcast Widget Page
    • Campaigns
    • Distribution Lists
    • Audiences
    • Distribution Logs
  • Conversations
    • Conversations
    • My Conversations
    • Contacts
    • Chat Commands
    • Contact Details
  • Analytics
    • Dashboards
    • Goals
    • Audit Logs
    • Widgets
      • List of Widgets
  • Actions And Operations
    • Execution
      • Execution Diagram
    • Actions Availability
    • Variables and Tags
    • Dynamic Parsing And Content
    • Content
      • Text Action
      • Random Text Action
      • Quick Reply Action
      • Database Quick Reply Buttons Action
      • Quick Reply Array Action
      • Chat Delay Action
      • Phone Quick Reply Action
      • Email Quick Reply Action
      • Location Quick Reply Action
      • Display Location
      • Image Action
      • QR Code Action
      • Video Action
      • Audio Action
      • File Action
      • Url Action
      • NLP Topics Summary Action
      • Highly Structured Message
      • Custom Class
      • Comment Action
    • Input
      • Voice Recognition Action
      • Global Detection
        • Text Parse Action
        • NLP Processing Action
        • Dialogflow Detection Action
        • IBM Watson Assistant Intent Detection Action
        • OpenAI Assistant Detection
        • AI Detection
      • Generic Input Action
      • NLP Input Action
      • Number Input Action
      • Email Input Action
      • Phone Number Action
      • Media Attachment Action
      • Voice Input Action
      • Global Detection Action
      • OpenAI
        • OpenAI Assistant Input
        • OpenAI Assistant Detection
      • Dialogflow
        • Dialogflow Input Action
        • Dialogflow Detection Action
      • IBM Watson Assistant
        • IBM Watson Assistant Input Action
        • IBM Watson Assistant Detection Action
      • Large Language Models
        • AI Detection
        • AI Input
    • Flow
      • Agent State Check
      • Calendar Check
      • Channel Check
      • Conversation Bookmark Action
      • Create Conversation URL Action
      • Flow Control Action
      • Go To Action
      • Goal
      • Include Interaction Action
      • Log Message
      • Random Split Action
      • Reset Conversation Action
      • Set Chat Operator State Action
      • Schedule Behaviour Action
      • Tag Switch Action
      • Variable Switch Action
      • Set Context Action
      • Control Conversation Transfer Action
        • Forward Variable Value Action
    • Forms
      • Form Container
      • Fields
        • Text Box
        • Password
        • Text Area
        • Dropdown
        • Checkbox
        • Number
        • Date Picker
        • Time Picker
        • Calendar
        • File Upload
      • Layout
        • Image
        • Literal
        • Divider
        • Html Content
        • Custom CSS
    • Database
      • Load Single Record
      • Delete Records
      • Save Record
      • Save Raw Model
      • Query Collection Data
      • Move To Next Record
      • Set Field Filter Value
      • Order By Field
      • Set Field Value
      • Database Function
    • Cards
      • Carousel Template Action
      • List Card Template Action
      • Buttons Card Template Action
      • Card Container Action
      • Interactive Message Action
      • One-Time Notification Request Action
      • Database Carousel Action
      • Dynamic Carousel Action
      • Card And Menu Buttons
        • Postback Button Action
        • URL Button Action
        • Call Phone Button
        • Share Button Action
        • Nested Button Action
        • Interactive Button
    • Profile
      • Set Variable Action
      • Delete Variable Action
      • Set Tag Action
      • Delete Tag Action
      • Set Campaign Subscription Action
    • Privacy
      • Forget User
      • Privacy Opt-In
      • Privacy Flag Condition
    • IoT
      • Control Device State
      • Device State Switch
    • Integration
      • Call API Service Action
      • Execute Cloud Script Action
        • Base Conversation object methods
        • Firebase Connection methods
        • Xenioo Database Collection Methods
      • Execute Client Script Action
      • Send SMS Message
      • LINK Mobility Payment API Action
      • Marketing Platform Action
      • Dynamic Content Action
      • Post To Facebook Action
      • Firebase Database Action
      • ActiveCampaign Action
      • Zapier Webhook Action
      • Microsoft Teams Webhook Action
      • MailChimp Contact Action
      • Marketing Platform Action
      • Wordpress Search Action
      • RSS & Podcast Feed Action
      • SendGrid Mail Action
      • Send Mail Action
      • Send Custom Mail Action
  • Xenioo API
    • Choosing your API
    • Global Platform API
      • Authorization
      • Platform SSO
      • Bots
        • List
        • Publishing
          • Publish
          • Get Channel Settings
          • Set Channel Settings
        • Variables
        • Cloning and Referencing
          • Clone
          • Reference Clone
          • Attach Child
          • Detach Child
        • Backup And Restore
          • Backup
          • Restore
          • Restore With Overwrite
      • Teams
        • Members
          • List
          • Add Or Update
          • Delete
        • Profiles
          • List
          • Add Or Update
          • Delete
      • Conversations
        • Audiences
        • Audience Contacts
        • Entries
        • Share Url
      • NLP Query
      • Large Language Models
        • Settings
        • Guidelines
        • Add Resource
        • Delete Resource
        • Add Function
        • Delete Function
        • Train
        • Train State Check
        • Test
      • Statistics
        • Account Statistics Data
        • Bot Statistics Data
        • Report Files
        • Download Report File
      • Broadcasts
        • Broadcasts List
        • Broadcast State
  • Changelog
Powered by GitBook
On this page
  • Variables
  • Default Variables
  • Privacy Variables
  • Tags
  • Data Persistence

Was this helpful?

  1. Actions And Operations

Variables and Tags

PreviousActions AvailabilityNextDynamic Parsing And Content

Last updated 4 months ago

Was this helpful?

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

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 . 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 = {
    "name":"Red",
    "value":"ff0000"
}

The data above can be accessed andboth by referring to favorite_color, which will return the full JSON or by favorite_color.name, which will just return Red.

Each Xenioo variable can contain up to 64kb of text data. Each conversation can have up to 512 unique variables (including default ones).

Regardless of initial choice, variable names are forced by Xenioo into convention.

Default Variables

By default, the following variables are added to your chatbot runtime by Xenioo:

Name

Description

user_name

The username (or nickname) of the user, if available.

first_name

The first name of the user

last_name

The last name of the user

locale

The locale of the user in 2 letters iso format (e.g. EN, IT). On channels such as RCS, SMS and WhatsApp, this value is detected from the user phone number.

locale_alpha3

The country of the user in 3 letters format (e.g. ENG, ITA). On channels such as RCS, SMS and WhatsApp, this value is detected from the user phone number.

user_id

The channel based user id. This value is unique to the channel

x-token

Single use throw away token. The value changes every time it is used

bot_name

bot_channel

The name of the current conversation channel (e.g. "WhatsApp" )

last_user_message

The last message the user has sent

last_command

The last command that was triggered by the user

detected_locale

input_fail_count

The last number of failed inputs

input_fail_triggered

Contains true if the last input has triggered a failure. Otherwise false

chat_state

Contains the current chat state according to the table below

first_contact

The full date and time of the very first contact your chatbot had with the current user.

first_contact_day

The day of the month of the very first contact your chatbot had with the current user.

first_contact_weekday

The full name of the day of the week (e.g. Saturday) of the very first contact your chatbot had with the current user.

first_contact_month

The month of the very first contact your chatbot had with the current user.

first_contact_year

The year of the very first contact your chatbot had with the current user.

last_actor

Contains a fixed value representing the last platform actor to interact in the current flow. It may contain "user" if the last interaction was from the user or "xenioo" if the chatbot was the originator of the last message or the operator email, if the last message was from an operator.

last_contact

The full date and time of the last contact that your chatbot had with the current user. If the conversation is alive, this value is constantly updated after each interaction.

last_contact_day

The day of the month of the last contact your chatbot had with the current user.

last_contact_weekday

The full name of the day of the week (e.g. Saturday) of the last contact your chatbot had with the current user.

last_contact_month

The month of the last contact your chatbot had with the current user.

last_contact_year

The year of the last contact your chatbot had with the current user.

optin_message

If the channel requires an optin message (e.g. WhatsApp) this variable will hold the value of the very first message sent by the current user to the channel.

conversation_topics

device_state

The device state retrieved by Xenioo IoT actions. May vary depending on device.

conversation_state

The current conversation state in extended string format. Can be either Chatbot, OperatorRequested, OperatorTakenOver or UserBanned.

online_operators_count

online_operators

operator

The operator email of the currently active operator. This variable is valued only if the current conversation is taken over.

operator_name

The full operator name (Account Name) of the active operator. This variable is valued only if the current conversation is taken over.

operator_group

The full group name of the currently active operator. This variable is valued only if the current conversation is taken over.

operator_interacted

True if the operator talked at least once with the user since take over. Empty otherwise. This variable is automatically cleared every time the conversation goes from Chatbot controlled to Operator controlled.

streaming_offset

The current offset of an ongoing streaming action. It represent the position along the stream in milliseconds.

current_stream_token

The current unique token associated with the streaming operation.

previous_stream_token

The unique token associated to the previous streaming operation.

current_audio_action

The current audio action as requested by an incoming state change in any IoT device update.

message_type

This variable will hold the type of message sent by the user. This variable is empty if the message is of type text, otherwise will contain either "image", "audio", "voice" or "file".

last_receipt_value

This variable will be automatically updated by Xenioo with the latest receipt value of the latest message sent to the conversation channel.

start_interaction

The full interaction name of the current conversation context

start_behaviour

The full behaviour name of the current conversation context

Default Tags

The following tags are created automatically by Xenioo during your chatbot runtime:

Tag

Description

NEW_USER

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:

Value

Description

Empty/Unset

The chat is in its default state. Xenioo is controlling your chatbot replies.

operator_requested

An operation has set the request operator flag. The chat is waiting to be taken over by an operator

take_over

The chat has been taken over by an operator and its currently managed by a human.

Privacy Variables

Privacy variables are a special type of variables that cannot be altered in any way from outside or inside the chatbot runtime.

Tags

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:

Tag

Description

NEW_USER

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.

The name of your bot, as set in your .

The locale that Xenioo has detected by or scripting in 4 letters iso format (e.g. en-US)

The collected by the current conversation.

The number of operators online for the current chatbot. This value is updated on every user interaction. When not it may represent a stale value.

The full list of operators currently online separated by a semicolon. Like for the operators count, this value is updated on every user interaction. When not it may represent a stale value.

Please note that, depending on the 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 by the user. Refer to each channel specific information for a complete list.

These variables hold the selected privacy preferences of your user and only a can alter these variables.

Every variable and tag is persisted in the conversation and kept available for any future contact or until you, or the user, .

conversation
automatically parsed
snake_case
channel
depending on the channel used
Privacy Opt-in Action
looking at a live conversation
looking at a live conversation
choose to forget it
settings
broadcast
NLP
number of topics