> This page is for version Scripted.
> For other versions, use one of these documentation indexes:
> - Generative (default): https://developers.ada.cx/generative/llms.txt
> - Scripted: https://developers.ada.cx/scripted/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.ada.cx/_mcp/server.

# Get started with variables

## Overview\[#UUID-47544806-121d-a9b6-bc67-8761f3b53924_id_360026518374_id_h_01F4D7W5G8VE7S73YHBYJBQ8FG]

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?\[#UUID-47544806-121d-a9b6-bc67-8761f3b53924_id_360026518374_id_h_e5f95a5c-4028-491d-a491-06aff4752b7a]

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.

| Dashboard View                                                                                                                    | Chatter View                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| ![](/_fern-files/_img/bf264bcbaf4dc582d51ea37797814e5218c541d2f8c9ece7f8420bf47921ebf4.webp) | ![](/_fern-files/_img/6dd80794e8575fe918f3bef733cf06d0b2bcfb6bea7c7e2688457b8dc3707172.webp) |

**Local variables** are specific to the Answer in which they are created
and cannot be used in other Answers. Local variables are blue: ![](/_fern-files/_img/c2c44fd160337a98a01e00986057cfb734cd04774accd1c0492b9e78c273af7b.webp)

**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: ![](/_fern-files/_img/c854ab12de3fb5b22eefdfee563434735ae13a0808ad682e18a55949d52f3193.webp)

**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: ![](/_fern-files/_img/2b8ba33906d226700892b3eda8e3163ce310df50a3b9ccef4a805fbb493cc32a.webp)

**Sensitive variables** can be used to handle sensitive customer
information. A [sensitive variable](/scripted/docs/build-and-maintain-your-bot/personalize-conversations/temporarily-store-private-information-using-sensitive-variables)'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: ![](/_fern-files/_img/452b9a88c7510f2d0c9df5ff2875cd085bd587a069375b2fb28a642c9d619e21.webp)

## Collect and manage variable data\[#UUID-47544806-121d-a9b6-bc67-8761f3b53924_id_360026518374_id_h_153a7667-3583-4c74-888b-c8077231f59f]

There are several ways to save and manage variable data:

* Use a [Capture block](/scripted/docs/build-and-maintain-your-bot/work-with-blocks-and-apps/save-chatter-information-using-the-capture-block)
  to request information directly from chatters and save it in a
  variable.

* Use the [Set Variable block](/scripted/docs/build-and-maintain-your-bot/work-with-blocks-and-apps/save-content-in-variables-using-the-set-variable-block)
  to manage variable data internally.

* Use the [HTTP Request block](/scripted/docs/build-and-maintain-your-bot/work-with-blocks-and-apps/make-api-requests-using-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](https://developers.ada.cx/reference/embed2-reference#metafields)
  to pass web metadata into your bot as custom
  [metavariables](/scripted/docs/build-and-maintain-your-bot/personalize-conversations/get-started-with-variables#UUID-47544806-121d-a9b6-bc67-8761f3b53924_id_360026518374_id_h_a4b9bdb4-9a05-4772-8f4d-55b8399274c0).

> **Info**
>
> 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\[#UUID-47544806-121d-a9b6-bc67-8761f3b53924_id_360026518374_id_01G19D76MDMGTWV01S9K83FYTN]

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.

1. Click on the variable where you've injected it into your Answer
   block. The Options pop-up displays.

2. 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\[#UUID-47544806-121d-a9b6-bc67-8761f3b53924_id_360026518374_id_h_a4b9bdb4-9a05-4772-8f4d-55b8399274c0]

**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](https://developers.ada.cx/reference/embed2-reference#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.

> **Note**
>
> 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](/scripted/docs/use-ada-with-your-website/serve-your-website-information-in-chat/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.

![](/_fern-files/_img/d8cb0145bba5c76fa569bb73f3999e0dc73633da968a0f7e65741b1b5cd7b33e.webp)

---

Have any questions? Contact your Ada team, or email us at [](<mailto:help@ada.support%20%E2%80%9CHelp Docs inquiry%E2%80%9D>).