Prompt Choice

Prompt Choice used when users need to select an option out of a predefined short list of options. In rich-UI platforms such as Messenger or Telegram, the options are rendered as Buttons.

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.

Example

select_prefered_color:
  type: prompt
  prompt_type: choice
  messages:
  - "What is your prefered color"
  choices:
  - title: "Red"
    value:  r
    on_select:
      go_to: user_selected_red
  - title: "Green"
    value: g
  - title: "Blue"
    value: b
  on_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.

Output

Properties

PromptChoiceNode

PromptChoiceItem

Last updated