Getting started with the Power Platform AI Builder.

   Words by Paul McQuillan

   on 23/04/2021 15:00:00

Before getting into the Builder itself, I find it very useful to look at the established Sales Insights App for Dynamics – as this works in many similar ways and gives a view of what a potential end-point looks like.

But the real weight is in the Power Apps Maker and getting into the AI Builder proper.

clip_image001

Here we can create a new Model or examine the Test Model I’ve created for PJ in their Sandbox.

As this Model has had time to analyse the data, we can click in and get an idea of how its weighted the data it is looking at:

clip_image002

But if we click Edit Model, we can see how I’ve set this up.

What do you want to Predict?

First off, we define our Win State and Lost State that we want the Model to analyse for:

clip_image003

This allows us to pick the Entity, then a Field, and define what the Win/Loss States are for this Field.

Click NEXT and then we are onto the Data we want to analyse to see how the Data affects this Win/Lose State.

Review the Data going into your Model

This is essentially a Field Picker for the Entity we are analysing – but with the option to pull other Parent or Child fields into the mix as well.

clip_image004

My take here is that this would often go hand-in-hand with Dynamics Rollup Fields for analysing Child Entities – as MIN, MAX, SUM and COUNT fields up to the Opportunity will always be helpful in providing key metrics that are good for analysis.

This will work similar to traditional reporting where Option Sets, Lookups, Numbers and Currencies as ‘hard’ fields will be best for the Model to analyse.

Text is still fine, but often best when analysing segmental styles of text, such as Postcodes or City Names.

Filters

We can then apply Filters to our Model to control which elements of Data it looks at.

We can skip this and simply analyse all Opportunities everywhere – but when we run this we may want our Model to look at a particular Business Unit or Opportunity Type.

clip_image005

Train it..

With the Entity, Win/Loss States, Data and Filters set – the Model is ready to start analysing the data to compare how each Field or Metric is influencing the likelihood of leaning a record to the identified Win State or Loss State.

clip_image006

What next?

Now trained, we see our model presenting which areas of the data we have provided are the most influential in predicting whether a record will hit its ‘win’ state or ‘loss’ state – probably here expressing this a a positive or negative outcome is better terminology as this is not just for Opportunities with a traditional win or lost model.

We can now use the Model in a number of ways.

The most immediate is using Power Automate to query the model and populate fields about a record as a result, this uses the ‘Predict in Real Time’ action in Power Automate.

We call this action with a number of inputs from the record we want to predict and this then compares these values to the model we have trained:

image

This returns a set of values that we can insert into our record in Dynamics to describe what our Model predicts will happen .i.e. the rate of probability that the record will have a positive or negative outcome.

image

This breaks into three sets of information:

Explanation – a JSON document describing the Fields in the Input that have produced the predicted outcome, and how each has been weighted in the Model for this set of Inputs:

[{"entityName": "opportunity", "attributeName": "new_grossprofitpercentage", "weight": 0.3210554504840574}, {"entityName": "crmcs_projects", "attributeName": "crmcs_name", "weight": 0.28638559308774103}, {"entityName": "crmcs_projects", "attributeName": "crmcs_projecttype", "weight": 0.13992829903618048}]

Likelihood – the overall % chance that the model is predicting the right outcome

0.9806 = 98%

Prediction – the predicted outcome for our success/failure field; for an option set, this will be the numerical value of the option set value predicted by our model.

2

Here, the way this works is that our Model is effectively a Datasource that we can query at any time.

We query the Model with our combination of inputs and this consults the model to return these 3 outputs – effectively working as a typical Webservice that we can consult for information on our business and its predicted outcomes.

This is why the process plugs neatly into Power Automate as most actions in Automate are effectively calling out to REST Endpoints to retrieve information or invoke certain actions.

We can put this approach to use in a number of different ways.

  • Continue using Power Automate to read the information back and insert into Dynamics / Power Apps as a way of predicting in real time.
  • Call our Model via a Custom UI to present a graphical prediction in real-time.
    • This could be done within a record in Dynamics as a mini-dashboard
    • Or a wider Dashboard that presents the overall Model back to us
  • Build a number of Models and then use a Parent Model or set of Logic to crunch a number of Models into different predictions.

In these ways, we can use the Predictive Models to provide Insights back to our Dynamics Users and tailor what’s likely to happen based on our past data.

Further Reading

The following two articles show how to use the prediction model in Power Automate:

https://docs.microsoft.com/en-us/ai-builder/prediction-pwr-automate

https://docs.microsoft.com/en-us/ai-builder/predict-action-pwr-automate

Using your Model to predict a Range of Outcomes

https://powerapps.microsoft.com/en-us/blog/ai-builder-now-supports-predicting-multiple-outcomes-preview/

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

Calling a Power Platform AI Builder Model via oData How to use DocDrive365 to integrate permissions between Business Units in Dynamics with Sites in SharePoint Getting started with the Power Platform AI Builder. Power Apps Portal Information Hub DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Part 5 - Power Apps Portals: How To Connect Azure B2C With Linked-In Part 4 – Power Apps Portals: Styling Azure B2C for Power Apps Portals The 3 Phases for Using Multi-Select Option Sets in Flow with Microsoft Forms Part 3 – PowerApps Portals: Azure B2C and Power Apps Portals – User Flow for Signup and Signin Part 2 - Power Apps Portals: New Application Registration in Azure B2C for our Power Apps Portal Part 1 – Power Apps Portals: Creating a New Azure AD B2C Tenant The Automation Bot: Launching Contextual Flow from Teams Creating a New Bot for Teams Debugging your Teams Bot using Ngrok Adding a Microsoft Teams URL to a Dynamics Appointment Using Power Automate to Create a New Channel for a Record in Dynamics Connecting your Docusign Account with DocDrive365 for eSignature in PowerApps Showing or Hiding a SharePoint Metadata Column within Dynamics Running a Quick, Quick Campaign from Dynamics Dynamics for Sales: Use Word Templates to Export directly to PDF Newly Generated Documents in Dynamics or Power Apps do not save into SharePoint Synchronising Dynamics / Power Apps Security with SharePoint Adding the DocDrive Bot to each new Microsoft Team Microsoft Team for each Key Account using Conditional Rules in DocDrive365 Azure B2C–the Subscription is not Registered
Contact Us

Want expert advice or a demo?

Get in touch now and see how we can help your business grow.

  • Name
  • Email Address
  • Phone Number
 
Close

Understanding Your Challenges

Our strong understanding of CRM and emerging technologies within the Microsoft environment means we deliver the right solutions for you.

Proven Real-World Solutions

As a leader in the field of Dynamics solutions, our pedigree developing and delivering real-world solutions is unsurpassed.

Long Term Support

We provide support beyond our design, implementation and 'go-live' delivery using Sprints and continual updates to our AppSource apps.

CRMCS | Design by Thinktank Marketing | Citrus-Lime Limited

To improve your experience today and in the future, this site uses cookies. Read our full Privacy Policy & Cookie information here I Understand