Skip to content

PranavNagrecha/AwesomeSalesforceSkills / skills/admin/einstein-discovery-setup

einstein-discovery-setup

Verified

Use this skill when an admin needs to create an Einstein Discovery story in CRM Analytics Studio, configure prediction definitions, deploy writeback fields, set up what-if analysis, or manage model refresh and activation. Trigger keywords: Einstein Discovery story, prediction definition, writeback field, CRM Analytics Studio, model refresh, what-if analysis, bulk scoring, prediction field, 1OR prefix. NOT for the Einstein Discovery Flow action or model-health monitoring in Model Manager — use admin/einstein-discovery-deployment. NOT for Einstein Prediction Builder, a separate product needing no CRM Analytics license — use agentforce/einstein-prediction-builder. NOT for programmatic scoring through the Connect REST API — use agentforce/einstein-discovery-development.

references/well-architected.md

View on GitHub
# Well-Architected Notes — Einstein Discovery Setup

## Relevant Pillars

- **Security** — Einstein Discovery writeback fields require explicit field-level security assignment after creation. Without FLS, prediction scores are invisible to all users, creating a gap between what is being scored and what is accessible. Admins must treat FLS assignment as a mandatory deployment step, not an optional one. Additionally, the explanatory variables selected for the story determine what data Einstein processes — including potentially sensitive fields — so data governance review of included fields is appropriate before story deployment.

- **Reliability** — Model drift is the primary reliability risk. Because refreshed model versions are not automatically activated, it is easy for a production Einstein Discovery deployment to silently score records against a model trained on months-old data while appearing fully functional. Reliable deployments require an operational process — not just a technical one — for reviewing and activating new model versions after each refresh.

- **Operational Excellence** — Einstein Discovery setup introduces ongoing operational obligations: model refresh scheduling, post-refresh activation, bulk scoring job monitoring, and writeback field auditing. These are admin-managed tasks with no automated reminders in the platform. Runbooks documenting each recurring step are essential for sustainable operation. Teams that configure Einstein Discovery and then treat it as self-maintaining will encounter silent model drift, stale scores, and eventual data quality issues.

Note added 2026-10-03: the statements above about default field-level security, activation after refresh, and bulk-only scoring are help-only claims (UNVERIFIED (2026-10-03)). Grounded additions: a prediction definition (`DiscoveryGoal`) holds up to ten active models with ordered segment filters; removing its `pushbackField` deletes the writeback field; model fields carry `isSensitive` and `isDisparateImpact` flags for fairness review (Security); and `terminalStateFilters` define the observed outcomes used for accuracy monitoring (Reliability).

## Architectural Tradeoffs

**Insights-Only vs. Insights and Predictions:** Choosing "Insights only" avoids writeback field creation, FLS concerns, and scoring job management, but provides no live scores on records. This is appropriate when the team's goal is analytical exploration (understanding what drives outcomes) rather than operational scoring (surfacing predictions on active records). Choosing "Insights and Predictions" adds operational overhead but enables record-level scoring and what-if analysis.

**Writeback field vs. developer API scoring:** Using writeback fields (admin path) gives admins control without code, but scores are only as fresh as the last bulk scoring job. Using the developer API (Connect REST `/smartdatadiscovery/predict`) allows on-demand scoring within any integration, but requires developer involvement. For most admin-managed deployments, bulk scoring jobs running nightly or after key events are a practical middle ground.

**Model accuracy vs. refresh cadence:** More frequent model refreshes produce more current models but require more frequent manual activation reviews. Monthly refresh cadences are common; weekly is feasible for active high-volume pipelines. Infrequent refresh on fast-changing data is worse than no refresh at all, because the model's assumptions diverge from reality while the UI continues to present scores with no indication of staleness.

## Anti-Patterns

1. **Setting up Einstein Discovery and treating it as self-maintaining** — After story deployment and initial scoring job setup, admins frequently move on without establishing a recurring operational process. Refresh jobs complete, new model versions accumulate in "Ready" status, and scoring continues against the original model indefinitely. Months later, the team notices that predictions no longer correlate with actual outcomes, but no error was ever raised. Reliable deployments require a documented and calendared activation workflow.

2. **Using Einstein Discovery as a replacement for Einstein Prediction Builder when no CRM Analytics license exists** — Teams without a CRM Analytics license cannot use Einstein Discovery at all. Attempting to access Analytics Studio or the story creation wizard without the license produces access errors. The correct tool for binary predictions without a CRM Analytics license is Einstein Prediction Builder, which has its own Setup-based wizard and does not require the CRM Analytics entitlement.

3. **Ignoring writeback field FLS as part of deployment** — Completing story deployment and bulk scoring setup without assigning FLS results in a fully functional backend (scoring runs, field is populated) with zero user-visible output (reports, layouts, and list views show nothing). This creates the appearance that the feature is broken and often triggers unnecessary debugging or support escalations.

## Official Sources Used

Read for the 2026-10-03 pass (fetched with plain `curl`; line numbers cite the `pdftotext -layout` extraction):

- Metadata API Developer Guide, Summer '26: https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/api_meta.pdf (DiscoveryAIModel write-operation note, file layout, algorithm and prediction types, model field flags, source types L54449-54745; DiscoveryGoal definition, ten-model limit, `pushbackField` deletion note, `terminalStateFilters`, deployed model filters, pushback type, sample, and manifest L54747-55190)
- Analytics Platform Setup Guide, Summer '26: https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/bi_admin_guide_setup.pdf (CRM Analytics Growth, Plus, and Einstein Predictions licences L1622)
- CRM Analytics REST API Developer Guide, Summer '26: https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/bi_dev_guide_rest.pdf (points smartdatadiscovery prediction calls to the separate Einstein Discovery REST API Developer Guide, L529-530)

Listed by the original author and not re-read in this pass (help.salesforce.com, Trailhead retired page, and architect.salesforce.com did not serve readable content; the Einstein Discovery REST API guide URLs returned 404 or empty JSON on 2026-10-03):

- Manage and Deploy Models in Einstein Discovery: https://help.salesforce.com/s/articleView?id=sf.bi_edd_story_deploy.htm
- Einstein Discovery Basics: Create a Model (Trailhead): https://trailhead.salesforce.com/ (page retired; see host index for current equivalent)
- Einstein Discovery Prediction Writeback Fields in Salesforce: https://help.salesforce.com/s/articleView?id=sf.bi_edd_prediction_writeback.htm
- Salesforce Well-Architected Overview: https://architect.salesforce.com/docs/architect/well-architected/guide/overview.html
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 323kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall