Conditions
A step can be conditionally shown or hidden based on the answer to a previous step. Set the condition field on a step to control its visibility.
A hidden step is never shown to the executor. If a hidden step is required, it does not block run completion — required is effectively ignored for hidden steps.
Simple condition
Show a step only when a specific answer was given to a previous step:
{
"id": "s-dm02",
"type": "text",
"label": "Describe the damage",
"required": true,
"condition": {
"when": {
"step": "s-dm01",
"op": "eq",
"value": true
}
},
"config": { "multiline": true }
}
This step is only shown if step s-dm01 was answered true. The when object has three fields:
| Field | Description |
|---|---|
step |
The step ID to evaluate (must appear earlier in the template) |
op |
The comparison operator |
value |
The value to compare against |
Operators
| Operator | Applicable types | Meaning |
|---|---|---|
eq |
all | Equals |
neq |
all | Not equal to |
gt |
number, rating |
Greater than |
lt |
number, rating |
Less than |
gte |
number, rating |
Greater than or equal |
lte |
number, rating |
Less than or equal |
contains |
multi_choice, text |
Array contains value / string contains substring |
not_contains |
multi_choice, text |
Array does not contain / string does not contain |
answered |
all | Any answer was given (non-null, non-skipped) |
skipped |
all | The step was explicitly skipped |
Compound conditions
Use op: "and" or op: "or" to combine multiple rules:
{
"id": "s-ph02",
"type": "photo",
"label": "Photo of the damage",
"required": true,
"condition": {
"op": "and",
"rules": [
{ "when": { "step": "s-dm01", "op": "eq", "value": true } },
{ "when": { "step": "s-dm02", "op": "contains", "value": "o-dm2" } }
]
},
"config": { "min": 1, "max": 5 }
}
This step is only shown if s-dm01 was answered true AND s-dm02 (a multi_choice step) included option o-dm2.
Full example — damage conditional flow
A vehicle inspection template where damage-related steps only appear when pre-existing damage is confirmed:
{
"id": "t-a3f9bc00-e29b-41d4-a716-446655440000",
"v": 1,
"name": "Vehicle outgoing check",
"sections": [
{
"id": "g-ext1",
"title": "Exterior",
"steps": [
{
"id": "s-dm01",
"type": "boolean",
"label": "Any pre-existing damage?",
"required": true,
"photo": false,
"geo": false,
"condition": null,
"config": { "true_label": "Yes", "false_label": "No" }
},
{
"id": "s-dm02",
"type": "multi_choice",
"label": "Damage type",
"hint": "Select all that apply",
"required": true,
"photo": { "min": 1, "max": 6, "annotate": false },
"geo": false,
"condition": {
"when": { "step": "s-dm01", "op": "eq", "value": true }
},
"config": {
"options": [
{ "id": "o-dm1", "label": "Scratch" },
{ "id": "o-dm2", "label": "Dent" },
{ "id": "o-dm3", "label": "Crack" },
{ "id": "o-dm4", "label": "Paint chip" }
]
}
},
{
"id": "s-dm03",
"type": "text",
"label": "Describe the damage",
"required": true,
"photo": false,
"geo": false,
"condition": {
"when": { "step": "s-dm01", "op": "eq", "value": true }
},
"config": {
"multiline": true,
"max_length": 300,
"placeholder": "Location and description of each damage item"
}
}
]
}
]
}
In this example:
s-dm02ands-dm03are hidden ifs-dm01is answeredfalse- If
s-dm01is answeredtrue, both follow-up steps are shown and required - The
progresscounter in webhook payloads reflects only visible steps
Limitations
- Conditions can only reference steps that appear earlier in the template — forward references are not allowed
- A step referenced in a condition must have been shown to the executor — you cannot reference a step that was itself hidden by a condition
- Conditions evaluate the answer at the time the executor reaches the dependent step — if the referenced step's answer changes, conditions re-evaluate
- Nesting depth: compound conditions support one level of nesting (
and/orof simplewhenrules). Nested compound conditions are not supported.