Preparatory Notes for The Einstein Prediction Builder Accredited Professional exam : Part 2

Sunil Bhardwaj
8 min readJun 25, 2023

--

  1. Filter-Based Predictions with Einstein Prediction Builder

Get Started with Einstein Prediction Builder

  • Work Smarter with Einstein — Customers paying their Wi-Fi bills late lead to limited cash flow for the company, which in turn means you can’t pay your suppliers on time. This lack of predictability makes it tough to know which customers to prioritize in your communications. As an innovator, you are determined to find a way to minimize late invoice payments.
  • Make Predictions with Einstein — Einstein Prediction Builder lets you make predictions about any custom object and most standard objects with just a few clicks.
    If the Salesforce object that contains your prediction data already has a field that answers your prediction question, you can build a field-based prediction. If the predicted object doesn’t already have a correctly formatted field that answers your prediction question, no problem! Use filters to set up your prediction.
    Einstein Prediction Builder predicts the answers to yes/no questions and numerical questions.
  • Understand the Lingo — The Avocado Framework can help you visualize the relationships between the sets of data. The “avocado” lays out the structure of the data.

Einstein Prediction Builder Terminology

Build the Foundation of Your Prediction

Filter-based prediction with Einstein Prediction Builder

Setup >> Locate the Einstein Prediction Builder tile and click Get Started >> Review Terms >> Check I’m authorized by my company to accept these terms >> Click Try Einstein >> Click Get Started. >> Click New Prediction

On the Name & Type page, name your prediction Late Invoice Payment

Select the Yes/No prediction outcome. Then click Save & Next

On the Object page, search for and select the first Invoice object. Then click Save & Next

On the Segment page, click Segment of Invoices to define your segment and include customers that do not have automatic payments >> Here, you'll select which records to include in your segment. In the Include Records That box, leave it as Meet All Conditions. In the Field box, search for and select Autopay. In the Operator box, click the down arrow and select Does not equal. In the Type box, leave it Boolean. In the Value box, click the down arrow, and select True. Then click Save & Next.

Click Switch to Segment.

Einstein builds predictions on historical data, so checking to make sure that your dataset is sufficient helps make a valid prediction. Einstein requires a minimum of 400 existing records to build a prediction. For a binary (yes/no) prediction, we recommend a minimum of 100 records for each outcome. It’s always a good idea to check the data before you go to the next step because it helps confirm that you have enough records in your dataset for Einstein to build a prediction.

Build Your Prediction

Understand the Example Set

To predict the answer to a yes/no question, Einstein needs example records where the answer is definitely yes (positive examples), and example records where the answer is definitely no (negative examples). The example set is a set of data (usually from the past) you give Einstein to help it learn. Einstein can then predict results for records where we don’t know the answer to the question yet.

Include and Exclude Fields

When setting up your prediction, one of the steps involved is choosing which fields from your dataset to include. Since all of the predictive power comes from what data we choose for Einstein to analyze, selecting the right fields is important for getting accurate predictions.

Fields to Include

In short, include as much as you can. Use your knowledge of the business to choose which data is relevant. But remember, the more data you use in Einstein Prediction Builder, the better prediction it can be.

Fields to Exclude

In general, more data is better, but there are exceptions. For example, exclude fields that can introduce hindsight bias. Hindsight bias happens when a field is used as a predictor whose value can only be known after the predicted event occurs. Einstein automatically detects those but can miss some, so it’s always good to look through the fields yourself. There are other reasons to exclude fields, such as ethical and legal concerns.

Let’s create the example set using yes/no examples.

  1. For the Yes Example, leave the default Meet All Conditions selection for your filter.
  2. Select the Invoice Status field, the Equals operator, the Picklist type, and the Late value.

3. For the No Example, leave the default Meet All Conditions selection for your filter.

4. Select the Invoice Status field, the Equals operator, the Picklist type, and the Paid on Time value. Click Save & Next.

5. On the Included Fields page, review the fields for Einstein to analyze for the prediction. In this case, leave all the fields selected. Then click Next.

6. On the Records to Predict page, select Predict on all records that aren’t example records. Then click Next.

7. On the Score Field page, name the custom field that stores your prediction results. Name your Score Field Invoice Status Prediction.

8. Press Tab to auto-populate the API Name field. Click Save & Next.

9. Review your settings. To make a change, click Back.

10. When you’re satisfied with your settings, click Build.

It can take anywhere between 30 minutes to 24 hours to evaluate your prediction, depending on the size of your dataset.

Analyze Your Scorecard and Troubleshoot Errors

Understand Your Scorecard Results

After your prediction is finished building, view the results on the Einstein Prediction Builder scorecard. The scorecard reveals the big-picture metrics, like prediction quality and top predictors.

Since it takes anywhere from 30 minutes to 24 hours for Einstein to return results, let’s review a scorecard that’s already complete.

From the Setup page of Einstein Prediction Builder, click the dropdown arrow and select View Scorecard.

This takes you to the Overview tab of the scorecard, where you get a high-level summary of your prediction. The first thing to notice is the Prediction Quality graph, which gives an estimate of how accurate your prediction is expected to be. The Top Predictors are the top-five field values with the strongest impact on your prediction. Remember, each predictor is made up of a field and a value. Each predictor has an impact score, which is a number between 0 to 1 that represents the strength of the relationship between the predictor and the predicted outcome. So the higher the impact, the bigger the influence of the field on the predicted outcome.

Click the Predictors tab to look at other fields that influence your score. You can view all the fields included in your prediction: their value, impact, and correlation.

Correlation is a number from -1 to 1 that represents the direction of the relationship between the predictor and the predicted outcome. A positive value means that the predictor and predicted outcome tend to increase together, and a negative value means that one increases while the other one decreases. So if you see a negative value, remain calm and know that it’s the direction of the relationship, not necessarily a bad outcome. Just remember, a positive correlation means that the predicted outcome is more likely to happen, and negative means it’s less likely to happen.

When you’re done reviewing your prediction, go back to the Overview tab. If you’re satisfied with your prediction quality, click Enable. This activates the initial scoring of your data, and all the records in your prediction set will get a score stored in the custom field you created within the setup flow.

The scorecard is the first stop to learn about the quality you can expect from your predictions. Furthermore, it gives an overview of the data used in the prediction and which predictors were most useful in making this prediction.

Monitor and Utilize Your Prediction

Actionable ways to monitor your prediction can be found here: Einstein Prediction Builder: How Do I Know If My Prediction Is Working?

After monitoring your prediction, you can begin using it. Here are some ways to use the prediction you created in Salesforce.

  • Add the Invoice Status Prediction field to a list view and sort the scores descending so higher scores appear at the top. Invoices that are more likely to be paid late are listed at the top for everyone’s attention.
  • Add the Einstein Predictions component to the Invoice record page layout, so you and your users can see the top predictors that influence the score. The Top Predictors component gives you helpful information when you reach out to each customer.
  • Use your prediction along with business rules in an Einstein Next Best Action strategy or with Flow Builder.

Common Errors and Troubleshooting

Here’s the high-level recap of the Einstein Prediction Builder process.

  • Step 1 — Define Your Use Case.
  • Step 2 — Identify the Data That Supports Your Use Case.
  • Step 3 — Create Your Prediction.
  • Step 4 — Review, Iterate, Enable, and Monitor Your Prediction.
  • Step 5 — Build the Prediction into Your Business Workflow.
  • Step 6 — Measure Success and Iterate.

Happy Learning! ✍️

Please follow me at Twitter : https://www.twitter.com/sunilbhardwaj1

LinkedIn : https://www.linkedin.com/in/sunilbhardwaj10

References:

--

--

Sunil Bhardwaj

I'm Salesforce CRM Analytics Ambassador (2023 & 2022). I'm working with HCL as Salesforce Lead Consultant. I always enjoy helping people & being a Trailblazer!