Select Instruction Type | Yext Hitchhikers Platform

The select instruction allows users to choose a value from a dynamic list of options.

The select instruction must be used in conjunction with the REST API instruction. This is due to the fact that the options for the dynamic list must be data stored in queryResults which comes from the API response.

A reply instruction can be used to:

  • Ask the user which option they would like (e.g., which appointment time works best)
  • Confirm previously collected data

The select instruction requires the following configuration:

  • fieldId - An identifier for the selected option. This can be used later to inform other instructions.
  • listSelector - This is the JMESPath, within queryResults, to a list that contains options that will be presented to the user.

This instruction also has an additional configurable option:

  • enableSuggestions - When this toggle is set to true, the bot will generate suggested replies for the user. This will be displayed as clickable messages at the bottom of the preview.

Example

{
  "select": {
    "instruction": "Have the user select one doctor based on the list of doctors from the previous step’s API response. Provide no more than three selection options",
    "listSelector": "response.modules[].results[]",
    "fieldId": "doctor_selection",
    "enableSuggestions": true
  }
},
Feedback