Using Power Virtual Agent Variables with the Omnichannel Engagement Hub

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.

https://docs.microsoft.com/en-us/dynamics365/omnichannel/administrator/routing-rules

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.

https://docs.microsoft.com/en-us/power-virtual-agents/advanced-hand-off

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.

Power Virtual Agent Variable

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.

Response received when Chat accepted in the Omni Channel Interface

The name and value provided can be used within the routing rules in order to assign the chat to the appropriate queue.

Omni Channel Routing Rule

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.

Omni Channel Notification with option selected within Power Virtual Agent

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.