Now onboarding Florida small businesses

Build an IVR menu

Combine Collect digits with case routing to build a press-1-for-sales menu that branches on the caller's input.

A standard IVR menu reads a prompt and routes the call based on which digit the caller pressed. In hey-quad, this is a single Collect digits node with cases wired off it — no separate branch node needed.

Steps

  1. Open the call-flow editor for your phone number.

  2. Drag in a Collect digits node after your Answer call step.

  3. Set the Prompt to something like:

    Welcome to Acme. Press 1 for sales, 2 for support, or stay on the line for the next available agent.

  4. Set Allowed digits to 12 (only 1 and 2 are valid).

  5. Set Max digits to collect to 1 and End-of-input key to blank — single-digit menus don't need a #.

  6. Add cases on the gather node:

    • vars.gatheredDigits == 1 → wire to your Sales queue enqueue.
    • vars.gatheredDigits == 2 → wire to your Support queue enqueue.
  7. Wire the right-edge out transition (the fallthrough) to the same place stay-on-the-line should go.

That's the whole menu. No additional branch nodes, no manual switch statements.

Why cases-on-the-node

The Collect digits node supports inline cases — when call.gather.ended fires, it dispatches based on the captured digit before falling through to the static on[event] map. This keeps the canvas clean: one node, one set of branches, no separate routing logic.

The same cases pattern is supported by Set / update variable, Branch on variable, and Run script.

Multi-digit collection

For PINs or extension transfers, set Min digits + Max digits > 1 and pick a terminating digit (typically #). The caller can submit early by pressing the terminating digit, or stop typing and let the Initial wait / Time between digits timeouts trigger the gather.

Validation + retries

  • If the caller presses an invalid digit (not in Allowed digits), the runtime fires call.gather.invalid. Wire a separate edge to retry with a "sorry, that's not a valid option" prompt.
  • If they don't press anything, call.gather.timeout fires. Wire an edge to a friendlier follow-up: "I didn't catch that — let me transfer you to an agent."
  • If you don't wire those edges, the runtime falls back to call.gather.ended with the empty-digit reason.

Common gotchas

  • Cases only run on the success event. A timeout or invalid attempt won't dispatch cases — wire dedicated edges for those failure modes.
  • Allowed digits is a whitelist, not a regex. It's just the literal characters the caller can press (digits + * + #).
  • Audio prompts work too. Switch the prompt type from Text to Audio and pick a recorded MP3 if you want a specific voice.