Use a Dynamic Question step to offer dynamically created choices based on the output of a selected action
Required Editions
| View supported editions. |
| User Permissions Needed | |
|---|---|
| To build and manage Einstein Bots: |
Customize Application OR Modify Metadata OR Manage Bots |
Before you begin, create an Apex action or a Flow that returns a list of a list of values. Or create a list variable that holds a list of values. The merge field syntax for objects is {!Field}.
To gather information from your customer, your bot must know which entity to search for in the customer input to find the information (for example, date, location, and money). The bot also must know which variable to use to store it.
- From the Dialog Component Library, drag the Dynamic Question step onto the canvas.
-
In the Step Properties panel, enter the question from your bot to the customer in the
Ask a question field.

Note You can call standard fields in standard objects using the {!FieldName} format found in Object Manager. For custom fields, use the Field Name and include __c at the end: {!CustomField__c}. To call a specific record, use {!Record.Field}.To call an item in a list variable, use FieldName[X], with X referring to the location of the item in the list. Einstein Bots uses a zero-based index with list variables, you can call the first item of the list using FieldName[0].
- Under Choices to Display, specify the format of your choices (buttons or menus).
-
In the Action Type field, specify whether your answer values are from an Apex action,
Flow action, or a List Variable. Then select the action name or list variable in the new
dropdown.

-
Dynamic Choices require an Error Rule Action in case the dynamic choice generation
fails. Select Call Dialog or Redirect to
Dialog, and then define the appropriate dialog.

-
Select or create an entity that matches the information you want to gather and a
variable to store the answer.
When using Flow as the Action Type, the variable created to collect the output of the flow must be designated as a List Variable. -
Define the action if the dynamic list generates only one choice. The bot can skip the
question and auto-select the choice, or the bot can ask the question and display the
choice (useful in situations requiring confirmation).

- Save the dialog.