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.
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 Create custom variables to store information gathered from your customers.
Understand Context and System Variables 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.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.