How to Use Einstein Prediction Builder to Predict Opportunity Amounts

by Anastasiya Zdzitavetskaya, Director of Product Management at Salesforce

Opportunity amounts change throughout the opportunity lifecycle, so predicting the final amount when the opportunity is closed becomes extremely important for forecasting. It can also have a positive impact on your revenue since knowing what factors are associated with bigger deals can give you valuable insights, and you can re-design your business processes to drive more revenue.

In this example, we are predicting the final opportunity amount, given that an opportunity is “closed won”. We are excluding opportunities that were lost since those amounts represent estimates by salespeople and are not proven by real-life data.

We highly recommend that your read this post first, so you understand the context behind the frameworks we are using.

Defining a Use Case

The worksheet below discusses the value that the opportunity amount prediction would help drive.

Gathering Requirements

Now that you have identified your use case, let’s gather some requirements.

Planning Your Prediction

For the opportunity amount use case, our avocado framework might be structured like this:

  1. Dataset — all records in the Opportunity object. We want to exclude Lost Opportunities because it does not matter for our prediction what the estimated amount was for a lost opportunity. We will use a segment filter to select only records we want for our analysis: Stage Does Not equal to Closed Lost.
  2. Examples — all Opportunities in Closed Won Stage and where the final amount was greater than 0.
  3. Records to Predict/ScoreOpportunities in any other stage.

Tip: You do not need to specify positive and negative examples since it is not a binary classification (Yes or No question). For numeric predictions, you just need to specify which records to use as examples.

While every org may be a little different, enter information according to what the different data buckets would look like in your org.

Setting Up Your Prediction in Einstein Prediction Builder

  1. Select the “Opportunity” object and apply a segment filter.

2. We’ll be predicting a number (Opportunity Amount).

3. Add a new condition to specify that we want to only learn from opportunities that were won.

4. Include relevant fields. We recommend including all fields as you might get some unexpected insights; however, there are a few exceptions discussed in this post.

5. Pick the name of the field where your predictions will be stored. This is the field that will represent predicted opportunity amount.

6. Review and build your prediction.

Next Steps

After you created your prediction, you need to review the scorecard, iterate on your prediction, and enable your prediction to get scores. To see the predicted values, add the “Predictions” field (Predicted Amount) to the list views and page layouts.

If the quality of your prediction is too high, most likely, you have a hindsight bias, and you need to eliminate potential leakers. For example, “Sales Commission” is an obvious leaker since we can derive this field from Opportunity Amount.

If the prediction quality is too low, most likely, you need to include more relevant data — can you create formula fields to bring data from related objects? Ask your business experts what data they would need to estimate opportunity amount — if it is useful for humans, most likely Prediction Builder can learn from it too. Read more about prediction quality in this blog — Understanding the Quality of Your Prediction. To create the next iteration of your prediction, select “Clone” from the dropdown menu — it will save all your previous settings, and you just need to make some small adjustments.

Do not forget to go to the Details tab of your scorecard. Examine your top predictors and validate that they make sense from a business perspective. Sometimes, you will find some surprising insights there — i.e., positive correlation shows which values of the selected fields correspond to bigger deals (positive predictive factors), while negative correlation shows which values of the selected fields are associated with smaller deals (negative predictive factors). Do not be discouraged if the insights are obvious — this only confirms that Prediction Builder is picking up the right patterns in your data.

After a few weeks or months, you will get actual values for opportunity amounts, and you will know which opportunities ended up being won or lost. Then you can do a Predicted vs. Actual analysis to understand how your prediction is performing on real data, using salesforce reports or, if you have access to Einstein Analytics, this Accuracy Template AppExchange package we developed for you.

When analyzing predicted vs. actual for numeric values, it is important to look not only at absolute values but at % error as well. For example, if your opportunity amount was predicted to be $100,000, but it ended up as $90 000, an error of $10,000 is substantial in absolute terms (especially if a majority of your opportunities are less than $10K), but represents only a 10% error for this opportunity.

Besides showing the predicted amounts, you can improve your business processes to drive bigger deals — use Process Builder to automate task creation, use Einstein Next Best Action to show different recommendations based on the insights from the scorecard, and deploy personalized marketing campaigns for small, medium and large opportunities.

Finally, to assess the success of your AI project, always look back at your KPIs. Were you able to increase the win rate, revenue, and accuracy of forecasting? You can look at YoY or quarterly changes for comparison. Alternatively, you can conduct a pure scientific experiment with a control group. In essence, your pilot group will follow the improved business process with the prediction while the control group “gets the placebo.” If you see a substantial uplift in KPIs in your pilot group vs. control group, your project is a huge success, and you deserve a promotion. Next, you can predict the likelihood of being promoted, a promotion amount, number of days until promotion… — but with all seriousness, once you start predicting, it is hard to stop. Happy predicting!

Resources

  1. Introduction to Machine Learning
  2. How to turn your Idea into a Prediction
  3. Einstein Prediction Builder Toolkit
  4. How to Use Einstein Prediction Builder for Opportunity Scoring
  5. Which fields should I include or exclude from my model?
  6. Understanding your Scorecard Metrics
  7. Understanding the Quality of Your Prediction
  8. A Model That’s Too Good to be True
  9. Thinking Through Predictions with Bias in Mind
  10. How do I know if my prediction is working?
  11. Custom Logic on Predictions from Einstein Prediction Builder

For additional help on Einstein Prediction Builder, check out Salesforce documentation and our modules on Trailhead.

--

--