choice Step
The choice step presents options to the user and routes based on their selection.
Syntax
Short Form
- choice:
"Email": continue
"SMS":
- done: "We will text you updates"
Full Form
- choice:
prompt: "How would you like to receive updates?"
options:
"Email": continue
"SMS":
- done: "We will text you updates"
freeform: true
freeform_handler: continue
name: "Delivery Preference"
Properties
| Property | Type | Required | Description |
|---|---|---|---|
prompt | string | No | Custom prompt for the choice |
options | object | Yes | Option label to target mapping |
freeform | boolean | No | Allow unlisted responses (default true) |
freeform_handler | target | No | What to do with freeform input |
name | string | No | Human readable step name |
Example With Variables
- choice:
prompt: "Your order total is ${{variables.order.total}}. Proceed?"
options:
"Yes": continue
"No":
- done: "Cancelled"