Skip to content

Use variables in prompts, workflows, and routing

Supply variables in prompts, outbound calls, workflows, API requests, routing, and editor tests.

Reviewed

Variables let an agent use information you already have — a caller's name, a booking reference, a business name — instead of asking for it.

In the agent's instructions

Write the variable's name in double curly braces where you want the value to appear, for example {{business_name}}. If no value is supplied for a call, the agent simply doesn't have it, so write instructions that still make sense without it.

In an outbound or batch call

Supply a value for each variable when you start the call, so each call is personalised.

In a workflow

Use Data to pass to the agent to send values into the agent when the workflow starts a call.

In an in-call API request

Inside an in-call API's request body, use the metadata form of the variable rather than the plain name used in the prompt. The field's own helper text shows the exact format to use.

In call routing

Advanced SettingsCall RoutingInbound Routing can use call metadata values in its Redirect incoming calls conditions, so calls matching a condition route differently.

Testing with variables

In the Test panel, open Set test variables and enter values. These apply to your test only and are never used on real calls.

Related: Collect and extract call data, Configure call webhooks, Build a workflow, Share an agent demo.