Skip to main content
Skip table of contents

Overview of the built-in variables

Last updated: 03 December 2024

Your chatbot platform comes loaded with a series of variables. These variables may help you build chatbots faster, create more advanced experiences, or simply be there to make your life easier.

Below is a list of all the built-in variables and a short description of what they do.

Variable

Description

Subscriber variables

subscriber.identifier

Stores the subscriber’s ID.

subscriber.has_sent_message

Stores whether the subscriber has sent a message or not (true or false).

subscriber.is_paused

Stores whether the subscriber is paused or not (true or false).

subscriber.is_demo

Stores whether the subscriber is interacting with the chatbot in demo mode or not (true or false).

subscriber.session_started_at

Stores the date (format: dd-mm-yyyy hh:mm AM/PM) when the subscriber started their session with the chatbot.

subscriber.last_active_at

Stores the date (format: dd-mm-yyyy hh:mm AM/PM) when the subscriber was last active (last sent a message)

subscriber.current_conversation

Stores which conversation the subscriber is currently going through.

subscriber.current_conversation_step

Stores which step of the conversation the subscriber is currently going through.

subscriber.stuck_count

Stores how many times the subscriber has looped back to the same step of a conversation.

subscriber.channel

Stores which channel the subscriber is using to talk to the bot. It takes the following values:

  • Converse

  • Embedded

  • Full Page

  • Facebook Messenger

  • WhatsApp

  • Telegram

  • Instagram

  • Alexa

  • Facebook Workplace

  • Microsoft Teams

  • VOIP

  • SMS

subscriber.location

Stores the subscriber’s location.

subscriber.language

Stores the subscriber’s preferred language.

subscriber.phone_number

Stores the subscriber’s phone number. Only works with compatible channels: WhatsApp, VoIP, and SMS.

subscriber.received_cta_at

Stores the date (format: dd-mm-yyyy hh:mm AM/PM) when the subscriber was shown the call-to-action.

subscriber.closed_cta_at

Stores the date (format: dd-mm-yyyy hh:mm AM/PM) when the subscriber closed the call-to-action.

subscriber.token

Stores an auth token that can be used to allow a subscriber to log into the chatbot (e.g. through webhook).

subscriber.username

Specifically used for the auth composer, stores the subscriber’s user information.

subscriber.password

Specifically used for the auth composer, stores the subscriber’s password information.

subscriber.ip_address

Stores the subscriber’s IP address.

subscriber.user_agent

Stores the subscriber's browser information (e.g. Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0)

subscriber.browser_name

Stores the subscriber’s browser name (e.g. Chrome, IE, etc.).

subscriber.browser_version

Stores the subscriber’s browser version.

subscriber.operating_system_name

Stores the subscriber’s operating system’s name (e.g. iOS, Windows, etc.).

subscriber.operating_system_version

Stores the subscriber’s operating system’s version.

subscriber.converse_id

Stores the version ID of the Converse widget with which the subscriber is interacting. Learn more.

This variable will return a blank space when displayed in Demo or in any non-Converse channel.

Message variables

message.message

Stores the last message sent by the subscriber, falls back to the label if there isn’t a message to store.

message.label

Stores the label of the button the subscriber clicked.

message.postback

Stores the postback of the button the subscriber clicked.

message.files

message.files is the basis for the following four pieces of information you can grab from an uploaded file:

  • {{message.files.0.name}}, stores the name of the file as it is hosted on your platform.

  • {{message.files.0.file_name}}, stores the name of the file as it was received from your user including its extension.

  • {{message.files.0.file_type}}, stores the group the file is associated with in the platform (document, spreadsheets, images, etc.).

  • {{message.files.0.link}}, stores the file URL.

Users can upload up to five files at once. 0 in those variables represent the first file they sent (more on zero-indexing).

Account variables

account.identifier

Stores the ID of the account.

account.name

Stores the name of the account.

account.email

Stores the email address associated to the account.

account.phone_number

Stores the phone number associated to the account.

account.address

Stores the address associated to the account.

account.chatbot_url

Stores the URL on which the chatbot is hosted.

account.app_url

Stores the URL on which the chatbot platform is hosted (e.g. bots.website.com).

account.api_name

Store the company name of the platform owner.

account.api_url

Stores the API URL associated with the chatbot platform (e.g.name-api.website.com).

account.bot_server_url

Stores the socket server URL the chatbot connects to.

account.locale

Stores the locale code associated with the platform’s hosting (e.g. EN).

account.timezone

Stores the timezone in which the platform is hosted (UTC by default).

Date variables

date.current_time

Stores the current time.

date.current_date

Stores the current date.

date.current_date_time

Stores the current date and time.

date.current_day

Stores the current day (e.g. Monday, Tuesday, etc.).

date.current_day_of_month

Stores the current day of the month.

date.current_month

Stores the current month.

date.current_year

Stores the current year.

date.current_hour

Stores the current hour.

date.current_minute

Stores the current minute.

date.current_second

Stores the current second.

Link variables

link.last_clicked_url

Stores the last tracked link the subscriber has clicked within the chatbot.

link.last_clicked_name

Stores the last tracked link’s name the subscriber has clicked within the chatbot.

link.last_clicked_at

Stores the date (format: dd-mm-yyyy hh:mm AM/PM) the subscriber last clicked a tracked link within the chatbot.

NLP variables

nlp.confidence_score

Stores how confident the chatbot is of its response to any question (including FAQs, small talk, semantic search, etc).

nlp.identifier

Stores the ID of a specific FAQ.

nlp.action

Stores a value that tells your chatbot platform how to treat the message from the user (e.g. small talk, FAQ, etc.).

nlp.is_exact_match

Stores whether the NLP has returned an exact match or not (true or false).

Knowledge base variables

knowledge_base.name

Stores the knowledge base’s name.

knowledge_base.section_name

Stores the knowledge base section’s name.

knowledge_base.section_content

Stores the knowledge base section’s content.

knowledge_base.section_identifier

Stores the knowledge base section’s identifier.

semantic_search.confidence_score

Stores the confidence score of a triggered semantic search.

Live chat variables

live_chat.queue_position

Stores the subscriber’s position in the live chat queue.

live_chat.queue_wait

Stores the subscriber’s expected wait time in the live chat queue.

FAQ variables

faq.name

Stores the FAQ’s name.

faq.group

Stores the first tag assigned to an FAQ.

faq.section_name

When a knowledge base article is assigned to an FAQ (using advanced settings), this variable returns the knowledge base article’s name.

faq.section_content

When a knowledge base article is assigned to an FAQ (using advanced settings), this variable returns the knowledge base article’s content.

faq.section_identifier

When a knowledge base article is assigned to an FAQ (using advanced settings), this variable returns the knowledge base article’s ID.

faq.confidence_score

Stores how confident the chatbot is in its FAQ answer.

Small talk variables

small_talk.name

Stores the small talk’s name.

Integration variables

integration.data.xxxxxx

Format for all your integration-related variables

Lookup / spreadsheet variables

lookup.data.xxxxxx

Format for all your spreadsheet-related variables

Custom variables

custom.get.xxxxxx

Format for all your custom variables

Webhook variables

webhook.name

Stores the webhook’s name.

webhook.id

Stores the webhook’s ID.

webhook.key

Stores the webhook’s key.

webhook.data.xxxxxx

Stores data received from the webhook payload.

Alexa variables

is_launch_request

Stores whether the Alexa skill was triggered (true or false).

is_stop_request

Stores whether the Alexa skill was stopped (true or false).

is_help_request

Stores whether the Alexa skill help intent was triggered (true or false).

has_screen

Stores whether the Alexa device being used has a screen or not (true or false).

device_id

Stores the Alexa device ID.

api_access_token

Stores the Alexa device API access token.

VOIP variables

is_start_request

Stores whether the VOIP channel was triggered (true or false).

audiocodes_vaig_converastion_id

Stores the Audiocodes conversation ID (more info).

Generative AI variable

confidence_score

Stores a score between 0 and 100 which represents how confident the AI is that the document fetched is relevant to the question asked.

answer

Stores the generated answer.

text

Stores the text used to generate the answer.

overall_answer_score

Stores a score between 0 and 100 which represents both the relevance of the document fetched and the answer generated. Learn more.

text_prompt

Stores the prompt.

source_link

Stores a link to the document used to generate the answer.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.