paint-brush
Automating Customer Service in Dynamics 365 with Power Virtual Agents: Part 1 - Text Chat by@thecognitiveservicesninja
201 reads

Automating Customer Service in Dynamics 365 with Power Virtual Agents: Part 1 - Text Chat

by Holger ImberyApril 20th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This article is the first part of a Kickstarter of two pieces. In this article and in the second part, I will focus on Power Virtual Agent in combination with Dynamics 365 Customer Service. The first article focuses on a text chat virtual agent with a handover option to a human agent, aka live chat. The second will demonstrate how to voice enable D365 and use voice bots.

People Mentioned

Mention Thumbnail
featured image - Automating Customer Service in Dynamics 365 with Power Virtual Agents: Part 1 - Text Chat
Holger Imbery HackerNoon profile picture


Integrating human and non-human agent support for your customer

This article is the first part of a Kickstarter of two pieces; in this article and in the second part, I will focus on Power Virtual Agent in combination with Dynamics 365 Customer Service. The first article focuses on a text chat virtual agent with a handover option to a human agent, aka live chat. The second will demonstrate how to voice enable D365 and use voice bots. Both pieces will demonstrate that it is possible to provide Omnichannel Customer service with human and non-human agents without a classical Contact Center installation.


Imagine a situation where your virtual agent is incapable of solving a query of your customer; that's the point where human-to-human interactions immediately come into play.


Table of contents

  • Configuring the power virtual agent

    • Modify escalate topic
    • Publish the bot
  • OmniChannel handover

    • Configure power virtual agent handover
    • Create application registration
    • Setting up OmniChannel for customer service
    • Configure OmniChannel for customer service
    • Create a queue
    • Create a workstream
    • Add a RuleSet
    • Add Bot to workstream
    • Add context variables
  • Test Handover

  • Conclusion


Configuring the Power Virtual Agent

Modify Escalate topic

First, we need to modify the default "Escalate" topic to display a meaningful message and handover to the human.


standard escalate topic



Modify the "Message" node with a meaningful message and insert a new "Transfer to Agent" node. By now, we leave the handover to the agent node empty, but this is where you could insert a summary for the human agent.


modified escalate topic



Publish the bot

After creating your Power Virtual Agent and modifying your "escalate" topic, it is time to publish your work to make it visible to the outside world.


Publish your bot


OmniChannel Handover

Configure Power Virtual Agent handover

It would be best if you had a working Dynamics 365 Customer Service environment to work with Omnichannel and human handover. As this is a Kickstarter, I will demonstrate how to start from nothing; you could even start with a 30-day free Dynamics 365 Customer Service trial.

First, we need to activate Agent Transfer with Omnichannel.



Configure Omnichannel




Press enable



We enable voice as we will use it in the second part of this Kickstarter. If there is no active subscription for D365 Customer Service, we can enable a trial and select the created environment to use with Omnichannel.


Start a trial if needed




Enter your email address




Launch trial



Remember your D365 URL




Select your new environment



Create Application Registration

After configuring these initial steps, we need to create an Application Registration in our Azure Active Directory. We go to the Azure Portal and select Application Registrations and "+Add".



Select App registrations



We give it a speaking name and select "Accounts in any organizational directory".



Configure App registration



After saving, we can get the Application ID of the Registration (red)


Remember your Application ID



and paste this ID to our Agent Handover Configuration in Power Virtual Agent.


paste in your Application ID




find your bot connected



Setting up OmniChannel for Customer Service

We need to add some extensions to our environment, to add some features, but everything you see below will work without any extension installed.


For only text (messaging) hand-off

Install Omnichannel Power Virtual Agent extension.


install extensions



If you still see the following warning after installing the Omnichannel Power Virtual Agent extension and don't need voice capabilities, you can safely ignore it.


ignore warning


For both text and voice hand-off

Install the following extensions in this order:

  1. Power Virtual Agents telephony extension
  2. Omnichannel Power Virtual Agent extension
  3. Omnichannel Voice Power Virtual Agent extension

Configure Omnichannel for Customer Service

Next, we will create a Queue, a Workstream, and Ruleset.

First, go to yourtenant.crm.dynamics.com/apps


Go to your D365 Dashboard



Select the "Customer Service admin center App"


Check bots' existence


Create a Queue

We create a separate Queue for Customers asking for human-to-human interaction.

We select the Type "Messaging" as a queue type.


Create a queue



see "users missing" message



and add some agents after completing it.


add at least one user



Create a Workstream

After creating the first queue, we generate a workstream to select the Work distribution mode and the fallback queue.


Create and configure a workstream



Next, we create a chat widget; you could use a different, more customizable chat window configuration. You can find an example in my "Create your first (voice-) bot" article.

Click "Set up chat" and configure it accordingly to the screenshots.


see "live chat required" message


configure live chat - part 1



configure live chat - part 2


configured live chat



Add a RuleSet

Next, we create a ruleset for handling the users.

create a ruleset



and create a new rule.


We do not need to configure a condition, as we want to allow every user to enter the queue and assume you have a 24/7 service.


create a rule



Add Bot to Workstream

We add our bot via smart assist bots' settings in the Advanced settings area.


Add bot to workstream


Add Context Variables


We need to add a first context variable to the workstream. We will use the va_Scope Variable.


test the chat, to display the context variables




see the context variables




add context variables



Create context variable



Test handover

Let's test the handover.

Go to your workstream, copy the code for the snippet, create an empty HTML-File, and paste the copied code into the body.


Copy code snippet



You will end up with something looking like this.


<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script id="Microsoft_Omnichannel_LCWidget" src="https://oc-cdn-public-eur.azureedge.net/livechatwidget/scripts/LiveChatBootstrapper.js" data-app-id="your data" data-lcw-version="prod" data-org-id="your data" data-org-url="https://your data.crm4.omnichannelengagementhub.com"></script>

</body>
</html>

Open the HTML File with your Browser and start chatting.


start the dialog


Ask the bot for a human agent.



ask for agent




In your D365 Agent Dashboard, you should see an incoming chat and can talk to yourself.


answer request




The agent can see the customer's dialog with the bot on the left side.



Explore interface




And can start to chat with the customer.



customers' view


Conclusion

Self-service helps you provide 24/7 effective and efficient customer service; with the integration of human handover, you can keep your customer satisfaction high.



Featured image by ThisisEngineering RAEng on Unsplash

Also published here.