How do I set up the Selection step?
Offer visitors options: single or multiple choice, with options from a static list, a tool, a previous action or a variable.
Single and multiple choice
“Selection” offers the visitor options. “Selection type”:
- “Single”: the visitor picks one option. With a static list each option can lead to its own step: pick it in the “Target step” list under the option, or connect the option's handle on the canvas.
- “Multiple”: several options can be checked and the step has a single exit. When you switch a single-choice step whose options lead to different steps to multiple, you're asked “Remove the options' targets?”.
The picked value is written to the variable named in “Variable name”: the option's label in the agent's main language. Even if the visitor sees the option in another language, the variable gets the main-language label. “system” is reserved and can't be used as a variable name.
If the visitor picks an option without a target, the flow ends; the editor warns you that the option has no target.
Option sources
There are four kinds of “Option source”:
- “Static list”: you type the options yourself with “Add option”.
- “From a tool”: the options are fetched, when the step opens, from an endpoint you defined on the Tools page; with single selection they appear as searchable cards. Pick the tool in “Data source”, and enter fixed values or variables from earlier steps in “Tool fields”. “Fetch sample data” calls the tool once and finds the list in its response; then pick where the list is in the response with “List”, and the card's name with “Title field”. The “Subtitle field” (for example the city or price) is only there for single selection.
- “Previous action”: a list returned by an integration step that runs earlier in the agent (for example the cards in a Trello list). The picked item's name is saved to the variable, and its fields as {variable}_id, {variable}_url and so on.
- “From a variable”: a list written by an earlier step. Enter the list's variable in “List variable” (for example the result of an Edit List step).
“Fallback options” exist only for multiple selection: they are shown if the tool fails or returns nothing. With single selection, if the tool doesn't answer, the visitor sees an error and a button to try again.
To fetch data from your own system, first define a tool on the “Tools” page; see Tools.
Showing options as tabs
If the start step is a single-choice Selection with a static list, the “Show as tabs” checkbox appears; but it only works with exactly two options. When it's on, the options become fixed tabs at the top of the page instead of a one-time question; each tab runs its own independent session and isn't reset when switching. For each option, “Show the keyboard/microphone field on this tab” turns the input field on or off.
Related articles
- How do I set up Message, Question and Form steps?The basic steps that talk to visitors and collect details: Message, Question and Form, with the form's field types and validation rules.
- Tools: connecting the agent to your own systemsAdd your own HTTPS endpoints that the agent calls during a conversation to fetch live data or take an action.
- How do I set up the Edit List step?Filter, sort, de-duplicate and shorten a list from a tool, an action or a multiple choice.
- How do I set up the Condition step?Split the flow into paths based on earlier answers and variables: rules, And/Or, comparison types and “Otherwise”.