{{variableName}} placeholders that get replaced with real values at runtime.
Variables show up in three places:
- On a flow variant — key/value entries the simulator hands to the customer-side model, so the simulated customer can answer the agent’s questions consistently
- On a run plan — named variables with a type and an optional default, referenced as
{{name}}, with per-attachment overrides when you attach flows - At runtime — a modal collects any values that still need filling in before the run starts
1. Variables on a flow variant
Each variant of a customer flow carries its own set of variables — key/value entries likename, account_id, or last_visit that the simulator gives to the customer-side model. When the agent asks “Can I get your account number?”, the simulated customer answers with the value you set, consistently, every run.
Editing variant variables
Open the variant and click the Variables chip (next to the Persona and Environment chips). From there you can:- Add variable — add a key/value row inline
- Apply a test profile — replace the variant’s entries with a saved test profile’s properties in one click
{{variable}} autocomplete
Text fields in the flow editor — the customer setup brief in Improv mode, step text in Scripted mode — support {{variable}} tokens with autocomplete sourced from your project’s property definitions:
{{name}}— flow-scoped properties, resolved from the variant’s variables{{persona.name}}— persona-scoped properties, resolved from the variant’s persona
{{ to open the autocomplete and pick a property, or keep typing to reference a new one.
2. Variables on a run plan
Run plans define their own variables in the Advanced section of the create-run page. Each run-plan variable has:| Field | Description |
|---|---|
| Name | Referenced as {{name}} in attached flows |
| Type | The value type (string, number, boolean, date) |
| Default | Optional. If omitted, the value must be provided before each run |
Per-attachment overrides
When you attach customer flows to a plan via the Attach flows picker, each attachment can override{{variable}} values for that flow. Overrides win over the values stored on the variant, so you can attach the same flow with different data — for example, one attachment with appointmentType: urgent and another with appointmentType: routine checkup — and each becomes its own set of test calls.
3. Providing values at runtime
If any variable lacks a value when you start a run — Run now, ⌘↵, or a “Fresh run” re-run — a modal collects the missing values first. It gathers, in one place:- Run-plan variables without defaults
- Flow variant values — per-variant values for attached scripted flows
- Persona property values — values for
{{persona.*}}references, which persist onto the persona for future runs
“Re-run with same data” replays a run’s exact captured snapshot, so it never prompts for variables. “Fresh run” builds new test calls from the plan as configured today and collects unresolved variables first.
Reserved variables
Some variable names are reserved for system use and resolved automatically:| Variable | Resolves to |
|---|---|
{{persona.*}} | Properties of the variant’s persona (e.g. {{persona.name}}) |
{{phoneNumberToDial}} | The phone number to dial for outbound simulations |
{{simulationJobId}} | The current simulation job’s ID |
Setting variables via the API
The REST API keeps the older naming: flows are passed in a
scenarios field, and runtime overrides are keyed by scenarioId.Pre-set variables when creating a plan
Add avariables object to each entry in scenarios when creating a run plan. The same flow ID can appear multiple times with different values — each entry becomes a separate test case:
POST /v1/simulation/plan
Override variables when triggering a run
Runtime values are passed in the request body when triggering a job. They override any values stored on the plan. Global format — the same values apply to every flow in the plan:POST /v1/simulation/plan/:planId/job
scenarioId:
POST /v1/simulation/plan/:planId/job
POST /v1/simulation/plan/:planId/job with no body starts the run as configured.
Related
Customer Flows
Author the flows and variants that variables plug into
Run Plans
Compose flows, personas, metrics, and variables into a reusable suite
Running Simulations
Trigger runs and follow them live
Personas
The customer identities behind values