Configuring the dialog nodes to enable transfer between chatbots
If you have multiple chatbots for each line-of-business or locale, administrators can train IBM Watson Assistant Skills, so that a chat conversation is automatically transferred to another relevant chatbot. For example, if an end-user asks an HR-related question to IT Chatbot, the IT Chatbot automatically transfers the conversation to HR Chatbot. To read about the scenario and an example of conversation transfer between chatbots, see Utilizing multiple chatbots for each line of business.
How chatbot transfer works between different lines-of-business chatbots
BMC Helix Chatbot provides Transfer Chatbot Template with the out-of-the-box IBM Watson Assistant Skills. The template includes a dialog node to enable transfer to another chatbot.
- To use the out-of-the-box Skills, as an administrator, you must duplicate the template and then modify it with appropriate values of the line-of-business chatbots.
To learn more about leveraging the template, see To modify Transfer Chatbot Template to enable transfer between chatbots. - To use custom Skills, as an administrator, you must create a new dialog node in each chatbot Skills to enable transfer.
To learn more about creating a new dialog, see To create IBM Watson Assistant dialog to enable transfer between chatbots.
After the IBM Watson Assistant Skills is configured, the chatbot automatically transfers the conversation to another chatbot with the following message:
Let me route you to the <chatbot name> who can help you with that.
Important
If the chatbot transfer is configured in one of the following ways, an error is generated and the conversation is not transferred.
- For the same intent, transferring to the same chatbot from which transfer is initiated. For example, for intent I, Bot A transfers to Bot B and Bot B transfers back to Bot A.
- For the same intent, transferring from one chatbot to the second chatbot and then the third chatbot. For example, for intent I, Bot A transfers to Bot B and Bot B further transfers to Bot C.
How chatbot transfer works when chatbot Skills are not trained
If the chatbot Skills are not trained for transfer, the end-user sees a list of available chatbots. To disable the list of chatbots, see To disable the list of chatbots to manually transfer a conversation. The end user can then manually select a chatbot to transfer the conversation.
If the list of chatbots is disabled, the chatbot displays the knowledge articles related to the query.
How chatbot transfer works between multiple localized chatbots
The behavior of chatbot transfer between these chatbots changes according to the way you have configured localization for chatbots:
Chatbot transfer if you have multiple IBM Watson Assistant Skills for each locale
If you have multiple chatbots and each chatbot has localized IBM Watson Assistant Skills, then one of the following conditions must be true to ensure that a conversation can be transferred to another chatbot:
- The user locale must match the chatbot Skills locale.
- If the chatbot Skills is configured with only one locale, then the chatbot is available for transfer even if the user locale does not match.
- If multiple localized chatbot Skills are configured, and the user locale does not match with the localized Skills, then only the English chatbot is available for transfer. If English chatbot is not configured and the user locale does not match with the localized Skills, then that chatbot is not available for transfer.
For example, consider that you have the following chatbots:
BMC chatbot
IT chatbot
HR chatbot
French-HR chatbot
Each chatbot has localized Skills for English, French, and German.
The following table shows whether a conversation can be transferred to another chatbot based on the user's locale:
Chatbot transfer if you have enabled real-time translation
If you you have IBM Watson Assistant Skills for certain locales and have also enabled real-time translation for another locale, then a user conversation can be transferred to that chatbot.
For example, consider that you have the following chatbots:
BMC Chatbot
IT chatbot
HR chatbot
French-HR chatbot
You have localized Skills for English and French and have enabled real-time translation in German for BMC Chatbot.
The following table shows whether a conversation can be transferred to another chatbot based on the user's locale:
Before you begin
- Ensure that you have created multiple chatbots for each line-of-business. For more information, see Setting up chatbots for your line of business.
- If you want to enable transfer between localized chatbots, ensure that you have Leveraged the English Skills to create localized chatbot Skills or Enabled real-time translation.
- Ensure that you have a list of chatbots for which you want to enable transfer.
To add intents to specify when you want to trigger the chatbot transfer
In addition to your existing intents in the Skills, you must add new intents from which the chat conversation transfer is triggered.
- Create a new intent as described in
Defining intents
and fill out the following fields:
- In Intent Name, specify a name that indicates chatbot transfer.
For example, switch_to_HR_chatbot - In User example, type a phrase that the end-user might type after which you want to transfer the conversation to the HR chatbot.
For example, employee verification letter - Click Add example to add more phrases when you want to transfer to another chatbot.
For example, PTO request, change last name, and so on.
- In Intent Name, specify a name that indicates chatbot transfer.
You have now created an intent so that the Skills is trained to transfer to the HR chatbot when the end-user uses employee verification letter, PTO request, or change last name phrase in the conversation.
The following image shows an intent and user examples to trigger transfer to the HR chatbot:
(For out-of-the-box Skills) To modify Transfer Chatbot Template to enable transfer between chatbots
Warning
To avoid errors, do not delete the dialog nodes after adding them.
- Log in to IBM Cloud.
- Navigate to the out-of-the-box IBM Watson AssistantSkills that is provided with BMC Helix Chatbot.
- Click Dialogs and select the BMC - Transfer Chatbot Template node.
Click Node options and click Duplicate, as shown in the following image:
- In Enter node name, type a name for the duplicate node.
For example, Transfer to HR chatbot. - Move this new dialog node above the BMC – Search node.
- In If assistant recognizes, select #intent and set the appropriate intent that you created earlier.
For example, #switch_to_HR_Chatbot. In the context editor, add values to any one of the following variables:
Variable Value Example $chatbotId 30-digit chatbot URL ID that is generated in BMC Helix Innovation Studio.
You can get the ID from https://hostname/com.bmc.dsm.chatbot/index.html#/chatbot/window/30-digit-ID
ABCDEFGHIJK123LMNOPQRSTUV4XYZ $chatbotName Name of the chatbot where you want to transfer. Note: Do not enter the Chatbot Display name. HR Chatbot The following image is an example of a context editor:
- Save the dialog node.
(For custom Skills) To create a dialog node to enable transfer between chatbots
Warning
To avoid errors, do not delete the dialog nodes after adding them.
- Log in to IBM Cloud.
- Navigate to IBM Watson Assistant Skills that is provided with BMC Helix Chatbot.
- Take backup of the Skills.
- Create a new node to enable transfer between chatbots.
- Click Dialogs and select the “BMC – Search” node.
- Click Node options and click Add node above.
- In Enter Node Name, type a name for the dialog node.
For example, Transfer to HR Chatbot. - In If assistant recognizes, select #intent and set the appropriate intent that you created earlier.
For example, #switch_to_HR_Chatbot. Open the JSON editor and replace the existing text with the following text:
{ "output": { "text": { "values": [ "${actionResult.output.text}" ], "selection_policy": "sequential" }, "action": { "inputMap": { "chatId":"$chatId", "chatbotId":"$chatbotId", "chatbotName":"$chatbotName", "mappedResponses": {} }, "outputMap": { "result":"${actionResult.output.message}", "status":"${actionResult.output.success}" }, "actionTypeName":"checkChatbotExists", "waitForActionExecution": true } }, "context": { "chatbotId":"", "chatbotName":"", "transferQuestion": "<?input.text ?>" } }
In Context Editor, provide values to one of the following variables:
Variable Value Example $chatbotId 30-digit chatbot URL ID that is generated in BMC Helix Innovation Studio.
You can get the ID from https://hostname/com.bmc.dsm.chatbot/index.html#/chatbot/window/30-digit-ID
ABCDEFGHIJK123LMNOPQRSTUV4XYZ $chatbotName Name of the chatbot where you want to transfer. HR Chatbot - In the Then Assistant should section, select Skip user input.
Save the dialog node.
- Create a child node:
- Select the new node you created to enable transfer between chatbots.
For example, Transfer to HR Chatbot. - Click Node options and click Add child node.
- In Enter Node Name, type Validation Success.
- In If the assistant recognizes, type
$status="1"
In the JSON editor, replace the existing text with the following text:
{ "output": { "text": { "values": [ "${actionResult.output}" ], "selection_policy": "sequential" }, "action": { "inputMap": { "chatId":"$chatId", "question":"$transferQuestion", "chatbotId":"$chatbotId", "chatbotName":"$chatbotName", "mappedResponses": {} }, "outputMap": { "text": "${actionResult.output}" }, "actionTypeName":"transferChat", "waitForActionExecution": false } }, "context": {} }
- Save and close the JSON editor.
- In Then assistant should section, select Wait for user input.
- Save these settings.
- Select the new node you created to enable transfer between chatbots.
To test the transfer chatbot configuration
After configuring the dialog nodes to enable transfer, you can test the configuration in IBM Watson Assistant.
- Log in to IBM Cloud.
- Navigate to the IBM Watson Assistant Skill in which you have configured the dialog node for transfer.
- Click Try it and type the utterance that triggers the conversation transfer.
Verify the following occurrences:- The utterance hits the transfer chatbot dialog node.
- The chatbot ID and the Chatbot Name is correct.
- Use the same utterance in the transferred dialog node and ensure that it does not hit any other transfer dialog node.
To lean more about testing the dialog, see Improve your Skill in IBM documentation.
To disable the list of chatbots to manually transfer a conversation
By default, the chatbots are displayed in a list for the end-users. If you want to disable this list, complete the following steps:
- Log in to BMC Helix Innovation Studio and navigate to the Administration tab.
- Select Configure My Server > Chatbots.
- Click Global Chatbot Settings.
- Remove the Show dropdown of available chatbots for chatbot switching option.
- Click Save.
Related topics
Submitting service requests and providing feedback through chatbot interaction
Localizing chatbot conversations by using real-time translation
Comments
Hello,
Thank you for your query about the following error:
ERROR (14058): An attempt to transfer to another chatbot was blocked. Back-to-back chatbot transfer within a single request is not allowed. Occurred when switching chatbot at second time.
We have added a note on this topic to avoid this scenario.
Aaditi
get the chatbot id: the chatbot id is not included or visible in the URL I think the correct solution is to get the chatbot ID via the {}JSON view.
Log in or register to comment.