One of the features available in the Omnichannel Engagement Hub is the capability to escalate chats from power virtual agent or even a chat bot built using the azure bot framework to an available agent.
When using routing rules for a chat work stream, we can use pre-chat questions to assist with routing the chat to a team.
This blog will show how we can create routing rules to assign a chat to a queue based on the topic or other variables created within the power virtual agent bot. This will also be applicable to Facebook chats as well.
If you’re not familiar with the concept of routing conversations and how to set this up, I’ll refer to the Microsoft guide which provides some background and the basics to get started.
In order to route conversations, a context variable must be created and then used in the rule itself. The link below shows the list of attributes available as standard when a bot is escalated from a power virtual agent.
When a variable is created in a Power Virtual Agent bot, this variable is also passed through to the Omnichannel Hub and can be referenced in the routing rules.
The below image displays the ChatReason variable created within my Power Virtual Agent bot.
When a chat is accepted, information is made available to the omni channel routing agent via the contextItems variable in the payload response. This can be viewed by analysing the responses using the browser’s developer tools interface.
The name and value provided can be used within the routing rules in order to assign the chat to the appropriate queue.
The information passed from the bot can also be added to the notification template to provide information about the chat before the agent accepts the request or even be used to specify which agent script should be displayed to the agent when the chat is accepted.