Action Followups defines what the bot should recommend the user after executing an action, in order to engage the user further in conversation. The bot can display a list of suggestions or ask if it can invoke another action, that might be contextually useful to the user after completing an action.
The actions configured as followups can be the same action or some other actions, but those respective actions should be available under that corresponding Skill.
Displaying a list of suggestions
The bot can be made to proactively suggest the users with what more they can interact with the bot. This would facilitate the user to easily trigger the next action that would be contextually helpful, after the execution of an action. By configuring such contextually helpful actions as followups, the bot would immediately display a list of predefined suggestions when the running action completes. When the user selects an apt suggestion, the action configured for that suggestion would be invoked as the next action.
Example :
Consider a bot that is built for a task management application. After creating a new task, it would be contextual to display the following as suggestions to the user - "Start this task", "Show my open tasks", "Mark this task as Important" and so on. If the user clicks on "Mark this task as Important", the action to update the task status would be invoked.
Configuring Dynamic Followup Suggestions
To make your bot to display a list of suggestions dynamically in runtime as a followup, that can be passed as a Map value to the 'followup' key of the Execution handler output, as shown in the following format.
You can also set the param values for the followup action so that they will not be prompted again to the user while executing that action.
{
"followup":{
"suggestions":[
{
"message":"<chat suggestion that needs to be displayed to the user>",
"action":{
"name":"<namespace of the action that needs to be invoked>",
"params":[
{
"name":"<param_name>",
"value":"<param_value>"
}
//add other params as necessary
]
}
}
//add other suggestions as necessary
]
}
}
Configuring Static Followup Suggestions
If you wish to configure Action Followups statically without using any code, then that can be configured in the Action's Details page itself by following the steps given below.
- Go to the Action's Details page of the Action to which you wish to configure the Followup Suggestions. Click ADD FOLLOWUP SUGGESTIONS under the FOLLOWUP SUGGESTIONS section.
- In the FOLLOWUP SUGGESTIONS pop-up window, do the following.
- Enter the appropriate suggestion texts in the text box under the SUGGESTIONS section.
- Click the drop-down under the MAPPED ACTIONS section and select the appropriate action to map with the given suggestion text.
If the parent action is private, then all the public and private actions available under a particular skill will be listed in the dropdown. If the parent action is public, then only the public actions available under that skill will be listed in the dropdown.
- You can add more suggestions and map them with their appropriate actions by clicking on icon, and remove any suggestion from the list by clicking on icon.
Note: Maximum of 5 suggestions can be added as followup suggestions to an action.
- The suggestions can be reordered using the reorder icon next to each suggestion's text box.
- Click the UPDATE button after configuring all suggestion texts and their mapped actions.
- The configured followup suggestions would be listed under the FOLLOWUP SUGGESTIONS section as shown in the screenshot below.
To make any changes to the existing followup suggestions list, click Configure in the FOLLOWUP SUGGESTIONS section and you can update them as per the requirements.
Note: If a particular action configured as followup suggestion was deactivated/deleted, then that action will be removed from the Followup Suggestions list automatically.
After configuring Followup Suggestions, the sample chat window would appear as shown below.
Prompting to invoke another action
In some cases, one action would be more appropriate to execute after an action rather than multiple actions. By configuring this action as a followup, the bot would ask the user with a prompt message to invoke this as the next action. The user can reply to the prompt with an appropriate message, and proceed with the conversation further.
Example :
In the same task management bot, the user might have an action to view his next task. After viewing the next task, it would be contextual to ask him, "Would you like to start this task?". The user can reply to this prompt with an appropriate message to invoke the action which would start that task.
If the followup action has many params, and if you wish your bot to prompt a particular param for its value as first among other params, then you can specify that param name in the followup action's configuration. You can also set the param values for the followup action so that they will not be prompted again to the user while executing that action.
To make your bot to prompt the user to invoke any particular action as a followup, that can be passed as a Map value to the 'followup' key of the Execution handler output as shown in the following format.
{
"followup":{
"prompt":{
"message":"<the message that needs to be prompted to the user>",
"param":"<name of the param that needs to be prompted for value at first when this action is executed>",
"action":{
"name":"<the namespace of the action that needs to be invoked>",
"params":[
{
"name":"<param_name>",
"value":"<param_value>"
}
//add other params as necessary
]
}
}
}
}