Comparing actions and dialog
Choose the right type of conversation for your use case.
Actions benefits
Using actions is the best choice when you want to approach the assistant with a focus on content. Actions offers the following benefits:
- The process of creating a conversational flow is easier. People who have expertise with customer care can write the words that your assistant says. With a simplified process anyone can build a conversation. You don't need knowledge about machine learning or programming.
- Actions provide better visibility into the customer's interaction and satisfaction with the assistant. Because each task is discrete and has a clear beginning and ending, you can track user progress through a task and identify snags.
- The conversation designer doesn't need to manage data collected during the conversation. By default, your assistant collects and stores information for the duration of the current action. You don't need to take extra steps to delete saved data or reset the conversation. But if you want, you can store certain types of information, such as the customer's name, for the duration of a conversation.
- Many people can work at the same time in separate, self-contained actions. The order of actions within a conversation doesn't matter. Only the order of steps within an action matters. And the action author can use drag and drop to reorganize steps in the action for optimal flow.
Dialog benefits
A dialog-based conversation is the best choice when you want greater control over the logic of the flow. The dialog editor exposes more of the underlying artifacts (such as intents and entities) used to build the AI models. The dialog flow uses an if-then-else style structure that might be familiar to developers, but not to content designers or customer-care experts.
How actions are different from dialog
If you are already familiar with dialog-based conversations, learn more about how actions compares.
Feature | Actions | Dialog |
---|---|---|
Automatic reset of context | ||
Keep track of context | ||
Collect info, as with slots | ||
Contextual entities | ||
Collect numbers (@sys-number detection) | ||
Detection of other system entities | ||
Connect to agent response type | ||
Free text response type | ||
Image response type | ||
Options response type | ||
Search skill response type | ||
Rich text editor for text responses | ||
User input validation | ||
Step logic validation | ||
Support multiple users by notifying them when simultaneous edits are made to the skill | ||
Use SpEL expressions | ||
Disambiguation | ||
Digression support | ||
Spelling correction | ||
Webhook (before or after every message) support | ||
Webhook (from a node) support | ||
Webhook (log all messages) support |
For some functions, there is parity but you follow different steps to implement the behavior you want.
- Jump-to: In actions, you can jump from one step to another. In a dialog, you use a jump-to to skip to a specific dialog node in the same branch of the conversation. With actions, you can jump to a different step within an action also. However, to do so, you use conditions on the intervening steps to prevent them from being processed, rather than using an explicit jump-to. The benefit of this approach is that it's easier to anticipate the path of a conversation and follow it later if there are not multiple jump-tos sprinkled throughout the flow.
- Slots: In a dialog, you add slots to a dialog node to call out a set of values that you want to collect from the user, and that you will take and store in any order. In actions, every step in the action acts like a slot. If the user provides information that address step 10 when answering the question to step 1, both step 1 and step 10 are filled. In fact, if you want step 10 to ask the question explicitly, you must select the Always ask for this option on step 10.
Want to get started with actions, but need features that are available from a dialog? Use both. Dialog is your primary conversation with users, but you can call an action from your dialog to perform a discrete task. For more information, see Calling an actions from a dialog.