This is a guide for designing a bot for routing to specific user skills using the conversation builder in Messaging. This is useful in a messaging environment to replace the behavior of a pre-chat survey with a routing question in the old chat product.
This article covers the following topics:
- Create the skills
- Create a Bot User
- Create the Routing Bot
- Create the Routing dialog
- Add Agent Connector
- Creating the Engagement
- Test the escalation
Create the skills
First, we need to create one Skill for the bot. This will be assigned to the Engagement and the Bot Agent user. Login to the Engagement Portal. See: How to Log in to the Engagement Portal
- Under Manage, click Users and Skills:
- Go to Skills then click Add skill:
- Assign a Name and Description:
Then, we also need to create a subsequent skill for each option that can be picked for routing:
Create a Bot User
We can now create a Bot user to add the skills we've created.
-
Log in to the Admin Portal. See: How to Log in to the Admin Portal
-
To create a Bot Agent in the Live Assist Admin Portal, follow these steps outlined in the provided article "Deploying a Bot" under the section titled "Create a Bot Agent in the Live Assist Admin Portal"
-
Edit the Nickname to "Routing Bot" (This bot will be your Agent connector)
-
-
Go back to the Engagement Portal. Then go to Manage > Users and Skills and click Users:
-
Access the recently created bot and proceed to modify the following fields:
Choose login method: API key
API key: Generate an API key (API Key will generate automatically)
Assignment > Assign Profile: Agent
Skills: Routing (your created skill for routing bot)
We then need to apply the other skills created to those Agents who can handle them. For example, if we wanted an Agent to handle both Sales and Customer Service, we would have to apply those 2 skills:
Create the Routing Bot
The next thing we have to do is create the bot itself.
-
Go to Automate. Under Build, click Conversation Builder:
-
Click New Bot
-
Then Custom Bot
-
Enter a Name for the bot
Name: Routing Bot
Description: Routes to Skills - Then select the language being used and then click Create Bot. This will then take you to the bot creation menu.
Create the Routing dialog
- Now you will need to add a New Interaction inside the Welcome dialog.
-
Add a 'Quick Reply Question'
-
Click ‘Quick Reply’
-
Set the title to ‘Customer Service’
Then, add another one for ‘Sales -
Name the interaction and type in a question text (ex: “How can I help you today?
-
Whenever a visitor starts a conversation, they should be presented with this quick reply question. To make this happen, go back to the 'dialog starter' within the Welcome dialog and then set the 'Next Interaction' to this quick reply question dialog.
- Select Add dialog.
-
You need to create separate dialogs for each option. Enter a Dialog Name (e.g. Route to CS) then click Save. You will then be provided with a dialog starter window:
-
For the dialog starter to match user input, you need to add some patterns:
This dialog starter will match exactly those phrases you typed in as a pattern and then trigger or display a response. Therefore, from the example above, if the visitor types in “Customer Service”, it will trigger the next action. -
The next action should route the customer to the appropriate skill. We can do that by adding Agent Transfer interaction in the dialog. This will transfer the conversation from the bot to a live agent. From the interaction selector menu, select Agent Transfer:
-
Specify the ID of the skill to which to transfer the conversation. Go back to the Skills section of User Management. Select the skill you’ve just created, as you need to reference the Skill ID:
-
From the URL, take note of the Skill ID. This is the number at the end of the URL.
-
Now, go back to where you left on the Conversational AI. Click the Settings icon in the upper-right corner of the interaction to open the Interaction Settings. Click the Advanced tab, and paste in or enter the skill ID for our 'Customer Service' skill that you took note of earlier. Click Save.
-
You can also modify the transfer message by clicking into the interaction and typing. Modify this message to say, "Transferring to Customer Service…"
Then set the ‘Next Action’ to Close Conversation.
Tip: It’s the same for many of the interactions, you can also change the Escalation name (e.g. 'escalation_7’) to be something more specific such as 'Escalating to CS' (This message is not displayed to customers, and it is simply a name for that specific interaction. To show up all the interactions, you can use the drop-down inside a dialog. You can also search for the specific interaction name.)
Now repeat the same steps for the other skills.
-
To proceed, please navigate back to the 'Quick reply' dialog and select the 'Next Action' option.
-
This will display a drop-down menu and from there, click on the Custom Rule button.
-
Once you have done so, create a new rule that will Escalate visitors to their selected Agent Skills. This will ensure that visitors are directed to the most appropriate agent for their needs.
- Name the Rule
- ‘Add Condition’ ‘Exact Value’ Enter Value (Ensure an exact match between this and the text provided in the Quick reply)
- Click the ‘Next Interaction’ and from the drop-down menu, select the corresponding Agent.
-
Transfer dialog (This is the dialog that triggers the session to be routed to the designated Agent skill ID. In this example it is named as ‘Escalating to CS’ or ‘Escalating to Sales’
-
Create the same for each reply or skill.
In the event that a visitor responds with information or a request that is beyond the bot's comprehension, they will receive the fallback dialog. To steer them back to the appropriate agent skill through the routing dialog, visitors must indicate the specific assistance they require. Therefore, it is necessary to adjust the subsequent action of the fallback dialog in order to re-prompt the quick reply question.
-
- Open the Fallback dialog.
-
Set the 'Next Interaction' to the quick reply question dialog.
Add Agent Connector
Adding an agent connector creates a connection between the bot and a bot agent. To add an agent connector:
- Go back to the Conversation Builder.
- Open the bot.
- Click the Agent Connectors from the top navigation bar. Click the More Items
button if you can't find the Agent Connectors from the top navigation bar.
- Click Add Agent Connector:
-
Under elect the User you recently created. For option Deploy to, select Production.
- Click Save.
- To fully deploy the bot, now you must start the agent connector.
Creating the Engagement
Finally, you need to create an engagement that is going to use this bot for routing. You can start a new campaign or add this to an existing one.
-
Under Engage, go to the Campaign Builder :
You can add your bot configuration to any Engagement or Campaign. However, in this example, let's create a new campaign and engagement. - Click Add campaign.
- Fill in the following values and select Add Engagement > Web:
- Next, pick any style template you would like to use.
-
On the Engagement settings page, ensure the following values are set:
Conversation Type: Messaging
Routing: This is the skill that the bot user has been assigned (Bot Skill) -
Customize the engagement widget to reflect your branding in the Engagement Window Studio. Then publish the campaign in order for the engagement to be displayed. You can do this by selecting Publish on the campaign.
- Make sure to enable the engagement:
Test the escalation
Now get the agent to log into the agent-messaging widget. This should now be set up and working on your demo page. You should now see something similar to the following which routes a chat to a skill as expected.
For in-depth guidance on how to create routing bots using ready-made templates, check out this article: Creating a Routing Bot