Getting started with the Power Platform AI Builder.

   Words by Paul McQuillan

   on 23/04/2021 10: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.


Here we can create a new Model or examine the Test Model created in the 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:


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:


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.


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.


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.


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.


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:


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.


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.


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 three articles show how to use the prediction model in Power Automate:

Calling a Power Platform AI Builder Model via oData ( 

Using your Model to predict a Range of Outcomes

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

HOW TO: Integrate SQL Users into Dataverse Teams HOW TO: Prepare to go LIVE on Linked-In! Creating a Homepage Canvas App HOW TO: Virtual Entities in Dynamics 365 Release Wave 2 New Feature: The Columns Button HOW TO: Search a date field in Microsoft Dynamics The Relevance Search COMING SOON to Power Apps Portals HOW TO: Manage Your Dynamics 365 Database Size (Video Included) Dynamics 365 Marketing vs ClickDimensions It’s time to pause, reflect and acknowledge a new era of inclusivity and collaboration. Part 2 - How to get the most from a Technology Expert – Asset Management Hub Property & Asset Management Hub Part 1 – Balancing CRM and Asset Management Scopes - Asset Management Hub Creating a Multi-Lingual PowerApps Portal How to Set Up a Microsoft Teams Site Using DocDrive365 Microsoft Teams - Adding a Microsoft Teams URL to a Dynamics Appointment Dynamics 365 Marketing – Customer Voice Survey Not Appearing In Emails? Using SQL Management Studio to connect to the Dynamics DB 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
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

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