Einstein Prediction Builder

This article is prepared by our Salesforce Administrator Dzmitry Pimenau.

Artificial intelligence today simplifies decision-making by improving forecasts, automates tasks, saves time and money, and also makes life easier. Using the capabilities of artificial intelligence will help make business more efficient and the efforts of employees more fruitful.

For example, in e-commerce, artificial intelligence that drives predictions for product recommendations has the potential to increase customer engagement, boost sales, and improve the overall customer experience.

When it comes to commercial relationships, there is the challenge of contacting customers who may forget to pay their bills on time.

In the retail industry, a lack of quality forecasts of the popularity of certain products can lead to shortages or overstocking, which affects profits and customer service.

In the hospitality industry, incorrect forecasts of hotel demand and bookings can lead to overcrowding or shortages, lack of demand for tours or other services, affecting customer satisfaction and booking profits.


Einstein Prediction Builder (EPB) can be used to build predictions based on a large number of fields within one object, whether they are standard objects or custom objects.

EPB can make predictions for these types of fields:

  • Checkbox
  • Specially-constructed formula fields
  • Numeric
There are two options for the predicted result: Yes/no or Numeric result.

1) Yes/no prediction.

Yes-or-no questions are some of the most common questions that AI can answer. The result of the prediction will not be a boolean value (yes /no), but a number in the range from 0 to 100.

2) Numeric prediction.

If we have a question in which the answer is a number (e.g. “How much revenue does this campaign bring?”) we should chose this type of prediction – it stores the result of analysis in numeric field in number format.
We should have a set of records (at least 100) in which the value of the predicted field is known. Our model uses these known records, analyzes the relationships and influences between this field and other values in the records, and based on this predicts the likely result for the field for the remaining records. The model is dynamically trained and corrects its predictions by comparing them with real values. The prediction results are recorded in the corresponding new field created by EPB.

Order of settings

In this article I’ll focus on the Einstein Prediction Builder (EPB) tool, and show the creation of a chain of automated actions based on the results of its work in the next part.

Generally, the chain for setting up forecasts and automating actions looks like this.

  • Setting up predictions in Prediction Builder
  • Setting up Recommendations (standard object)
  • Setting up Actions (based on Flows)
  • Setting up strategies in Strategy Builder
  • Adding Einstein Next Best Action to Lightning pages


In the example below I'll set up predictions for an imaginary service of car sales and maintenance Car Care. Some contacts are members of the full service support provided by Car Care, some contacts have been invited to the demonstration in the past and have declined offers to join the full support. The company would like to reduce demonstration and negotiation costs and focus on customers who are more likely to join full support. The customization process to create such a prediction is described below.

Setup of the Prediction Builder

1) Setup > Einstein Prediction Builder > new Prediction

As described above, we have two options to choose the type of prediction: yes/no type or numeric type.

Predictions values are not stored in the same fields. To store predictions results a new number-format field will be created by Prediction Builder.
2) When setting up, we select the object for which the predicted result is being built and specify the segment (filters for records) to which the predicted result will be applied.
In the example we have a field on the Contact object called "Full Service Support Contributor", indicating whether a contact is joined to full service support. We want to create a predicted outcome for each contact who hasn't yet joined, estimating the likelihood of them purchasing such a service.

3) We need to provide examples for 'Yes' and 'No' predictions. In the example, 'Yes' branch is based on the checkbox value 'Full Service Support Contributor’ = true, indicating a likelihood of subscribing to full service support. For the 'No' branch, it's based on 'Rejected Full Service Support’ = true, suggesting a lack of interest in the full service support at this time.
Important: in this step we should double-check that there are no intersections in ‘Yes’ and ‘No’ example sets.
4) In the next step is the option to choose which fields should be included in the analysis (by default, all fields of records), we can disable fields that are not relevant for prediction for more accurate results. Salesforce recommends including as many fields as possible but excluding 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.
5) On the Records to Predict page, select Predict on all records that aren’t example records. At the last step, on the Score Field page we have to create a field where the estimation of the predicted results will be saved. This field will become available for adding to the record page layouts.
6) After settings review click Build button. It can take between 30 minutes to 24 hours to evaluate the prediction, or even a bit more depending on the size of the dataset.
Important: when building predictions the best approach is not to do manipulations with the object (e.g. add or delete fields, rename API field names, etc.) to not broke the process of building.
When prediction is built it should be enabled to add values to the score fields.

Prediction metrics

Once the construction of the prediction is complete, the results are presented on the Einstein Prediction Builder scorecard. This scorecard shows different statistics, detailed data, metrics such as prediction quality and top predictors. The most important are:

  • Prediction Quality graph – gives an estimate of how accurate the prediction is expected to be.
  • Top Predictors – the top-five field values with the strongest impact on the prediction.
The Predictions tab contains other fields that affect the score, impact and correlation.

  • Predictor is assigned an impact score, a numerical value ranging from 0 to 1, reflecting the intensity of the relationship between the predictor and the outcome.
  • Correlation is value between 0 and 1. A positive value indicates a tendency for both the predictor and the predicted outcome to rise together, while a negative value suggests that as one increases, the other tends to decrease.
Important: when prediction quality is too high (>95%) it can be a sign of bias in prediction; the low quality of predictions most likely means that we don’t have enough relevant fields to create good predictions.
Predictions will change as new data become available, and some previously identified patterns may become irrelevant. Prediction Builder will automatically re-evaluate and rebuild predictions monthly to update them. This process has an iterative basis.


After completing the process of prediction building an Einstein Predictions component can be put to the lightning page.
Another good way to see all predictions is creating a new list view with the fields we want to see.


The Try Einstein version of the EPB lets to build up to 10 predictions and enable one at a time. There is also an access to the most features.

The paid version of the EPB is available with the Einstein Predictions and CRM Analytics Plus licenses. The Einstein Predictions license lets to build up to 20 predictions and enable up to 10 of them at a time. The CRM Analytics Plus license lets to build up to 45 predictions and enable up to 35 of them at a time.

To update the version, it’s needed to have an Einstein Predictions, CRM Analytics Plus or Platform Plus license.