Build your first IVR
Build a simple IVR: “Press 1 for sales, 2 for support.” This is the smallest useful call flow.
-
Create the flow with a
menunode as the entry point.{"id": "flow_01jzqwjn803wtnhc445bvjenzc", "name": "Main IVR", "version": 1, "start": "menu","nodes": [{ "id": "menu", "type": "menu", "data": {"kind": "menu","promptText": "Press 1 for sales, 2 for support.","maxDigits": 1, "timeoutSec": 5, "maxFailures": 2 } },{ "id": "sales", "type": "dial", "data": { "kind": "dial", "target": "2001", "targetType": "user", "timeoutSec": 25 } },{ "id": "support", "type": "enqueue", "data": { "kind": "enqueue", "queueId": "q_01j160r23gw5zkpfjme3fwzs5k" } },{ "id": "vm", "type": "voicemail","data": { "kind": "voicemail", "mailboxId": "vm_01jg8asp59ps9rtt7azhrhvcre" } }],"edges": [{ "id": "e1", "source": "menu", "target": "sales", "sourceHandle": "digit:1" },{ "id": "e2", "source": "menu", "target": "support", "sourceHandle": "digit:2" },{ "id": "e3", "source": "menu", "target": "vm", "sourceHandle": "timeout" },{ "id": "e4", "source": "menu", "target": "vm", "sourceHandle": "invalid" }]} -
Cover the edge cases. The
timeoutedge handles a caller who presses nothing; theinvalidedge handles an unmapped key (aftermaxFailuresre-prompts). Both go to voicemail here. -
Publish the flow by setting
is_published = 1. The router only loads published flows, and the version that ran is recorded on each call. -
Point a number at it. Set your DID’s route target to the flow:
{ "e164": "12025550123", "dest_kind": "flow", "dest_id": "flow_01jzqwjn803wtnhc445bvjenzc" } -
Call the number. You’ll hear the menu. Press
1to ring user 2001,2to join the support queue, or stay silent to land in voicemail.
Next steps
Section titled “Next steps”- Add business hours so after-hours callers skip the menu.
- Replace the
dialwith a ring group so a whole team rings. - See the full Flow Node Reference.