Get started with variables
Overview
Variables allow you to put personalized information into your conversations, so you can create flexible, customized conversations with your Ada chat bot. This topic will take you through a variety of methods you can use to set variables.
What is a variable?
A variable is a reusable piece of data that can be referenced in an Answer. Think of a variable as a placeholder for information that is unique to each person who visits your bot.
Example: Ask for a customer’s name and have the bot refer to that person by name going forward.
Local variables are specific to the Answer in which they are created
and cannot be used in other Answers. Local variables are blue:
Global variables can be used across all Answers. Information
gathered as a global variable need only be collected once and can be
re-used in other relevant Answers. Global variables are colored green:
Metavariables are chatter-specific variables, collected without the
chatter providing the information directly. They include information
such as a chatter’s browser type, browser version, and IP address (for
messaging conversations) and phone number, city, and country (for voice
conversations). Metavariables are colored purple:
Sensitive variables can be used to handle sensitive customer
information. A sensitive variable’s
value is always redacted in the Ada dashboard, and is permanently
deleted after 24 hours. When creating sensitive variables, select
Availability > All Answers (Redacted). Sensitive variables are
colored yellow:
Collect and manage variable data
There are several ways to save and manage variable data:
-
Use a Capture block to request information directly from chatters and save it in a variable.
-
Use the Set Variable block to manage variable data internally.
-
Use the HTTP Request block to pull information from a public or private API. This information can be either static information (e.g. name or phone number) or dynamic information (e.g. price of Bitcoin, an account number, an array of recent orders).
-
Use your Embed2 script to pass web metadata into your bot as custom metavariables.
Variables are limited to 100,000 characters. Particularly when you’re saving all or part of an API response as a variable, take care that you don’t exceed this limit. If you do, you may start seeing errors, because your bot might not be able to correctly parse your variable content.
Set fallback text
In case there is an error and the personalized data can’t be displayed, it’s important to set fallback text for every variable you use. That way, your bot still has something to show chatters if the variable doesn’t populate properly.
-
Click on the variable where you’ve injected it into your Answer block. The Options pop-up displays.
-
In the Options pop-up, under Fallback Text, add text that you would like to appear in the event of an error.
Learn more about metavariables
Metavariables are the purple variables you see in the Variable Manager, and that you can add to Answer blocks when building Answers on the Ada dashboard. They contain chatter information retrieved and saved automatically by your bot, without having to collect it from a chatter directly.
Every bot starts with metavariables related to the chatter’s bot conversation, as well as those gathered from the chatter’s browser; however, you have the option to pass additional chatter data to the bot from your own database using an Embed script setting called setMetaFields. This method enables the passing of details, such as name, email, ID, and anything else you’d like to pass to the bot. Information passed this way is called metadata. The bot then saves the metadata as metavariables for you to use.
Whether or not you require chatter authentication before passing their metadata is up to you. Keep that in mind when adding the setMetaFields setting to your bot installation on your platform. See our article about Let chatters sign into your website for more information.
In the Conversations view, when you select a conversation, you can see a complete list of metadata that has been collected for that chatter. Global variables that capture names, emails, or phone numbers will also replace “Anonymous” in the Conversations view.

Metavariable definitions
The following metavariables are automatically collected and available for use in your conversations:
Browser & Device Information
browser
: Browser family name extracted from user-agent string (e.g., “chrome”, “firefox”, “safari”)device
: Platform/OS name parsed from user-agent string (e.g., “macos”, “windows”, “android”, “iphone”)browser_version
: Browser version string extracted from user-agent using regex matchinguser_agent
: Complete browser user-agent string from HTTP request headers
Location & Network
ip_address
: Client’s IP address (only when IP tracking is enabled in privacy settings)client_gmt_offset
: Client’s timezone offset (only when timezone tracking feature is enabled)language
: User’s language in BCP 47 format, validated against your bot’s supported languages
Conversation Context
last_question_asked
: Text content of the most recent text message sent by the user/chatterlast_answer_id
: ID of the last response/answer displayed to the end user (only when personalization feature is enabled)
Frontend State
introshown
: Boolean indicating if introductory campaign message was displayed (sent by chat frontend)initialurl
: URL where the chat widget was initially loaded (sent by chat frontend)
CSAT & Feedback
csat_score
: Customer satisfaction score from survey responses (only when CSAT feature is enabled)csat_positive
: Boolean indicating if CSAT score represents positive feedback (only when CSAT feature is enabled)
Channel-Specific
sunshine_facebook_page_id
: Facebook page ID for Sunshine Conversations integration (only when Sunshine channel is enabled)
Email Channel
email_attachments
: List of email attachments in email channel conversationsemail_has_attachments
: Boolean indicating if email conversation contains attachmentsada_email_subject
: Subject line of email in email channel conversationsada_email_origin
: Origin information for email channel conversationsemail_attachment_is_signature
: Boolean indicating if email attachment is a signature
Authentication & Integration
jwt_name
: Name from JWT token (part of Zendesk Glass integration)jwt_email
: Email from JWT token (part of Zendesk Glass integration)zdsession
: Zendesk session information for integrations
System State
created
: System-generated variable for conversation creation contextgreeting
: System-generated variable for greeting contextprivate
: System-generated variable for private conversation contextreset
: System-generated variable for conversation reset contextembed
: System-generated variable for embedded chat contexthas_multiple_participants
: Boolean indicating if conversation has multiple participants
Testing & Development
test_user
: Boolean flag indicating if conversation was initiated from dashboard with test_user=1 parameterguidance_id
: ID used for testing guidance features in webchatprocess_id
: ID used for testing process flows in webchatplaybook_id
: ID used for testing playbook functionality in webchat
Most metavariables are automatically populated when conversations begin. Some variables are only available when specific features are enabled (such as IP tracking, timezone tracking, or CSAT surveys). All metavariables are read-only and automatically managed by the system.