Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Predict and Improve Outcomes

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain what predictions and improvements are, and why they’re useful.
  • Add predictions and improvements to a Lightning record page.
  • Explain other ways to get predictions and improvements.

What Are Predictions, Top Factors, and Improvements?

Let’s review some terminology you encountered previously in this module. Here is an example of the Einstein Discovery panel that you’re going to add to a Lightning record page.  Einstein Discovery predictions panel on Lightning record page showing prediction, top predictors, and suggested improvements

  • A prediction is a derived value, produced by a model, that represents a possible future outcome.
  • Predictors are the variables that contribute to the predicted outcome. Top predictors contribute most significantly.
  • An improvement is a suggested action that a user can take to improve the predicted outcome. Improvements are associated with actionable variables which users can possibly control, such as the shipping method or a subscriber’s membership level.

Add Predictions to a Lightning Record Page

After a model is deployed, you can use it to retrieve and display predictions and improvements for a standard or custom object on a Lightning Experience record page.

  1. From Setup, in the Quick Find box, enter lightning app and then click Lightning App Builder.
    Finding Lightning App Builder in the Quick Find box
  2. Click New.
    Lightning App Builder with the New button selected
  3. Choose Record Page and click Next.
    Create a new Lightning page screen with Record Page selected
  4. When prompted, enter a label, select the Opportunity object, then click Next.
    Create a new Lightning page screen with the Label and Object fields filled in
  5. When prompted, select the Header and Right Sidebar template, and then click Done.
    Create a new Lightning page screen with Header and Right Sidebar selected

On the Lightning App Builder page, customize by adding components.

Lightning App Builder showing which components to drag to which part of the page

From the Lightning Components pane, drag these components onto the Lightning Page Canvas.

  • Highlights Panel to the header (1)
  • Record Detail to the left panel (2)
  • Einstein Predictions to the right panel (3)
  1. Select the Einstein Predictions component. In the Properties pane, use the Prediction lookup to find and select the model you want to use for predictions. The Lightning App Builder automatically shows deployed models that match the object associated with this Lightning record page.
    Prediction lookup showing deployed Predicted IsWon model
    When you select a model, notice that the Einstein Predictions panel is automatically populated. Einstein Predictions panel populated with preview information
  2. In this example, the prediction is 6.01, which represents the probability of the predicted outcome. Because the model is trained to predict IsWon, the probability of this opportunity being won is 6.01%, according to the model.
  3. In the Properties pane, for Positive prediction label, specify Predicted to Win. For Negative prediction label, specify Predicted to Lose. Then click Save. Now you can see how it works: Shows prediction component setting and previewNext, simplify this panel so it’s easier for your users to interpret.
  4. Clear Show prediction label and change the Title to Predict Win / Loss. Scroll down and clear Show Values for Predictors and Show prediction warnings.Settings panel for the Einstein Predictions component showing selections You streamlined this panel’s appearance with just a few clicks!
  5. Click Save.
  6. If prompted, click the Activate button, click Assign as the org default, and accept all defaults.
    Otherwise, click the Activation button on the toolbar, click Assign as the org default, and accept all defaults when prompted.

Let’s go look at your page.

  1. Click Back in the App Builder header.
  2. From the App Launcher App Launcher find and select Sales, then click the Opportunities tab.
  3. Select any open opportunity. You might need to refresh the opportunity page for the record page changes you just made to appear.Einstein Prediction panel on the Lightning record page for an Opportunity When a user views this record page, predictions are updated in real time. Each time you select an observation, the values for its predictor variables (Opportunity Type, Lead Source, Industry, and Amount) are submitted to the model as inputs, and then the prediction and improvements are returned as outputs and displayed here.

Where Else Can You Get Predictions and Improvements?

Once deployed, use Einstein Discovery models to get predicted outcomes and suggested improvements with clicks not code in:

  • Lightning record pages
  • Experience Cloud sites pages
  • CRM Analytics datasets using Data Prep recipes (predictions and improvements) and dataflows (predictions only)
  • PREDICT function used in process automation formulas
  • Salesforce flows (with Flow Builder)
  • Tableau flows, dashboards, and calculated fields

In addition, developers can use Einstein Prediction Service and the Insights API to programmatically interact with Einstein Discovery-powered insights, predictions, improvements, and related objects via REST or Apex API calls. 

Conclusion

This module is designed to give you a hands-on experience of using Einstein Discovery to solve a single binary classification problem. You covered a lot of ground in a very short time! Beginning with a business question, you prepared the data to answer the question, created a model and explored its insights to gain answers, evaluated and deployed a predictive model into Salesforce, and then used that model to get predictions and improvements on a Lightning page. 

So, what’s next in your learning journey of Einstein Discovery? Check out our Popular Learning Resources: Everything You Need on Einstein Discovery for links to online help, Trailhead, videos, blog posts, and other resources.

Resources

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback