Variables
Variable interpolation is used to pass dynamic data within Bot runtimes.
It allows values produced in one part of the system to be reused in another.
Voxtronics uses a unified syntax for variable interpolation across routing, adapters, transcripts, and pipelines.
Supported interpolation syntax
${variable}→ interpolate a variable value${a.b.c}→ interpolate a nested value$${variable}→ escape interpolation and produce the literal value${variable}
Examples
inputs = { payload = "${arguments}" }
inputs = {
payload = "${arguments}"
validation = "${validation}"
process_result = "${process_result}"
}
url = "https://example.com/hooks/${tenant_id}"
To render a literal interpolation expression, prefix it with an extra $:
value = "$${tenant_id}"
This resolves to the literal string:
${tenant_id}
Behavior
Variable interpolation:
- Supports nested paths, such as
${a.b.c} - Works across objects and sequences
- Is resolved at all levels, including nested values
- Preserves non-string values when the whole value is an interpolation expression
For example:
inputs = { payload = "${arguments}" }
If arguments is an object, payload receives that object, not a stringified version.
When interpolation appears inside a larger string, the resolved value is inserted into that string:
url = "https://api.example.com/users/${user.id}"
Scope
Variable interpolation is supported in:
- Adapters, such as passing intent data to external APIs
- Pipelines, such as passing results between steps
- Routing, such as using extracted values for decisions
- Transcripts, such as extracting and reusing user input
JSONPath extraction
Variable interpolation is separate from JSONPath extraction.
Use ${variable} when referencing an existing runtime variable.
Use $.field when extracting a value from the current response payload, such as a pipeline step service response.
For example:
[[adapters.multi_webhook_workflow.steps]]
id = "validate_request"
service = "validate"
inputs = { payload = "${arguments}" }
outputs = { validation = "$.data" }
Pipelines
Pipeline steps should use ${variable} for inputs and $.field for outputs.