Dynamic Variables
Dynamic variables are per-call values you supply to personalise every conversation. They're one of three layers the platform renders agent prompts against — see Template Variables for the full catalog of system__* variables and the resolution order.
This guide covers the three places dynamic variables can come from:
- Outbound dispatch: passed in the
voice_sessions.outboundrequest body - Inbound webhook: returned from your inbound webhook on every incoming call (see Inbound Variable Injection)
- Tool returns: written by function-calling tools mid-call (see Tool Variable Writes)
Syntax
Wrap variable names in double curly braces:
Code
Variables can appear in: brain.instructions, first_message.text, timeout.warning_messages, transfer destination descriptions, and any tool input the agent passes to a function-call.
Reserved namespace
Names starting with system__ are reserved for the platform — passing them in dynamic_variables is rejected with a structured warning. Use the catalog values listed in Template Variables → System Variables by reference; never set them yourself.
Passing Dynamic Variables on Outbound Calls
Include dynamic_variables in your outbound call request:
Code
Code
Code
Agent Configuration with Variables
Configure your agent's instructions to use the variables:
Code
Variables in Campaigns
When running campaigns, contact variables are automatically injected from each contact's record. Define custom fields on your contacts to pass additional data:
Code
The agent's instructions can then reference: {{contact.first_name}}, {{contact.company}}, {{product}}, {{renewal_date}}, {{discount}}.
Preview Variable Resolution
Before running a campaign, test your template resolves correctly. In the dashboard:
- Go to the agent's Brain tab in Agent Studio
- Use the Test panel to simulate a call with sample variables
- Check that all
{{variable}}placeholders resolve as expected
Unresolved variables appear highlighted so you can catch typos before going live.
Related
- Template Variables — full system variable catalog + agent vs dynamic vs system layers
- Inbound Variable Injection — webhook-driven population for inbound calls
- Tool Variable Writes — let function-calling tools mutate variables mid-call
- Outbound Campaigns — variables in bulk dialing
- Per-Call Config Override — combine variables with agent_override
- Agents — configure the prompt template
