Opportunity scoring with Model-driven Power Apps

The standard sales process in apps like Dynamics 365 Sales is primarily focused on ensuring that the potential deals identified by your sales staff are followed up and moved along the sales funnel stages as quickly as possible. The general idea is that once you acquire a sales lead and then manage to qualify that into a sales opportunity via your activities towards the potential customer, as many opportunity records as possible should reach the “close” stage and “won” status.

In reality, you should be focusing your energy on pursuing those sales opportunities that are the best fit for your organization to deliver products or services to. Not everyone you talk to should become your customer, because you can’t possibly make everyone happy. Either the customer realizes after making a purchase that they didn’t get what they expected, or worse, your delivery team ends up trying to satisfy a new customer who is unlikely to be satisfied with what they can reasonably deliver.

The key skill for any professional services organization in particular is to find the right customers for them. That’s how you can best achieve the two most important outcomes from your business: A) happy employees and B) happy customers. With this in mind, there should be an element in your sales process that provides systematic guidance on whether you are likely to be reaching your goals for both A and B.

An out-of-the-box Business Process Flow (BPF) for opportunity records in Dynamics 365 Sales will contain generic checklist items for capturing relevant data in each stage of the sales process (Qualify, Develop, Propose, Close). What we wanted to make a formal part of the Forward Forever sales process was to include a step where a structured evaluation is performed, to answer the question “is this the right opportunity for us to pursue or not?”

Capturing evaluation data into Dataverse

Since the Dynamics 365 Sales app is essentially a Model-driven Power App, we’ve got a lot of powerful features at our disposal to request inputs from the app user on any topic we consider to be relevant. The simple approach would have been to just add new custom columns on the opportunity table, but this didn’t sound like the most scalable way to implement an evaluation feature that might be relevant also outside the opportunity management process in the future.

What we ended up building for our own CRM (the “Business Forward” app) was a custom table called Evaluation. In this table we can then define all the criteria that the app user should consider when performing an evaluation on the sales opportunity. When planning our internal model, we ended up selecting in total 14 different dimensions that we want to use for evaluating how good a fit the opportunity is with the goals and values of Team Forward Forever. This is the end result:

Each scoring criteria is to be evaluated on a scale from 1 to 3 (0 means the field hasn’t yet been populated). The user who is the owner of the opportunity should provide his or her evaluation for each of these dimensions before moving from “Develop” to “Propose” stage.

Inside the data model all these criteria fields are whole number columns of the Evaluation table. We give them a description to be shown as the tooltip when hovering over the label on the Model-driven app form. Minimum value is 0 and maximum value is 3:

Since show just a whole number field to the end user wouldn’t deliver a very good UX, we’ve installed the open source Rating.PCF custom control developed by David Rivard into our Power Platform environment. This allows us to render each of the fields as rating control that uses icons from Microsoft’s Fluent UI.

To configure the control we’ll need to launch the classic Solution Explorer experience and edit the Evaluation entity form. For each criteria field we define the control to be used as the Rating.PCF, then set the icon to something that reflects the question being asked from the user. Like with our evaluation criteria “Empowering citizen development”, the icon to be used is from Fluent UI is “family”:

Now we’ve got a nice visual touch on both the data input experience as well as viewing the evaluation criteria entered by another user.

Calculating the score

Once we have the evaluation criteria data captured in Dataverse, it’s fairly simple to use these parameters to calculate a total score value for the opportunity. This is made possible by our design decision to not use a Choice column for the criteria data entry but rather a numeric data type like whole number.

We can add a new calculated column for the Evaluation table, called “total score”. Then we just define the formula to be a sum of all the field values included on our evaluation form:

If needed, we could of course add some extra weight for specific field values within the calculated field formula and increase their importance in the resulting total score. In our case, we’re treating every scoring criteria with equal importance, so the total score is simply a sum of all the 1-3 values entered by the user (via the Rating control that visually hides the fact they are entering a whole number into the database).

Aligning the data model

How does the evaluation record connect with the opportunity record? In practice what we’re looking for is a single evaluation entry to be associated with a single sales opportunity. Such a 1:1 relationship type does not natively exist within Microsoft Dataverse. However, we can achieve the same end result with a couple of 1:N relationships and a bit of creative XRM workflow usage. Check out my blog post on one-to-one relationships in Dataverse for a detailed description of how to build it.

This approach means that we’ve got the possibilty to show the associated evaluation record via a lookup field on the opportunity form, instead of it being just a related child record hidden away somewhere in the many menus of Model-driven apps. Adding an evaluation for the opportunity can therefore be done quite conveniently from the lookup field’s “New Evaluation” option.

We can also leverage the option to open the new evaluation record via a Main Form Dialog. This is essentially a modal window that pops on top of the opportunity record, allows the user to enter the evaluation criteria data and then return right back to where he or she started by closing the dialog.

The 1:1 data model also works to our benefit in showing existing evaluation data for the opportunity. As we have one single evaluation record to look at, we can easily present the evaluation score in a Quick View Form in the “scoring” section on the right side of the opportunity form. Notice that all this information is hidden until there has been an evaluation record associated with the opportunity, to further streamline the UI.

Finally, we are able to technically enforce this opportunity scoring step as part of our mandatory items to complete in the sales process. On the Business Process Flow control we can show a yes/no field “Evaluation Completed?” which is another calculated field. By having this as a required step in the “Develop” stage of the process, the user cannot move to the “Propose” stage before that field equals “Yes”. With it being a calculated field, no direct user manipulation of the value is allowed.

A similar enforcement approach could be used for much more complex scenarios of data collection during the sales process. We could implement stage gates that ensure not only the existence of data but also certain threshold values, for example.

However, in our case we wanted to keep things as simple as possible. We don’t want to burden the CRM system user with requiring too many fields to be filled. What we do want is to consistently gather data at the right time of the process, when sufficient information about the real world events is available.

Our scoring criteria

The real beef in this solution isn’t the customization tricks of how to make the Model-driven Power Apps UI and data model work. It is in making our company values and targets persistently visible in the everyday work that our digital tools aim to support to the fullest.

With this in mind, the current mechanism for how we’ve decided to score our sales opportunities is based on these dimensions:

  • Empowering citizen development – is this a top-down effort or a bottom-up innovation enabler?
  • Measurable business need – is the customer just automating a mundane task or will the solution actually take their business forward?
  • Positive impact to society – will this organization just make more money for its shareholders or can their actions improve the lives of a wider audience?
  • Scalable service delivery – can we leverage our existing products and patterns or will this be a fully customer specific project work delivery?
  • Continuous service – will we just build this single app and then say goodbye or is there a longer term customer relationship to be gained from this engagement?
  • Technology priority – are we building new delivery competence on a prioritized technology instead of repeating widely used patterns or using established/legacy technology?
  • Global fit – could this solution be used by people in several markets instead of just a single geography?
  • Output value – are we dealing with a unique business requirement or could this same solution be offered to a wider range of customers?
  • Referral value – is there potential for a customer success story to be published that we could use in future sales cases?
  • Resourcing fit – how we ll do the resource and skill requirement match the team’s near term availability?
  • Price – How likely can we meet the target price for T&M billable work or list price for products?
  • Network growth – Could we gain connections to potential new partners, customers, employees?
  • Sales velocity – How quickly can we move to billable delivery work instead of spending time in extensive presales and proposal work?
  • Passion – How seriously do we really want to deliver this solution?

A lot of different factors in that list. Yet we feel they are all worth pausing for a while to think through them, to help us focus our efforts on maximizing the satisfaction of both our employees and our customers. The more such evaluations we fill, the more we learn about the choices we actually make.

No opportunity will ever get full ratings in all the dimensions. Nor will a low score in a single area mean that it would be the wrong engagement to pursue. Everyday life is full of trade-offs that we just have to balance in order to keep moving forward. We believe that adopting a systematic approach that makes us ask ourselves “why” on a regular basis will help to ensure we’re consistently moving in the right direction.

Show me more apps running on Power Platform!

Are you interested in seeing examples of the kinds of apps we’ve built for our customers & ourselves by using Power Apps, Power Automate and Power BI? Check out the Forward Forever App Gallery for ideas and inspiration on what your organization could also achieve with low-code apps.


  1. Niels Lønberg
    2021-11-09 at 13:45

    Really good article, Jukka.

    I am currently revisiting our opportunity evaluation with a view to make it more user-friendly with the addition of these new features, e.g. using the Main Form Dialog to open the record and polymorphic lookups.

    Another cool thing with the option to open the evaluation record using the Main Form Dialog can also be used from the business process flow if you add the lookup there (by editing the form of the BPF entity/table). That makes it nice and easy for the user to update the evaluation at various stages of the process.

    1. Jukka Niiranen
      2021-11-09 at 13:52

      Thanks, Niels! Yes, that definitely sounds like a nice way to make the evaluation information persistently visible in the various BPF stages. Another way that could potentially streamline the UX in the future would be to leverage the modern commanding options and opening the evaluation page from a Command Bar button “evaluate”. There’s still some work to do for Microsoft to support the Power Fx based options on this front, though, so targeting the right evaluation record wouldn’t be a no-code job yet…

  2. […] app. (For examples on other ways you can customize the sales process, see how we implemented opportunity scoring in our own CRM […]

Leave a Reply