Skip to main content
Dynamic variables let you inject personalized data into your agent for each specific call. Using {{variable_name}} syntax, you can create agents that adapt to different contexts while keeping consistent conversation flows. Common use cases:
  • Personalized greetings: Hello {{customer_name}}, thanks for calling!
  • Context-aware responses: I see you're calling about order {{order_id}}
  • Dynamic routing: transfer to different numbers based on {{department}}
  • Time-sensitive info: reference {{appointment_date}} or {{deadline}}

Where Dynamic Variables Work

Dynamic variables can be used in:
  • Prompts — agent instructions and personality
  • Begin message — opening greeting
  • Tool configurations — custom function URLs, tool descriptions, property descriptions
  • Call handling — voicemail prompts and messages, transfer call phone numbers, warm transfer instructions, webhook URLs

Setup

1

Add variables to your prompt

Use {{variable_name}} wherever you want to inject data. A variable picker appears when you type {{ — filter by typing more characters, then select with Enter, click, or Tab.
2

Set agent-level defaults (optional)

Configure default values in agent settings. Defaults are used as fallback when a variable is not supplied in the call request.
3

Pass variables in production

Set variables in the retell_llm_dynamic_variables field of the Create Phone Call API:
All values in retell_llm_dynamic_variables must be strings. Numbers, booleans, and other types are not supported.

Default System Variables

UponAI provides these variables automatically — no configuration needed:

Phone Call Variables

Chat Variables

Nested Variables

You can nest variables inside system variable names:
If my_timezone is set to America/Los_Angeles, this evaluates to {{current_time_America/Los_Angeles}} first, then resolves to the actual time.

Handling Missing Variables

When a variable has no assigned value, it remains as raw text with curly braces intact:
Checking for unset variables: In Conversation Flow conditions:
In prompts:
Best practices:
  • Set defaults at the agent level as fallback values
  • Design prompts that work with or without variables
  • Test with both set and unset variable states
  • Document which variables are required vs optional