{{customer_name}} and supply the value per call — from your API request, a campaign lead, an inbound enrichment webhook, or the platform’s built-in system context.
Reference syntax
Reference a variable with double braces — the preferred, JSON-safe form:{customer_name} is also resolved, but only for keys that are actually known (a defined or system variable). This keeps literal braces — for example JSON in a tool body — intact. Any placeholder whose key is unknown is left untouched.
Defining variables on an assistant
Each assistant carries a list of variable definitions. A definition has:Keys are validated on save: invalid format, a collision with a reserved system variable, a duplicate key, or a missing label are all rejected.
Where variables are substituted
Values are substituted at call start, before the model or flow runs, in these fields:- Assistant system prompt
- Assistant first message (greeting)
- Flow node
start.greeting - Flow node
agent.instructions - Flow tool node request URL and header values
https://app.famulor.de/api/user/orders/{{order_id}} or send Authorization: Bearer {{api_token}} with per-call values.
Value sources & precedence
A value can arrive from several places. At call start the worker resolves each key with this precedence, highest first:- Explicit — values passed with the call: API
make-callvariables, or a campaign lead’s custom fields mapped onto matching keys. - Inbound variable-webhook — enrichment fetched at call start (see below).
- System variables — filled by the platform from call context.
- Default — the definition’s
default_value.
Explicit values via the API
Campaign leads → variables
In a campaign, each lead carries free-form custom fields (leads.custom_fields). At dial time, a lead’s custom field is mapped onto a variable with the same key. So a CSV column becomes a variable:
customer_name and appointment_date columns populate {{customer_name}} and {{appointment_date}} for each call. Give a lead-sourced variable source: "lead" to document the intent.
System variables
These keys are always available and filled by the worker at call start. They are reserved — you cannot define a custom variable with one of these keys.Inbound variable-webhook
For inbound calls you often don’t know the caller in advance. Configure a variable-webhook on the assistant (variable_webhook_url + variable_webhook_secret) and the worker calls it at call start to enrich variables — for example, looking up a customer by their caller number.
Request
The worker sends aPOST with a JSON body:
variable_webhook_secret, sent in the header:
Response
Return the variables to merge:Native automation (alternative)
Instead of a customvariable_webhook_url, you can create an Automation with trigger Inject input variables (call.variables) bound to the assistant. At call start the worker runs that automation synchronously and expects a Return variables action (same { variables: {…} } shape). If no matching active automation exists, the classic webhook URL is used as fallback.
Verifying the signature
Example request
API & MCP
GET /v1/assistants/{id}/variables— read the assistant’s variable definitions; scopeassistants:read.PATCH /v1/assistants/{id}/variables— replace the variable definitions; scopeassistants:write.- MCP tools:
get_assistant_variables,set_assistant_variables.