Setting up a bot action node in a dialog task involves the following steps:
- Open the dialog task to add the Bot Action node.
- Add bot action node in the designated place. For steps in adding nodes, refer here.
- The bot action window is displayed with the Component Properties tab selected by default.
- You can use the +/– against the node to Expand/Collapse the node
- once you expand the bot action node, you have the option to add various nodes – service, script, webhook, and/or logic nodes. Refer to the individual nodes for configuration details.
The following sections detail the properties for this node in the new dialog builder, introduced in v9.0 of the platform. For the details related to the older builder, refer here.
- On the Component Properties tab, under the General Settings section, you can modify the Name, Display Name, and Description.
From the node’s Connections tab, you can determine the node in the dialog task to execute next. You can write the conditional statements based on the values of any Entity or Context Objects in the dialog task, or you can use intents for transitions.
To setup Component Transitions, follow the below steps:
- On the Logic window, click the Connections tab.
- Under the Connection Rules section, you can select a node from the Default drop-down list.
- To configure a conditional flow, click Add IF.
- Configure the conditional expression based on one of the following criteria:
- Entity: Compare an entity node in the dialog with a specific value using one of these operators: Exists, equals to, greater than equals to, less than equals to, not equal to, greater than, and less than. Select the entity, operator using the respective drop-down lists, and type the number in the Value box. For example, PassengerCount (entity) greater than (operator) 5 (specified value).
- Context: Compare a context object in the dialog with a specific value using one of these operators: Exists, equals to, greater than equals to, less than equals to, not equal to, greater than, and less than. For example, Context.entity.PassengerCount (Context object) greater than (operator) 5 (specified value).
- Intent: Select an intent that matches the next user utterance.
- In the Then go to drop-down list, select the next node to execute in the dialog flow if the conditional expression succeeds. For example, if the PassengerCount (entity) greater than (operator) 5 (specified value), Then go to Offers (sub-dialog).
- In the Else drop-down list, select the node to execute if the condition fails.
- Click Save.
Action Node Connections
When an action node like service, script, etc are added to a bot action, the following connections can be configured:
- Node Connections – this option can be used to define the connection rules connecting to nodes within the bot action node. It can be configured to:
- any node within the corresponding bot action node;
- Not Connected;
- End of Bot Action – this would take the bot flow to the node connected to the bot action node;
- Bot Action Connections – this option can be used to define the connection rules connecting to a node outside of the current Bot Action. These rules would be applied to the bot action node as a whole.