Infuse AI into Power Virtual Agent with No-Code

Last week I gave a talk on how you can extend Dynamics 365 using Bots (mainly Bot Framework / Azure Bot Service), I received a good amount of queries and feedback on the topic. One of them was to explore the capabilities of Power Virtual Agent as to what extend we could go further with this module when it’s still new, fresh and in public preview. Therefore, I decided to write this blog post to show you what are the different ways you can still make it pretty much useful in your projects.

Virtual Agent is still in public preview hence not recommended for production ready solutions.

Microsoft released AI Builder, a low-code artificial intelligence platform this June (2 months back – which is also in preview) with 5 major capabilities that includes;

  1. Prediction Model
  2. Object Detection
  3. Text Classification
  4. Form Processing
  5. Business Card Reader

If you try to search for the use-cases / how-tos for all of them, you will be able to find them out on  different blogs or websites as MVPs and other community contributors have started writing about this cool set of features. However, in my opinion, there was something missing and I chose the missing part to brief you how and where can you utilize that.

It’s assumed that you’re already aware of basics of Power Virtual Agent, AI Builder and Microsoft Power Automate. In case you do not know either of them, you may find it hard to understand but I won’t stop you from reading this post. In case of any questions (or you want to learn how to get started with any of them), feel free to reach out to me on twitter.

Binary Classification – A machine learning method

Binary Classification is a supervised learning technique to solve a machine learning problem. In simple words, it is to classify the elements of the data set into two (binary) groups. They can be either 1 or 0, true or false and so on. Now this technique can be used in predicting the following information;

  1. Which lead might purchase a product or service?
  2. Which transaction is fraud or legitimate?
  3. Is the customer eligible to get the loan or not?
  4. Which accounts might not pay their invoices on time?

By reading these examples, you must have got an idea that how useful it can get to predict or classify each of your record in your entity.

These use-cases can easily be implemented in PowerApps (Canvas, Model-driven or Portals) using low/no-code but as I stated in my start, to highlight the capabilities of Virtual Agent, I decided to come up with a potential use-case for businesses / financial institutions.

The Problem

You work for a financial institution which already has thousands of acurs to look for the provided customer information and verify it.

You need a solution to minimize this time and expedittive customers. Out of many products, you already have one product of Loan for your customers. When a loan application gets created in your CRM, your staff manually assess each factor (fields filled up by customer in the form) which is essential to win a loan and update the Loan Eligibility Status accordingly.

To assess each application, your staff requires at least 2-4 hoe the process of assessment.

The Solution

As we have learnt that the staff normally labels the Loan Eligibility Status to true or false as per some criteria, we can use Binary Classification technique to predict the Loan Eligibility Status value (ml term: label) of a new record based upon the historical data (ml term: features).

Therefore, I followed these steps in order to achieve my goal;

AI Builder

I created the Binary Classification model with around 79% accuracy using the Loan dataset which is already there on GitHub repo for PowerApps sample and elsewhere.

AI Builder Binary Classification Model

Power Virtual Agent

I created a new topic called ‘Apply for Loan’, defined some relevant utterances to that and added some questions for the customer which are kept in different variables.

Once customer provides all the answers, Virtual Agent will get the values from the variables and send them to Action (Microsoft Flow).

Virtual Agent for Dynamics 365

Power Automate

I have created a simple Flow which would just take a HTTP Request from the Virtual Agent as an Action and will pass the information to Dynamics 365 CRM to create a record. As soon as the record get’s created, the Binary Classification Model evaluates and updates the record based upon the criteria.

Microsoft Flow

 

For the sake of displaying the results, I have created a simple Canvas App to show the results.

Canvas App

You can always improve the model by including more features to it and this can also work for Update operations.

Coming back to our problem, this will definitely help the staff to evaluate the application quickly. It is that simple.

Until next time.

This post was edited again on 11th November, 2019