Use prompt choice when you want the user to select one option of pre-defined list of options.
The choices are pre-defined and configured in advanced when you define Prompt Choice node. If you want to present your users with a dynamic list of options, see Prompt Catalog instead.
Prompt choices can be also used as an easy way to branch the conversation flow, using the on_select
operator.
select_prefered_color:type: promptprompt_type: choicemessages:- "What is your prefered color"choices:- title: "Red"value: ron_select:go_to: user_selected_red- title: "Green"value: g- title: "Blue"value: bon_complete:go_to: user_selected_color
Notice how the choices
property is configured: we ask the user select between 3 different options: Red, Green, and Blue whereas in the Red option we also configured the on_select
operator to branch the flow if users select this options. Otherwise, the on_complete
operator will take place.
Parameter | Type | Description |
choice | string | the |
choice_value | any | the |
Field | Type | Description | Example |
choices[] | object (PromptChoiceItem) | | |
Field | Type | Description | Example |
title | string | the choice name that will be prompted to the user | |
on_select | object (RoutingNode) | | |
variations[] | string | Alternative forms of writing that associate with this item. (e.g, for "TV" - "tv" or "television") | |