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.
- 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.
- From Setup, in the Quick Find box, enter
lightning app
and then click Lightning App Builder.
- Click New.
- Choose Record Page and click Next.
- When prompted, enter a label, select the Opportunity object, then click Next.
- When prompted, select the Header and Right Sidebar template, and then click Done.
On the Lightning App Builder page, customize by adding components.
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)
- 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.
When you select a model, notice that the Einstein Predictions panel is automatically populated.
- 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.
- In the Properties pane, for Positive prediction label, specify
Predicted to Win
. For Negative prediction label, specifyPredicted to Lose
. Then click Save. Now you can see how it works: Next, simplify this panel so it’s easier for your users to interpret.
- Clear Show prediction label and change the Title to
Predict Win / Loss
. Scroll down and clear Show Values for Predictors and Show prediction warnings.
You streamlined this panel’s appearance with just a few clicks!
- Click Save.
- 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.
- Click Back in the App Builder header.
- From the App Launcher find and select Sales, then click the Opportunities tab.
- Select any open opportunity. You might need to refresh the opportunity page for the record page changes you just made to appear. 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