Variables

Manage and track data throughout your flow

Variables are placeholders that store data collected during conversations. The variable drawer provides a centralized view of all variables in your flow, making it easy to see what data is available and where it’s used.

Overview

The variable drawer shows all variables organized by type:

  • Pre-Call Variables: Data available before the call starts
  • Collected: Variables gathered from users during conversations
  • Action Results: Variables returned from Custom Action API calls

Clicking on any variable in the drawer takes you directly to where it’s defined or used in your flow designer, making it easy to navigate and debug your flows.

Why Variables Matter

Variables enable your agent to:

  • Personalize conversations: Use collected data to tailor responses (e.g., “Hi {user_name}, thanks for calling!”)
  • Make decisions: Reference variables in Branch nodes to route users based on their responses
  • Integrate with external systems: Pass variables to Custom Actions for API calls
  • Maintain context: Share variables between your main flow and sub-agents

Types of Variables

Pre-Call Variables

Pre-call variables are available before the conversation starts. These are typically:

  • Data passed when initiating a call (e.g., {lead_name}, {company_name})
  • System-generated identifiers (e.g., {call_id}, {user_phone_number})
  • Context from external systems (e.g., CRM data, appointment details)

Use cases:

  • Personalize the greeting message with the caller’s name
  • Pre-populate conversation context
  • Pass identifiers to Custom Actions for API lookups

Collected Variables

Collected variables are gathered from users during conversations using the Conversation node. These variables store user responses that you need for later use in your flow.

How they work:

  1. The Conversation node asks the user a question
  2. The user provides their response
  3. The response is stored in a variable (e.g., {user_email}, {party_size})
  4. The variable can then be used in Branch nodes, Message nodes, or Custom Actions

Example:

For more details on collecting variables, see the Conversation Node documentation.

Action Results

Action results are variables returned from Custom Action API calls. When a Custom Action executes, the API response is stored in variables that you can reference throughout your flow.

How they work:

  1. Custom Action makes an API call (GET, POST, etc.)
  2. API returns data
  3. Response data is stored in action result variables
  4. These variables can be used in subsequent nodes
  5. Reference variables using <

For more details on Custom Actions and their responses, see the Custom Actions documentation.

FAQ

Yes! The variable drawer shows variables from both your main flow and all sub-agents. Variables collected in your main flow are accessible to sub-agents, and variables set in sub-agents are visible when they return to the main flow.

If you reference a variable that hasn’t been collected or doesn’t exist, the system will use an empty value. Always ensure variables are collected before using them, or use Branch nodes to check if a variable exists.

The variable drawer shows all variables, but you can also check which variables are available at any point by looking at the nodes that come before it. Variables are available from the point they’re collected onward in your flow.