Variables
Store and reuse data across your agent's workflows
Variables let you define reusable values that any node in your workflow can access. Use them to configure agent behavior, track conversation state, and personalize responses based on user input or system data. You can reference them in any text box using the {{variableName}} syntax.
What Is a Variable
A variable is a named key-value pair that stores data your agent can read and write during a conversation. Variables act as the shared memory between nodes — one node sets a value, and any downstream node can consume it to make decisions, personalize messages, or call external APIs.
Every conversation gets its own copy of variable values. Two users chatting with the same agent at the same time each have independent variable states, so one conversation never leaks data into another.
Variables can be overwritten at runtime unless marked as constant. You reference them anywhere in your workflows using the {{variableName}} syntax.
Controlling Workflow Logic with Variables
Variables become especially useful when paired with a Flow Control node. The typical pattern is:
An LLM or Variable node sets a value based on something that happened earlier in the conversation — for example, storing the user's selected department as
{{department}}A Flow Control node reads that variable and branches the workflow into different paths depending on its value
Each branch leads to a different sequence of nodes (e.g., one path for billing, another for technical support)
This lets you build workflows that adapt to each conversation. Instead of creating separate workflows for every scenario, you use variables to route users dynamically within a single workflow.
Variable Types
The platform supports five types of variables.
Question
Single conversation
Question node
No
Session
Single conversation
Variable node
No
Contact
Across sessions per contact
Variable node / Built-in
Yes
Static
Agent-wide defaults
Designer > AI > Variables
N/A — initializes per session
System
Platform-provided
Built-in
N/A — read-only
Question Variables
Automatically created when you add a Question node to a workflow. The user's answer is stored in a variable named after the question, making it available to any subsequent node in the same session.
Use for: capturing user input like names, email addresses, or selections without manually configuring a Variable node.
Session Variables
Scoped to a single conversation. The value initializes when the session starts and is discarded when the session ends.
Use for: temporary state like session_topic, conversation counters, or routing flags.
Contact Variables
Persists across sessions. The value is stored on the contact record and carries over to future conversations with the last assigned value. The platform includes several built-in contact variables; you can find the full breakdown in the reference section below.
Use for: user preferences, language selection, or any data that should survive between sessions.
A contact is any user who has interacted with an agent from any channel. Since users are typically not authenticated, each channel creates a separate contact — the same person chatting via Webchat and WhatsApp is treated as two different contacts.
Static Variables
Agent-level configuration values managed in Designer > AI > Variables. These act as defaults that initialize at the start of every conversation. Each conversation gets its own copy.
Use for: agent role definitions (agentRole), personality settings (agentPersonality), API tokens, or any value that should be consistent across all conversations.
Mark a static variable as constant to prevent workflows from overwriting it at runtime.
System Variables
Built-in, read-only values provided by the platform. Available in every workflow without creating them. See the full list in the System Variables Reference section below.
Referencing Variables
How you reference a variable depends on the node type. Look out for any place with the {x} symbol. Click it to open a selection drop-down that includes all available variables.
Type {{VariableName}} in the text editor or use the autocomplete option after typing {{ . Alternatively, click on the variable {x} button in the text editor toolbar to search all variables.
Select the variable from the drop-down. No manual syntax needed
The Variables Dashboard
Go to Designer > AI > Variables to manage static variables for your agent. This is where you define the default values that initialize at the start of every conversation.
Manage variables
Edit or delete the variables using the action buttons. Click on any variable to open the edit menu.
Deleting a variable is permanent. Verify that no active workflow depends on the variable before deleting.
Default variables
The dashboard comes pre-populated with a set of default variables that every new agent inherits automatically
Variable description
The description is optional and is used for documentation and collaboration purposes.
Constant switch
Enable the constant switch to lock a variable's value so workflows cannot overwrite it at runtime — useful for tokens, IDs, and other configuration that should stay fixed.
Multiple languages
Secondary languages inherit the static variables defined for the primary language. You can only create, edit, or delete static variables when the primary language is selected.
Creating a Static Variable
Using the Variable Node
The Variable node lets you set or update a variable mid-workflow. The variable is created or updated the moment the node executes — any node that comes after it in the workflow can read the new value.
Setting Variables from LLM Nodes
LLM nodes can write directly to variables when you configure the response format as JSON. This turns the LLM into a decision-maker that extracts structured data from a conversation and stores it for downstream nodes to use.
To set this up:
In the LLM node configuration, set the response format to JSON

Define the expected JSON structure in the LLM prompt — for example, instruct it to return
{"department": "billing", "urgency": "high"}Map each JSON property to a variable in the Extract Parameter section—
departmentmaps to{{department}},urgencymaps to{{urgency}}.
Once the LLM node executes, the mapped variables are available to every node that follows.
If you do not enable JSON response format, the LLM output is not automatically saved to any variable. JSON mode is required for the variable mapping to appear.
System Variables Reference
The platform provides built-in system variables you can use in any workflow without creating them.
{{sessionId}}
The session identifier
{{userId}}
The user identifier
{{workspaceId}}
The workspace identifier
{{BotId}}
The bot's identifier
{{deploymentId}}
The deployment identifier
{{deploymentChannel}}
The deployment channel
{{messageId}}
The message identifier
{{userTextMessage}}
The user's latest text message
{{sessionHistory}}
The session transcript
{{Today}}
Today's date
{{TodayDayOfTheWeek}}
Today's day of the week
{{Now}}
Current time
{{NowInMilliseconds}}
Unix timestamp in milliseconds since epoch
{{CurrentDate}}
Current date in YYYY-MM-DD format (bot's time zone)
{{CurrentDateLongForm}}
Current date in long format, e.g. Tuesday, August 06, 2024 (bot's time zone)
{{CurrentDatetimeISO8601}}
Date and time in ISO 8601 format (bot's time zone)
{{CurrentDatetimeISO8601_UTC}}
Date and time in ISO 8601 format (UTC)
{{CurrentYear}}
Current year in YYYY format (bot's time zone)
{{CurrentMonth}}
Current month in MM format (bot's time zone)
{{CurrentDay}}
Current day in DD format (bot's time zone)
{{CurrentHour}}
Current hour in hh format (bot's time zone)
{{CurrentMinute}}
Current minute in mm format (bot's time zone)
{{CurrentTime12h}}
Current time in 12h format (bot's time zone)
{{CurrentTime24h}}
Current time in 24h format (bot's time zone)
{{Timezone}}
The bot's time zone identifier
{{TimezoneOffset}}
The UTC offset of the bot's time zone
{{missedQuestionsCount}}
Missed questions count in the current session
{{consecutiveMissedQuestionsCount}}
Consecutive missed questions in the current session
{{WebchatFullUrl}}
The webchat full URL
{{WebchatOrigin}}
The webchat origin URL
Contact Variables Reference
{{UserInfo.email}}
User's email
{{UserInfo.firstName}}
User's first name
{{UserInfo.lastName}}
User's last name
{{UserInfo.fullName}}
User's full name
{{UserInfo.language}}
User's language
{{UserInfo.salutation}}
User's salutation
Best Practices
Name variables descriptively:
agentRoleandagentPersonalityare clear;var1andtempare notMark configuration values as constant: tokens, IDs, and role definitions should not change at runtime
Use session variables for temporary state: anything that only matters during a single conversation belongs in a session variable
Use contact variables sparingly: only store data that genuinely needs to persist across sessions
Add descriptions to every variable: the Variables dashboard is shared by your team — descriptions prevent confusion
Keep system variables in mind: check the built-in list before creating a custom variable that duplicates existing data
You now know how to create, store, reference, and manage variables across your agent's workflows.
Last updated
Was this helpful?

