---
schema_version: "1"
id: 4f8f62c2dd1e22dc8421a88661387e15c89e9e1280e37c975061cf6d03eb5bf3
title: What’s a Variable?
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/bots_service_whats_a_variable.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.bots_service_whats_a_variable.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4a7edac89eb673c64a004bd379f16aadde2d18ceb1c94011759658f458b873ca
description: A variable is a container that stores a specific piece of data collected from the customer or output from Salesforce. Since variables are containers of information, they can be used within dialog actions as both inputs and outputs and can be inserted as part of the text in messages.
products:
  - Service Cloud
  - Service Intelligence
release: "264"
---
# What’s a Variable?

A variable is a container that stores a specific piece of data collected from the customer or output from Salesforce. Since variables are containers of information, they can be used within dialog actions as both inputs and outputs and can be inserted as part of the text in messages.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.einstein_service_intro.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_intelligence-264-0-0-production-enus/dcd06a7b-b5ab-448b-a767-4e2e90481508/images/icon_note.png)

Note Starting August 17, 2026, Einstein Bots is in Maintenance Mode. Existing Einstein Bots continue to be supported and can be used after August 17, 2026. However, no new features or enhancements will be added, and we recommend using Agentforce for new AI agent implementations. See [Upgrade Bots to Service Agent](https://help.salesforce.com/s/articleView?id=service.bots_service_asa_create.htm&type=5&language=en_US) and [Learn about Agentforce](https://trailhead.salesforce.com/content/learn/trails/design-and-implement-ai-agents-with-agentforce).

There are three types of variables in the Bot Builder: Custom, Context, and System.

Create custom variables to store information gathered from your customers. Use context variables to create channel-independent bots. Use the system variable to capture the last customer input with the bot. Variables are specific to the version of the bot in which they’re created. Variables can be inserted in bot messages and questions using standard merge syntax.

The following types are available for custom variables.

- Text
- Number
- Boolean
- Object
- Date
- DateTime
- Currency
- Id

Object type variables store full records with fields. For example, you can use a flow to retrieve a contact record, store the record in an object type variable, and then access one of the record fields, such as “Name”.

Id is a text type variable with a restricted character count.

- **[Add a Custom Variable](https://help.salesforce.com/s/articleView?id=service.bots_service_add_slot.htm&release=264.0.0&type=5)**  
    Create custom variables to store information gathered from your customers.
- **[Understand Context and System Variables](https://help.salesforce.com/s/articleView?id=service.bots_service_context_system_variables.htm&release=264.0.0&type=5)**  
    Access important information during bot conversations with context and system variables. Context variables let your bot gather customer information regardless of channel. System variables store back-end information about conversations.