Choosing what to do at the end of a step
By default, the steps in an action are executed in sequence from first to last. However, you can change this default in order to change what happens next. Used in combination with step conditions, this capability makes it possible for the conversation to follow many different flows depending on the customer's input.
To specify what happens when a step finishes, click And then.
Select an option from the drop-down list. The following options are available:
- Continue to next step
- Re-ask previous step(s)
- Go to a subaction
- Use an extension
- Search for the answer
- Connect to agent
- End the action
Continue to next step
This option processes the next step in the steps list. As always, the conditions for the next step are evaluated first to determine whether to show the step's response to the customer. This is the default selection.
Re-ask previous step(s)
This option repeats one or more steps that are listed earlier in the current action. These might be steps that the customer already completed, or steps that were skipped previously based on their step conditions.
You can use this option to handle situations where the customer has made a mistake and asks to go back to a previous point in the conversation. For example, you might include a confirmation step at the end of a process that asks the user whether the collected information is correct; if the user says no, you can return to the beginning of the process. This option is only available from a step that comes third or later in the steps list.
To repeat previous steps:
-
In the And then field, select Re-ask previous step(s).
-
In the Settings window, click to select any previous steps you want to repeat. You can select any step that precedes the step you are editing.
Note that only the selected steps will repeat, regardless of their And then settings. Therefore, if you want to repeat the entire action up to this point, you must select all of the previous steps.
The current step you are editing is automatically included in the list of steps to be repeated. To avoid an infinite loop, use step conditions to ensure that this step only executes when it is appropriate for previous steps to be repeated. For example, you might have a step that repeats previous steps only if the user answered
No
to a confirmation question; this way, if the user answersYes
, nothing is repeated and the action continues. -
Click Apply.
Any session variable values that were defined based on choices that the customer made in the repeated steps are cleared and replaced with the new responses.
There is no option to jump to a later step. Instead of jumping directly to a later step, control the flow through the intervening steps with step conditions or skipping steps.
Go to a subaction
An action that is called from another action is referred to as a subaction. This option switches the conversation flow to another action. If you have an action flow that can be applied across multiple actions, you can use a subaction to build it once and then call it from each action that needs it. For example, as part of an action to place an order, you might call a subaction that enables a new customer to create an account.
To call a subaction:
-
In the And then field, select Go to a subaction.
-
In the Settings window, click the Go to field and select the action that you want to call.
-
If you do not want to continue with the current action, click End this action after the other action is completed. You might use this option in cases where the customer decides to do something different; in this case, you want the conversation flow to switch to the subaction and not return.
By default, the assistant returns to the current action after the subaction completes. Any action variables or session variables that are defined in the subaction are accessible from subsequent steps in the calling action.
-
Click Apply.
Passing values to a subaction
Optionally, you can pass values to the subaction so the customer does not need to specify them again. For example, if your order-placement action collects the customer's name, you can then pass that information to the account-creation subaction. The step in the subaction that asks for the customer's name is skipped, and the value that is already specified is used instead.
To pass values to the subaction:
-
Click Edit passed values.
-
In the Edit passed variables window, click Set new value.
-
Select an action variable that you want to pass a value for. (The available action variables are based on the customer responses that are defined in the subaction.)
-
Select the value that you want to pass from the current action. You can select any available variable, or select Expression if you want to specify a different value.
-
Click Apply.
Use an extension
You can call an extension that has been added to your assistant in order to interact with an external service. For example, you might use an extension to interact with a ticketing or customer relationship management (CRM) system, or to retrieve real-time data such as mortgage rates or weather conditions. For more information about calling an extension, see Calling an extension.
Search for the answer
Plus
This option indicates that the assistant should use the IBM Watson® Discovery service to search an external data source for information related to the customer's question. To use this option, you must configure a search integration for your assistant. For more information about configuring a search integration, see Adding search.
Connect to agent
This option indicates that the assistant should transfer the conversation to a human agent. For more information, see Connecting to a live agent.
End the action
This option indicates that this action is complete. Any action variable values that were defined based on choices that the customer made during the action are reset.
This option can be applied to more than one step in a single action because an action can define more than one branch of a conversation, controlled by step conditions. For example, the open an account action might have one conversational flow for creating a checking account and a separate one for creating a savings account. Each branch might have its own final step. Identifying the final step helps analytical tools that follow a customer's progress through an action to identify the success or failure of the action.
Using “End the action” in the last step functions like “Continue to next step”.