Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Einstein Discovery entry
How-to guide

Building a predictive model with Einstein Discovery

Building an Einstein Discovery model is a guided workflow inside CRM Analytics. Pick a dataset, define a goal, build the Story, evaluate the model, deploy as a Prediction Definition, surface in Flow or Lightning page.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 16, 2026

Building an Einstein Discovery model is a guided workflow inside CRM Analytics. Pick a dataset, define a goal, build the Story, evaluate the model, deploy as a Prediction Definition, surface in Flow or Lightning page.

  1. Confirm licensing and prepare the dataset

    Einstein Discovery requires CRM Analytics licensing. Prepare the dataset: a Salesforce object, an uploaded CSV, or an existing CRM Analytics dataset.

  2. Open Einstein Discovery in CRM Analytics

    App Launcher, CRM Analytics, Einstein Discovery. Click Create Story.

  3. Pick the dataset and goal

    Select the dataset. Pick the goal variable (Closed Won percentage, Time to Resolution, Customer Churn). Set the optimization direction (Maximize or Minimize).

  4. Configure predictors and exclusions

    Exclude variables that leak the target (variables only known after the outcome) or that should not be used for business reasons (Owner name, gender, race).

  5. Build the Story

    Click Build Story. Wait for the AutoML run. The platform evaluates multiple model families and picks the best performer.

  6. Review insights and performance metrics

    Open the Story. Review the Insights (which variables drive the prediction) and the Model Performance (accuracy, R-squared). Confirm the model is trustworthy before deployment.

  7. Deploy the model as a Prediction Definition

    Click Deploy. The platform creates a Prediction Definition referenceable from Flow, Apex, and Einstein Next Best Action.

  8. Surface predictions in the Salesforce UI

    Lightning App Builder, edit the record page, drag the Einstein Predictions component, configure the Prediction Definition reference. Predicted scores render on the record.

Storyremember

The central artifact containing the trained model, dataset, insights, and deployment configuration.

Goal variableremember

The target the model predicts. Numeric (regression) or categorical (classification).

Predictor variablesremember

The input features used to make predictions. Excluded variables are not used.

Prediction Definitionremember

The deployed model referenceable from Flow, Apex, and other Salesforce surfaces.

Insightsremember

Plain-language explanations of which variables drive the prediction.

Retraining scheduleremember

Configurable cadence (weekly, monthly, quarterly) for refreshing the model on new data.

Gotchas
  • Einstein Discovery requires CRM Analytics licensing. Standalone licensing is not available. Plan the cost as part of the broader AI investment.
  • Leaky predictors (variables only known after the outcome) generate models that look great in training but fail in production. Exclude them carefully.
  • Bias concerns matter. Variables like gender, race, or zip code (a proxy for race in many US markets) should be excluded unless explicitly justified. Audit predictor lists for fairness.
  • Model drift is real. Schedule retraining and review the drift detection alerts. A model that was 85 percent accurate at deployment may degrade to 65 percent in six months.
  • The Einstein Predictions Lightning component queries the deployed model on page load. Heavy use across many records adds page-load latency. Consider batch prediction with stored scores for high-volume scenarios.

See the full Einstein Discovery entry

Einstein Discovery includes the definition, worked example, deep dive, related terms, and a quiz.