Build a phone menu (IVR)

Build a "press 1 for sales, 2 for support" menu with one Collect digits node and a case for each key.

Updated October 28, 20262 min readFor owners and admins

A phone menu plays a message and sends the caller somewhere based on the key they press. In Hey Quad, that's one Collect digits node with a case for each key. You don't need a separate branch node.

New to the flow editor? Start with Call flow how-tos.

Build the menu

  1. Open Call flows and open your flow, or click New flow.

  2. Add a Collect digits node after Answer call.

  3. Set the Prompt, for example:

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

  4. Set Allowed digits to 12, so only 1 and 2 count.

  5. Set Max digits to collect to 1, and leave End-of-input key blank. A one-key menu doesn't need #.

  6. In the node's settings, click Add case twice. For each case, leave the variable as vars.gatheredDigits, keep the operator as =, and type the key:

    • Case 1: 1
    • Case 2: 2
  7. Each case gets its own handle on the node. Drag from case 1 to a Send to queue node for Sales, and from case 2 to one for Support.

  8. Drag the No input handle to where "stay on the line" callers should go.

  9. Save, place a test call, then Publish….

The key the caller pressed is saved as text, so compare it to 1, not to a number.

When the caller presses nothing, or the wrong key

Cases only run when the caller presses a valid key. The node has handles for the other outcomes:

  • No input: the caller didn't press anything. In the menu above, that's "stay on the line".
  • Invalid input: the caller pressed a key that isn't in Allowed digits. Play "Sorry, that's not an option" and go back to the menu.
  • Got input: the caller pressed a valid key that no case matched.

If you leave No input or Invalid input unconnected, the call follows Got input.

Collect more than one digit

For an account number or a PIN, set Min digits to collect and Max digits to collect higher than 1, and set End-of-input key to #. The caller can press # to finish early. Otherwise the node finishes when they stop pressing keys, using Initial wait (ms) and Time between digits (ms).

Tips

  • Allowed digits is just a list of keys. Type the keys the caller may press, such as 123*#.
  • Use a recording instead of a computer voice. Switch the prompt to library audio and pick a recording. See Prompts and hold music.
  • Other nodes support cases too, like Set variable and Branch on variable. The node reference has the details.