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:
{{variable_name}}
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

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

Business Information

{{business.name}}
string
Your company name as configured in Cloom AI
{{business.id}}
string
Unique identifier for your business in Cloom AI

Example Usage

Email Template
Hello {{name}},

Thank you for contacting {{business.name}}. We received your
message about "{{subject}}" and are here to help.

Best regards,
{{business.name}} Team
Output:
Hello John Smith,

Thank you for contacting Acme Corp. We received your
message about "Order Status Inquiry" and are here to help.

Best regards,
Acme Corp Team

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:
Hi {{name}},

We've located your order #{{routes.order_number}} from
{{routes.order_date}}.

Your package is currently in transit and should arrive within
2-3 business days.
Output:
Hi Sarah Johnson,

We've located your order #123456 from December 10, 2025.

Your package is currently in transit and should arrive within
2-3 business days.

3. Event Data (Workflow Metadata)

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

Routing Information

{{event_data.inbound_email.route}}
string
The name of the route that was selectedExample: “Product Not Received”
{{event_data.last_email_response.reasoning}}
string
The AI’s explanation for why it chose this route

Conversation History

{{event_data.last_email_response.responded_at}}
datetime
Timestamp of the last AI response
{{event_data.inbound_email.sender_email}}
string
Email address of the person who initiated the conversation

Example Usage

Internal Notification
New support ticket routed via: {{event_data.inbound_email.route}}

Customer: {{event_data.inbound_email.sender_email}}
Received: {{event_data.last_email_response.responded_at}}

AI Reasoning: {{event_data.last_email_response.reasoning}}

Variable Best Practices

Not all variables may be available. Plan for missing data:
Hello {{name}}!

(or if name is missing)

Hello there!
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

Hello {{name}},

Thank you for reaching out to {{business.name}}.

Order Tracking

Your order #{{routes.order_number}} from {{routes.order_date}}
is {{routes.order_status}}.

Appointment Confirmation

This confirms your appointment on {{routes.appointment_date}}
at {{routes.appointment_time}} with {{routes.provider_name}}.

Support Ticket Reference

Ticket #{{routes.ticket_number}} - {{routes.issue_category}}

Opened: {{event_data.inbound_email.received_at}}
Status: {{routes.ticket_status}}

Conditional Logic (Advanced)

Some nodes support conditional logic based on variables:
If {{routes.order_total}} > 100:
  Send to: "High Value Customer Route"
Else:
  Send to: "Standard Customer Route"
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