Microsoft Virtual Agent for Dynamics 365

I wasn’t aware that Microsoft has built a solution, that simply allows any Power User to create their own, very functional conversational bot. I was always thinking, that creation of bots requires programming knowledge and therefore somehow is out of my radar, but it turns out I was wrong.

This August I met with a colleague. Elias was participating in Business Apps Summit earlier this year and came back full of outstanding knowledge that he was sharing in a very inspirational way. One of the topics he was presenting was Microsoft Virtual Agent. At first I was not convinced it has a potential, until I tried it myself. Let me introduce this extraordinary solution to you.

Virtual Agent screencast!

Dynamics 365 Virtual Agent

The solution basically is intended to allow Power Users to create conversational bots that will facing business user on a public web site or inside company. Today they have no direct connection to any context including user. All they “know” is provided by users themselves.

The only possibility for it to get access to your data (CDS, Dynamics 365, SharePoint) is via the Microsoft Flow action. Flow plays a role of the connectivity mechanism so use it wisely.

First – prerequisites

Important! Before you move one this solution is “premium”. By that I mean you need P1 PowerApps subscription to be able to create environment and solutions as well as P1 Flow subscription, to use Request/ Response actions.

To start playing with the solution first you need to join the preview program. Do it by signing-up here: https://va.ai.dynamics.com.

Next thing: you need to own an environment that is not a preview and is hosted in US. It is required then to create a bot:

Selecting correct environment for VIrtual Agent

Having all that set you can now start playing around. If you want to quickly get through Microsoft Documentation about the product, visit official page: https://docs.microsoft.com/en-us/dynamics365/ai/customer-service-virtual-agent/overview

Creating your first Virtual Agent

Next create your very first bot. Set its name and select the environment:

Creating new Virtual Agent bot

After a while you’re got to go. You can now visit bot’s settings to define what language will your users use to communicate, so that bot will be more likely identifying keywords related to selected model:

Setting language model for the bot

Next go to the “Topics”area. This is where the fun begins. “Topic” is basically the model of how your bot is working. It contains keywords and phrases that are used to trigger specific topic and then it’s model.

Here you can find couple of existing “user” and “system” topics, you can review them and alter, however I’ll focus on building a new one.

Topic – how to

To create new Topic simply click the “New topic” button above the list of topics:

Create new Topic in Virtual Agent

Next set its title and create list of phrases that will be used to trigger it so that bot will follow defined path of execution:

Defining trigger phrases in Virtual Agent topic

Conversation – how to

Conversation defines how the bot is interacting with end user. It always start when user types one of the defined trigger phrases and then follows defined flow.

Each step can be one of the defined and described below:

  1. Each displayed by bot message can be formatted using the very basic formatting. Also, it allows you to insert variables inside the message.
  2. End with survey – that is the ending step, that opens system Topic “End of Conversation”.
  3. Bot says – action that displays message from Bot.
  4. User says – action that waits for user interaction. It can either display user buttons with pre-defined responses or waits for user input that will be saved back to variable:
    1. Text – a regular string variable. Can be anything.
    2. Age – a positive number within the range of standard age.
    3. Number – a single positive or negative integer.
    4. Currency – a numeric currency value.
  5. Escalate – triggers system topic called “Escalate”. It requires your configuration before can be really used.
  6. Action – allows you to trigger Microsoft Flow. More about below.
  7. Go to – allows you to move user to any other, existing Topic, let it be User or System.

Important! So far no support for Adaptive Cards is present. However I heard product team has it planned. Stay tuned 😉

What also is important, is that the action “User says” can either save what user says to a variable so that it can be used later somewhere in the conversation, or immediately converted into branches, when what user can say is defined:

User says action in Virtual Agent

Action – how to call Microsoft Flow

To be able to call Microsoft it has to be present in any solution on the environment where the bot is being created (source: https://docs.microsoft.com/en-us/dynamics365/ai/customer-service-virtual-agent/how-to-flow). So the best way is to first create new solution and then to create new Microsoft Flow inside.

Next you’re ready to select the Flow from the list. Remember, that all the defined attributes for the input will require you to provide data (variables) and all defined for the output are going to be turned into variables:

Using Action with Virtual Agent

In the below example Flow is expecting two input values and will return two as an output:

Important! You can use markup language in variables returned by the Flow to somehow format the information. See what are the options here: https://docs.microsoft.com/en-us/flow/approvals-markdown-support

Testing

When you’re ready with the Conversation, check if it works fine. Use the “Topic checker” (similar “checker” you can find in Flow and PowerApps), to see if there are any issues in the logic of your Topic (e.g. unreachable actions):

Topic Checker in Virtual Agent

Next save it, then reload bot to start with the latest content. Next I encourage you to turn on “Tracing” functionality, so that you’ll be able to see how the Conversation is moving forward. And… start typing:

Testing Virtual Agent

Deployment

Now it’s time to release your bot so that it will allow your customers to use it. Today the only possibility to publish the bot is to either use a Demo Website:

Virtual Agent demo website

Or embed it, via iframe, on your custom web site, let it be WordPress blog, company site or SharePoint page:

Virtual Agent as part of SharePoint modern site

I heard on a grapevine, that there are also plans to let it work inside Microsoft Teams 🙂

Analytics

Last part of the Virtual Agent is analytics. They show you how your Agents are performing, how customers are satisfied and engaged, if bots are able to solve customers issues etc.:

Virtual Agent analytics

More about the analytics can be found here: https://docs.microsoft.com/en-us/dynamics365/ai/customer-service-virtual-agent/analytics-overview

The future and pricing

Information released during MBAS tells that Virtual Agent should become public starting October. Since it is a part of Dynamics 365 I believe it will be available for customers having D365 subscription. Even today playing with the tool requires premium licenses for Flow and PowerApps, although D365 will cost even more.

I hope you liked what you read and find it useful. If you need any help with setting it up or configuring don’t hesitate to contact me.