Build a flow
Screens
Menus, inputs, routers and endings, and how a caller moves between them.
Menu
A menu shows a message, then its options numbered in order. The caller replies with a number and goes to that option's screen.
A menu's form has the message, and under it the options: each is a line of text and the screen it goes to. A menu called main_menu with the message Welcome to Example Bank and two options, Check Balance going to the PIN screen and Exit going to the goodbye screen, shows on the phone as:
Welcome to Example Bank
1. Check Balance
2. Exit
You do not type the numbers into the message. If a message already lists its options, the editor moves them into the options below so there is one place to edit them.
Keys such as 0 and *
An option can have a key, such as 0 or *. Callers can then press that key as well as the option's number. The option is still shown with its number.
Add Back puts in a ready-made option: the text Back, the key *, going to a screen that leads to this menu. A menu you make from another screen, by dragging an exit onto empty space or choosing New screen… in a form, starts with that option already in place.
A message for a wrong choice
When a caller replies with something the menu does not offer, they see Invalid choice. Try again. and the menu again. Message for an invalid choice replaces that text.
Choices from data
A menu can list entries that come from an API instead of, or ahead of, options you type. See API calls and data.
Input
An input asks a question, checks the answer against its rules, and saves it under a name. Its form has the message, Save the answer as, the rules, and attempts.
- Save the answer as names the variable. Later screens use it as
{{pin}}, and conditions can test it. - Rules are checked in order. The first one the answer fails shows its message and asks again. A rule can also carry a condition on the answer, written with
input, such asinput|int <= 500. - Attempts limits how many wrong answers a caller gets, and says where they go after the last one. Left empty, they can keep trying.
Router
A router shows nothing. It runs its actions straight away, such as an API call, and moves on to the first condition that matches, or to its fallback. Its form is only Where to go next: the calls to make, the conditions to test, and the fallback.
Use a router at the start of a flow to look the caller up before the first menu, or anywhere a decision needs no question.
End
An end screen shows a final message and closes the session. Its form is the message alone, which can carry names such as {{auth.balance}} like any other.
Where to go next
Menus, inputs and routers all have Where to go next. A route can run actions, then go to the first condition that holds, else to its fallback.
- On an input, the route runs after a valid answer.
- On a router, it runs as soon as the caller arrives.
- On a menu, it is optional. A route there overrides every option's own screen, so leave it empty unless all options should run the same actions.
Keep it short
Most networks show about 182 characters per screen, so keep each one under that.
A flow that needs longer screens, such as a statement, can tick Split long screens into pages in its settings. Long screens are then split into pages, with keys added for More and Back, and a menu's own options stay on every page.