Real-Time Deal Intelligence

Case Study

A Live Deal Health Score Built Natively on the Salesforce Opportunity Object

A 0-to-100 composite score across six Salesforce-native factors — calculated automatically, surfaced on every Opportunity record, requiring zero manual input.

~3 hrs Recovered per rep
per week
0–100 Composite deal
health score
6 Independently weighted
scoring factors
0 Manual inputs
required
Project Snapshot
Project Opportunity Deal Health Score
Built By CRM Infusion
Platform Salesforce Sales Cloud — Opportunity sObject
Stack Apex Triggers, Apex Service Class, Lightning Web Components (LWC), Record-Triggered Flow, Formula Fields

The Challenge

Salesforce gives sales teams everything needed to assess deal health — ActivityHistory, Opportunity Contact Roles, Stage timestamps, the NextStep standard field, and CloseDate. The problem is that nothing in a standard Sales Cloud configuration synthesizes those sObjects and fields into an actionable signal at the Opportunity record level. The result is a familiar set of expensive failure modes:

Pipeline reviews become manager interrogations rather than data-driven conversations, because reps are the only source of truth on Opportunity status and no CRM field surfaces a composite health signal. Opportunities stall silently — no logged Task or Event, no populated NextStep, no CloseDate update — and nothing in the org flags the record automatically. Forecast accuracy degrades because Opportunities stay at full value in the pipeline until they are visibly lost, with no intermediate signal that a record has gone cold in Salesforce. Opportunity Contact Role gaps go undetected — no Decision Maker, no Champion, no Economic Buyer on the OpportunityContactRole related list — until late in the deal cycle when it is too late to recover.

In CRM Infusion’s own production Salesforce org, we experienced this directly. Opportunities that appeared active in standard List Views had not had a related Task or Event logged in weeks. The data to identify the problem existed across multiple sObjects in the org. What was missing was a mechanism to synthesize it into an actionable signal on the Opportunity record itself.

The Solution

The Deal Health Score is a 0-to-100 composite calculated across six independently weighted factors. Each factor targets a specific CRM data quality or process execution gap that is directly measurable from Salesforce sObject data.

“Standard pipeline scoring widgets display a number. This component identifies which specific Salesforce data gap is causing the score to drop and instructs the rep on the exact CRM action required to address it.”

The solution replaces subjective rep self-reporting and manager intuition with a 0-to-100 composite score, a color-coded tier label, a factor-by-factor progress bar breakdown, and an actionable Fix These Now panel that fires only when a specific scoring factor hits zero — surfacing the exact Salesforce data gap hurting the deal and instructing the rep on the specific CRM action required to address it.

DealHealthScoreService
Bulkified Apex service class. All SOQL outside loops, single DML statement per execution — queries Task, Event, and OpportunityContactRole across any batch size.
Formula Fields (3 factors)
DealHealth_NextStepScore__c, DealHealth_CloseDateScore__c, DealHealth_StageAgeScore__c — declarative score components with zero Apex overhead.
opportunityDealHealth LWC
@wire with getRecord and lightning/uiRecordApi. Circular score ring, factor progress bars, and Fix These Now panel — all rendered client-side with no additional Apex calls.
Record-Triggered Flow
Stamps Stage_Entry_Date__c on every StageName change — the reference point for DealHealth_StageAgeScore__c and the Days_In_Current_Stage__c formula.

Technical Highlights

  • Three-Trigger ArchitectureDealHealthTrigger (Opportunity after insert/update), DealHealthTaskTrigger (Task after insert/update), DealHealthContactRoleTrigger (OpportunityContactRole after insert/delete) — all delegate to DealHealthScoreService.recalculate().
  • Governor-Limit SafeAll SOQL queries outside loops, single DML update against a List<Opportunity> constructed from Maps keyed by Opportunity ID. Fully bulkified across any batch size.
  • DealHealth_Tier__c List View ColumnFilterable, sortable tier label derived from the composite score via nested IF() logic — instant pipeline triage without opening individual records.
  • Fix These Now PanelFires conditionally only when at least one factor’s sub-score equals zero. Action prompts generated client-side by evaluating the wire adapter response — no additional @AuraEnabled Apex calls required.

Results

Pipeline Problem Before After Outcome
Pipeline Reviews Manager interrogations — reps are the only source of truth on Opportunity status 0–100 composite score surfaces on every Opportunity record automatically Data-driven reviews
Stalled Opportunities Stall silently — no logged Task or Event flags the record automatically Fix These Now panel fires when any scoring factor hits zero Automatic flagging
Forecast Accuracy Opportunities stay at full value until visibly lost — no intermediate signal Real-time deal health score flags stale and at-risk records continuously Live risk signal
Contact Role Gaps No Decision Maker or Champion detected until late in the deal cycle Contact Role factor scores and surfaces missing roles directly on the record Early detection
Rep Time — Pipeline Prep Manual pipeline preparation, ad hoc report building, manager-driven check-ins Score always current — no prep required before pipeline reviews ~3 hrs/rep/week recovered

Ready to build real-time deal intelligence into your Salesforce pipeline?

The Deal Health Score isn’t just a widget—it’s a complete architectural framework designed to scale with your sales team. Whether you need a standalone install or a custom-weighted build tailored to your specific sales cycle, we can deploy this intelligence into your org in days, not months.

Book a Discovery Call

Why This Matters for Your Organization

The Deal Health Score architecture is fully buildable in any org. The scoring weights applied in DealHealthScoreService, the tier thresholds in DealHealth_Tier__c, and the Stage Age benchmarks in DealHealth_StageAgeScore__c are all configurable per client without modifying the core Apex service class or trigger architecture. The LWC is compatible with and deployable via a Salesforce CLI push or change set.

For CRM Infusion clients, this solution is available as a standalone Sales Cloud engagement or as part of a broader pipeline management build. Orgs that already log Tasks and Events consistently, use Opportunity Contact Roles, and populate NextStep see immediate ROI. Orgs that do not — this solution creates the accountability structure that drives those behaviors into the daily Salesforce workflow. CRM Infusion runs this in our own production Salesforce org. We do not recommend platform architecture we do not operate ourselves.


Ready to build real-time deal intelligence into your Salesforce pipeline?

Contact CRM Infusion for a discovery call and a live demonstration of the Deal Health Score in a production Salesforce org.