Theme
Variables & Context
Variables are named values that persist throughout a conversation session. They allow nodes to share data -- for example, an API Call node can store a response in a variable that a Condition node later evaluates.
Variable Types
Session Variables
Session variables are set during the conversation and persist until the session ends. Any node can read or write them.
| Variable | Set By | Example Value |
|---|---|---|
user_name | Set Variable node | "Jane Smith" |
account_number | API Call response mapping | "ACC-12345" |
llm_response | LLM Response node output | "Your order ships tomorrow." |
kb_results | KB Search node output | [{content: "...", score: 0.92}] |
intent | Condition or classifier | "billing_inquiry" |
System Variables
System variables are automatically available in every session. They are read-only and prefixed with sys_.
| Variable | Description | Example |
|---|---|---|
sys_user_id | Unique identifier for the end user | "usr_abc123" |
sys_channel | The channel the conversation is on | "web", "voice", "sms" |
sys_language | Detected or configured language code | "en", "es", "fr" |
sys_tenant_id | The tenant that owns the bot | "tnt_xyz789" |
sys_bot_id | The bot handling the conversation | "bot_456" |
sys_conversation_id | Unique ID for this conversation | "conv_001" |
sys_timestamp | Current UTC timestamp | "2026-02-07T14:30:00Z" |
sys_message_count | Number of messages in the session | 5 |
sys_page_label | Page or context label from the widget | "pricing-page" |
Using Variables in Nodes
Template Syntax
Reference variables in any text field using double curly braces:
Hello {{user_name}}, your account {{account_number}} is active.Nested properties are accessed with dot notation:
Your order status is {{order_details.status}}.In Condition Nodes
Condition nodes evaluate variables directly. You select the variable name, an operator, and a comparison value:
Variable: user_tier
Operator: equals
Value: "premium"In System Prompts
LLM Response nodes can reference variables in the system prompt to provide context:
You are assisting {{user_name}} who has a {{user_tier}} account.
Their last order was {{last_order.id}} placed on {{last_order.date}}.
Answer based on their account context.Setting Variables
Set Variable Node
The most direct way to assign a variable. You provide:
- Variable Name: The key (e.g.,
greeting) - Value: A literal value, template expression, or JSON expression
Name: greeting
Value: Hello {{user_name}}, welcome back!Node Output Variables
Many nodes automatically write to a configured output variable:
| Node Type | Output Variable | Contains |
|---|---|---|
| LLM Response | Configurable (default: llm_response) | The generated text |
| API Call | Configurable (default: api_response) | The parsed JSON response body |
| KB Search | Configurable (default: kb_results) | Array of matching chunks with scores |
| RAG Query | Configurable (default: rag_results) | Array of matching chunks with relevance scores |
| Collect Input | Configurable | The user's input text |
| Voice Input | Configurable (default: voice_input) | Transcribed speech text |
| Salesforce | Configurable (default: sf_result) | CRM query/operation result |
API Response Mapping
API Call nodes support response mapping to extract specific fields:
json
{
"order_status": "$.data.order.status",
"delivery_date": "$.data.order.estimated_delivery",
"item_count": "$.data.order.items.length()"
}TIP
Use JSONPath expressions in response mapping to extract exactly the data you need from complex API responses.
Variable Scope and Lifetime
- Variables are scoped to the conversation session. They are not shared across conversations.
- Variables persist across flow transitions when using the Go to Flow node.
- When a conversation ends (timeout, explicit end, or handoff), all session variables are discarded.
- Variables are available in the conversation transcript for reporting purposes.
WARNING
Do not store sensitive data (passwords, full credit card numbers) in session variables. They appear in debug logs and conversation transcripts. Use the platform's encryption features for PII.
Debugging Variables
In the Testing panel, the Variables Inspector shows all current session variables and their values in real time as you step through a flow. This is the fastest way to verify that variables are being set correctly.
Variables Inspector panel in the test sidebar showing session variable names, values, types, and which node set them
Send Message node config panel showing variable interpolation with {{user_name}} and {{account_number}} in the message text
