Using Variables in Your Voice Agent

Automate with AI3 min readUpdated 2026-03-14

Variables let you insert dynamic, caller-specific information into your agent's greetings, scripts, SMS messages, and actions. Instead of hard-coding details, use variables to personalize every interaction automatically.

Available on: All AI Voice Agent plans.


Available Variables

Caller Variables

VariableSourceExample value
{{caller_name}}CRM or conversation"Sarah Chen"
{{caller_number}}Caller ID"+1 (555) 123-4567"
{{caller_company}}CRM"Acme Corp"

Conversation Variables

VariableSourceExample value
{{reason}}Extracted from conversation"Billing question about March invoice"
{{summary}}AI-generated after call"Caller asked about invoice #1234..."
{{appointment_details}}Calendar integration"Thursday, March 14 at 2:00 PM"
{{disposition}}Assigned by agent"Qualified Lead"

Agent Variables

VariableSourceExample value
{{agent_name}}Agent configuration"Reception Bot"
{{business_name}}Agent role description"Acme Dental"
{{business_hours}}Agent configuration"Mon–Fri, 8 AM – 5 PM"

Custom Variables (via Fetch Context)

Any field returned by your Fetch Context endpoint is available as a variable:

VariableSourceExample value
{{account_status}}Your API"Active"
{{plan}}Your API"Enterprise"
{{recent_ticket}}Your API"Billing discrepancy — pending"

Where to Use Variables

Greetings

"Hi {{caller_name}}, welcome back to {{business_name}}."

Call Flow Scripts

"I see you're on the {{plan}} plan. Let me help you with your {{reason}}."

SMS Messages (During and After Call)

"Hi {{caller_name}}, your appointment is confirmed for {{appointment_details}}."

System Prompts

"The caller's account status is {{account_status}}. If the account is suspended, transfer to billing immediately."


Fallback Behavior

When a variable has no value (e.g., {{caller_name}} for an unknown caller), the agent handles it gracefully:

  • In greetings and scripts, the agent omits the variable and uses a generic alternative
  • In SMS templates, empty variables render as blank — write templates that work without them

Tip: Write fallback-safe templates:

"Hi {{caller_name}}, thanks for calling {{business_name}}." Falls back to: "Hi, thanks for calling Acme Dental."


Was this helpful?