Skip to main content
Custom variables let you write an assistant once and personalize every call. Instead of hard-coding a name, an appointment, or an account number into the system prompt, you reference a placeholder like {{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.

Variable reference syntax

Reference a variable with double braces — the preferred, JSON-safe form:
The legacy single-brace 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
  • Flow transfer node destination number and announcement
  • Flow warm transfer node destination number, caller announcement, and briefing instructions
  • Built-in tool texts — tool description, transfer announcement, warm-transfer hold message, connected message, briefing first message, summary instructions, end-call farewell, assistant-transfer pre-transfer message, and payment-collection prompt
So a transfer node can route each call to a per-lead number like {{handover_number}}, supplied via campaign lead fields, the API call’s variables, or the inbound variable-webhook — and a warm-transfer briefing can open with Hallo, hier {{assistant_name}} von {{company}} — Anrufer {{caller_name}}. See the Node reference for what each flow field controls. Spoken tool texts are substituted twice: once at call start with the resolved input variables, and again at the moment the tool runs — so values collected during the conversation (via set_variable or collect steps) are included and take precedence. For example, a tool node can call https://api.example.com/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 platform uses this precedence, highest first:
  1. Explicit — values passed with the call: API make-call variables, or a campaign lead’s custom fields mapped onto matching keys.
  2. Inbound variable-webhook — enrichment fetched at call start (see below).
  3. System variables — filled by the platform from call context.
  4. Default — the definition’s default_value.
A placeholder with no value at any level is left as-is.

Explicit values via the API

Campaign leads → variables

In a campaign, each lead can include free-form custom fields. At dial time, a custom field is mapped onto a variable with the same key, so a CSV column becomes a variable:
Here the 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 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 and Famulor calls it at call start to enrich variables — for example, to look up a customer by their caller number. This fires before the call starts; see Post-call webhooks for what Famulor sends after one ends.

Request

Famulor sends a POST with a JSON body:
The raw request body is signed with HMAC-SHA256 using the webhook secret configured for the assistant. The signature is sent in this header:

Response

Return the variables to merge:
These values override system variables and defaults, but explicit values supplied for the call take precedence. If the lookup fails, the call continues with the values already available.

Native automation (alternative)

Instead of a custom webhook, you can create an Automation with the Inject input variables trigger and bind it to the assistant. Add a Return variables action using the same { variables: {…} } response shape. If no matching automation is active, the configured webhook is used.

Verifying the signature

Always compute the HMAC over the raw request body bytes, not over a re-serialized object — re-serialization can change whitespace or key order and break the signature. Use a constant-time comparison.

Example request

API & MCP

  • GET /api/v1/assistants/{id}/variables — read the assistant’s variable definitions; scope assistants:read.
  • PATCH /api/v1/assistants/{id}/variables — replace the variable definitions; scope assistants:write.
  • MCP tools: get_assistant_variables, set_assistant_variables.
Full REST reference lives at docs.famulor.io. Use {{key}} everywhere you want a per-call value, keep keys snake_case, and give every variable a sensible default_value so calls degrade gracefully when a source is missing.