Skip to main content

Overview

Variables allow you to capture, store, and reuse data throughout your workflows. Cloom AI provides three types of variables that you can use to personalize messages and build dynamic workflows.

Variable Syntax

All variables use double curly brace syntax:
Variables can be used in:
  • Email subject lines and body content
  • SMS message templates
  • Voice prompts (limited)
  • Conditional routing logic
  • API calls and webhooks

Variable Types

User Data

Basic contact information and business details

Route Variables

Data extracted from conversations

Event Data

Workflow metadata and conversation history

1. User Data Variables

Access basic contact and business information directly:

Contact Information

string
The contact’s full name
string
The contact’s email address
string
The original email subject line (email workflows only)

Business Information

string
Your company name as configured in Cloom AI
string
Unique identifier for your business in Cloom AI

Example Usage

Email Template
Output:

2. Route Variables (Extracted Data)

Route variables are extracted from user conversations based on your workflow configuration.

How Route Variables Work

  1. You define variables in your route configuration
  2. The AI analyzes the conversation
  3. The AI extracts relevant information
  4. Variables become available for use in subsequent nodes

Variable Types

When creating route variables, choose from:
Any string of textExamples:
  • {{routes.customer_name}}
  • {{routes.product_description}}
  • {{routes.feedback_comment}}
Date values (automatically parsed and formatted)Examples:
  • {{routes.order_date}}
  • {{routes.delivery_date}}
  • {{routes.appointment_time}}
Numeric values (integers or decimals)Examples:
  • {{routes.order_number}}
  • {{routes.quantity}}
  • {{routes.refund_amount}}
True/false valuesExamples:
  • {{routes.wants_refund}}
  • {{routes.product_arrived}}
  • {{routes.email_consent}}

Naming Convention

Use descriptive, lowercase names with underscores: Good:
  • {{routes.tracking_number}}
  • {{routes.order_date}}
  • {{routes.customer_complaint}}
Avoid:
  • {{routes.var1}}
  • {{routes.TrackingNumber}}
  • {{routes.data}}

Example: Order Status Workflow

Route Configuration:
  • Variable: order_number (Number)
  • Variable: order_date (Date)
Usage in Email:
Output:

3. Event Data (Workflow Metadata)

Event data provides access to workflow routing decisions, conversation metadata, and AI reasoning.

Routing Information

string
The name of the route that was selectedExample: “Product Not Received”
string
The AI’s explanation for why it chose this route

Conversation History

datetime
Timestamp of the last AI response
string
Email address of the person who initiated the conversation

Example Usage

Internal Notification

Variable Best Practices

Not all variables may be available. Plan for missing data:
Make variable names self-documenting:
  • tracking_number
  • tn
Send test messages to verify variables populate correctly
Keep a list of variables used in each workflow for team reference

Common Use Cases

Personalized Greetings

Order Tracking

Appointment Confirmation

Support Ticket Reference

Conditional Logic (Advanced)

Some nodes support conditional logic based on variables:
Conditional logic availability varies by node type. Check specific node documentation for details.

Debugging Variables

If variables aren’t appearing correctly:
  1. Check spelling: Variable names are case-sensitive
  2. Verify extraction: Review conversation logs to confirm variables were extracted
  3. Test syntax: Use {{variable_name}} not {variable_name} or {{{variable_name}}}
  4. Check scope: Ensure the variable is available in the current node

Viewing Extracted Variables

To see what variables were extracted:
  1. Navigate to Voice Logs, Email Logs, or SMS Logs
  2. Click on a conversation
  3. Look for the Variables Extracted section

Variable Limitations

Be aware of these limitations:
  • Variables must be extracted before they can be used
  • Voice routing requires prompts that explicitly ask for variables
  • Some special characters in variable values may need escaping
  • Very long variable values may be truncated in some contexts

Next Steps

Voice Routing

Learn how to extract variables from voice calls

Email Setup

Configure email with variable extraction

SMS Setup

Use variables in SMS workflows