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.
You can create and update variables in several ways, each suited to a different scenario:
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
Variables come in several types, each differing in scope, where you manage it, and whether it persists after the session ends.
Question
Single conversation
Question node
No
Session
Single conversation
Variable node / Built-in
No
Contact
Across sessions per contact
Variable node / Built-in
Yes
Static
Agent-wide defaults
Designer > AI Workflows > Variables
N/A (initializes per session)
System
Platform-provided
Built-in
N/A (read-only)
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 Table
Navigate to Designer > AI Workflows > Variables to manage static variables for your agent. This is where you define the default values that initialize at the start of every conversation. The table comes pre-populated with a set of default variables that every new agent inherits automatically.
Creating a Static Variable
Manage Static Variables
Edit or delete the variables using the action buttons. Click on any variable to open the edit menu.
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 and 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.
Session Variables Reference
Session-scoped variables initialize when a conversation starts and remain available until the session ends. Some come from agent-wide defaults like static variables; others are populated by platform features such as mid-conversation authentication.
{{agentPersonality}}
Specifies how the agent responds in terms of tone of voice (e.g. friendly or formal) and presentation style (e.g. detailed vs brief), and other personality characteristics
{{agentRole}}
Specifies the role of the agent in broad terms, e.g. their function and the company that employs them
{{Auth.authenticatedAt}}
Authentication timestamp in milliseconds
{{Auth.email}}
Authenticated user's email
{{Auth.email_verified}}
Whether the user's email is verified
{{Auth.family_name}}
Authenticated user's last name
{{Auth.full_name}}
Authenticated user's full name
{{Auth.given_name}}
Authenticated user's first name
{{Auth.name}}
Authenticated user's display name
{{Auth.phone}}
Authenticated user's phone number
{{Auth.phone_verified}}
Whether the user's phone is verified
{{Auth.provider}}
Authentication provider name
{{Auth.sub}}
Authenticated user's subject identifier
{{Auth.<claim>}}
Any additional claim listed in Additional Claims on the agent's Security page
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 agent's identifier
{{deploymentId}}
The deployment identifier
{{deploymentChannel}}
The deployment channel
{{isVoiceSession}}
Whether the current session is in voice input mode (resets to false after 3 consecutive typed messages)
{{messageId}}
The message identifier
{{userTextMessage}}
The user's latest text message
{{sessionHistory}}
The session transcript
{{detectedLanguage}}
The user's most recently detected language. Requires the Language Detection plugin.
{{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 (agent's time zone)
{{CurrentDateLongForm}}
Current date in long format, e.g. Tuesday, August 06, 2024 (agent's time zone)
{{CurrentDatetimeISO8601}}
Date and time in ISO 8601 format (agent's time zone)
{{CurrentDatetimeISO8601_UTC}}
Date and time in ISO 8601 format (UTC)
{{CurrentYear}}
Current year in YYYY format (agent's time zone)
{{CurrentMonth}}
Current month in MM format (agent's time zone)
{{CurrentDay}}
Current day in DD format (agent's time zone)
{{CurrentHour}}
Current hour in hh format (agent's time zone)
{{CurrentMinute}}
Current minute in mm format (agent's time zone)
{{CurrentTime12h}}
Current time in 12h format (agent's time zone)
{{CurrentTime24h}}
Current time in 24h format (agent's time zone)
{{Timezone}}
The agent's time zone identifier
{{TimezoneOffset}}
The UTC offset of the agent'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 table is shared by your team, so descriptions prevent confusion
Keep system variables in mind: Check the built-in list before creating a custom variable that duplicates existing data
Last updated

