Introduction
When developing bots, it's considered a best practice to develop specialized bots that automate specific business tasks. If you're a large, enterprise company with well-demarcated functional areas, this practice also makes practical sense and lets you scale your automation footprint more easily. Within a business function, bot developers can specialize, and they can implement, maintain, and extend bots efficiently.
However, while it's advantageous to have multiple—even many—bots that automate business tasks, this also means that a single bot might not be able to handle all of a consumer's requests. The consumer's requests might require the support of multiple bots, and this means that a bot-to-bot transfer of the conversation is required.
The importance of seamless transfers
Generally speaking, in a bot-to-bot transfer, what makes the transfer seamless to the consumer is passing the user's intent and/or message from the sender bot to the receiver bot. With this information in hand, after the transfer the receiver bot can immediately start the appropriate dialog. The result is a graceful, "warm" hand-off.
As an example, examine the illustration below of a Customer Service bot and a Savings bot engaged in a transfer. The Customer Service bot starts the conversation with the user, determines the user's intent, and passes that information to the Savings bot. As a result, the Savings bot can immediately pick up and handle the user's query.
You can transfer a conversation from one bot to another in two general ways:
- Automatic transfer via bot group
- Manual transfer via an Agent Transfer interaction or a LivePerson Agent Escalation integration
Importantly, both approaches allow for the transfer of the user's intent and/or message, which ensures a seamless hand-off.
Automatic transfers via bot group
What's an automatic transfer?
Automatic transfers use bot groups to support the discovery of bots that are qualified to handle requests and can accept transfers. You create the groups, assign bots to them, and enable collaboration. A bot can be a member of a single group. As a member, whenever the bot receives a request that it can't handle itself, it automatically checks within its group for another bot that can. If the bot discovers a capable bot, transfer of the conversation happens automatically.
During an automatic transfer, information about the conversation is automatically sent from the sender bot to the receiver bot. This ensures a seamless hand-off, allowing the receiver bot to immediately start the appropriate dialog flow.
The receive bot must have an active Conversational Cloud connection.
If there isn't another bot within the group that can handle the request, no automatic transfer occurs. Instead, the bot sends its fallback response to the consumer.
How is a receiver bot chosen?
The bot selection logic is as follows:
- Check for a pattern match in a dialog starter in the current bot. The first pattern match found is always used.
- Check for an intent match in a dialog starter in the current bot. If multiple matches are found, the one with the highest threshold (VERY GOOD or GOOD) is used. And if the matches have the same threshold, one is chosen at random.
- Check for pattern or intent matches in the dialog starters in the other bots in the collaborative group.
A note about step 3: When evaluating the collaborative group for a bot to trigger, each bot is examined one by one. Within the bot, pattern matches are checked for first, then intent matches. However, the order in which the bots are selected for examination isn't guaranteed. This depends on the order in which the bots are retrieved from the underlying database. The list is retrieved, and the first bot found in the list to have a match of either kind is triggered.
Why use automatic transfers?
Automatic transfers are designed to simplify your automation model and make it more robust. Because all bots within a bot group can talk to one another–automatically transferring requests when needed and possible–you don't need a "router" bot for routing user interactions between bots. With automatic transfers, the discovery and actual transfer both happen automatically and seamlessly within a bot group whenever needed.
There are still some times when you'll need to use a manual transfer instead:
- You want to transfer the conversation from a bot in one bot group to a bot in a different bot group.
- You want to transfer the conversation from a bot to a live agent.
Setting up automatic transfers
To set up automatic transfers for a group of bots, create the bot group. During creation of the group, enable collaboration for the group, and add the bots to the group.
While you can include a post-conversation survey bot in a bot group for grouping purposes, a survey bot doesn’t participate in automatic, bot-to-bot transfers.
Limitations
There are some limitations related to disambiguation.
Best practices
For bot groups that are collaborative (the Collaboration setting is enabled):
- If the group will include multiple bots, LivePerson recommends the use of the LivePerson engine for NLU.
- The group should not contain more than 15 bots.
- Make sure there is no overlap in the intents and patterns used by the bots.
Manual transfers
What's a manual transfer?
A manual, bot-to-bot transfer is one where you transfer the conversation to a specific skill that's assigned to a bot user agent. (In this way, it's very similar to transferring a conversation to a live agent.)
Manual transfers are done via:
- An Agent Transfer interaction (simpler, more convenient)
- A LivePerson Agent Escalation integration (more complex)
Why use a manual transfer?
You'll need to use a manual transfer in two situations:
- You want to transfer the conversation from a bot in one bot group to a bot in a different group.
- You want to offer the consumer a choice of options, and then transfer the conversation based on the consumer's response.
- You want to transfer the conversation from a bot to a live agent.
Making manual transfers seamless
In a manual transfer, you can automatically pass the intent and/or user message from the sender bot to the receiver bot by selecting the Transfer Bot Context slider in the Agent Transfer interaction (in Settings):
Or, if you've used a LivePerson Agent Escalation integration instead, you can do this in the integration:
No coding is required.
Enabling the Transfer Bot Context setting enables the use of a Transfer Bot Context object behind the scenes. This object contains the information about the conversation that is sent from the sender bot to the receiver bot.
During the transfer, the receiver bot checks for the availability of a Transfer Bot Context object. If the object is found, the bot then checks whether it contains an intent. If an intent is found, the dialog tied to that intent is triggered if available. If an intent isn't found, the bot then checks whether the object contains a user message and triggers the dialog that's matched to the message. If neither the intent nor the user message that are passed can be matched, the fallback message is sent in the receiver bot.
Overwriting the intent or user message
Occasionally, you might want to overwrite the intent or user message that is passed in the Transfer Bot Context object during a manual transfer. To do this, somewhere in the dialog before calling the transfer, use a "bot transfer" function:
- To overwrite the user message, use setBotTransferUserMessage.
- To overwrite the intent, you can use setBotTransferIntentbyDomain. The system will ascertain and pass the intent ID based on the provided domain name and intent name. Alternatively, you can use setBotTransferIntentID.
In our example below, we've overwritten the user message, and we've done this in the Pre-Process Code in the Agent Transfer interaction.
Sharing information between bots
In a transfer from one bot to another–whether automatic or manual–the receiver bot won't have all the context (variables, etc.) that you might have collected in the sender bot. To share this information between bots, use the Conversation Context Service.
Testing
You can't use Preview to test bot-to-bot transfers because the conversation doesn't go through Conversational Cloud.
Instead, deploy the bot and then test in the Conversation Tester and in a web client. You can practice deployment and testing in a web client using the Deploy the Bot tutorial.
FAQs
If I have collaboration enabled for a bot group, can I control how automatic transfers are performed?
When collaboration is enabled for a bot group, transfers happen seamlessly and automatically. You can configure the transfer message in the bot group, but this is the extent to which you can affect the behavior.
How many bot groups do I need?
There's no limit to the number of bot groups that you can create, but it's likely that you'll need just a few. In general, create a bot group whenever you want to divide the bots into groups, such that collaboration occurs only within the group. It's common to organize bots into groups based on business function. You could then further organize them based on environment.
Can I keep bot collaboration disabled and use bot groups only as a mechanism for grouping my bots?
Yes, this is perfectly fine. You can create a bot group for this purpose.
I currently have a routing bot that transfers control to other bots based on user intents. How will bot groups help in my case?
Bot groups make it easier for a routing bot to automatically transfer control to another bot. As an example, suppose you are a retailer with the following bots:
- A Routing bot
- An Order Status bot
- A Returns bot
The Routing bot is designed to have an initial conversation with the consumer and route the conversation to one of the other two bots. The conversation might look like this:
Routing bot: Hello, I am routing bot. How can I help you?
Consumer: I need to check the status of my order.
Routing bot: Let me transfer you to a chatbot that can assist you with your request.
Order Status bot: Can I have your order number please?
You can add all three bots to an "eCommerce Operations" bot group. When this is done, the Routing bot seamlessly and automatically transfers the control to the Order Status bot.
When the user enters, “I need to check the status of my order,” this maps to an "Order Status" intent that is handled by the Order Status bot. Because collaboration in the group is enabled, the routing bot automatically finds this association and transfers control to the Order Status bot.