- Client
- Nimbus SaaS (demonstration build)
- Industry
- B2B software
- Services
- Discovery & requirements, Apex development, Lightning Web Component, Async processing & scheduling
- Every open deal scored 0-100 in real time
- Scoring weights tunable by an admin, no code
- At-risk deals flagged for the owner automatically each night
Nimbus SaaS is a fictional B2B software company. We built this engagement end to end to show the developer side of our work: not configuration this time, but real Apex and a custom Lightning Web Component in a real org. Only the company is invented.
The brief was a deal scoring engine they could actually trust. Off-the-shelf AI scoring needs a big history of closed deals to learn from, and Nimbus did not have one yet. So we built a scoring model on the factors their sales leaders already believe in, and put the reasoning on screen where reps can see it.
The challenge
Reps were spending time in the wrong places. Some deals get attention they will never repay, while genuinely strong ones go quiet because nobody flags them in time. The team had no shared, objective read on which opportunities were healthy.
They wanted a score, but not a black box. If a deal is rated low, the rep needs to know why and what to do about it. And the definition of a “good” deal had to belong to the business, not get buried in code where only a developer could change it.
The approach
We started with the factors, in plain terms. Recent activity on the deal. Whether an economic buyer is actually involved. Whether a competitor is in play. Deal size against a baseline. And how long the deal has been open. Each one gets a weight, and together they produce a single score from 0 to 100.
The rule we set with ourselves: keep those weights out of the code. Every factor’s weight and its targets live in Custom Metadata, so an admin can re-tune the model from Setup. If sales leadership decides activity matters more than deal size, that is a settings change, not a developer ticket.
Then we built the engine in Apex, the right way. One trigger on the opportunity, a clean service layer that does the scoring, and a selector layer that gathers the supporting data in bulk. It is built to handle a whole pipeline at once without tripping Salesforce’s limits.
What we built
A score that updates itself. The moment a deal is created or changed, it gets scored and the result is written straight to the record. No batch to wait for, no button to press.
A score card that explains itself. We built a Lightning Web Component that lives right on the opportunity. It shows the score as a colored gauge, green through red, with a breakdown of what each factor contributed, a 30-day trend line, and a short list of recommended next actions. If there is no economic buyer on the deal, it says so and tells the rep to add one.
A model the business owns. The factor weights and targets sit in Custom Metadata, ready for an admin to adjust. Turn a factor off, change a weight, retune the baseline deal size, all without touching code.
A nightly check on the whole pipeline. Activity, contacts, and competitors change without anyone editing the deal, so a job runs every night to re-score every open opportunity and record the day’s score for the trend line. When a deal’s score drops sharply over a week, the owner gets a high-priority task to step in before it goes cold.
How it runs
A rep works a deal as normal. The score is just there on the record, updating as the deal changes, with the reasons in plain sight.
Overnight, the engine re-scores the full pipeline and saves a snapshot for each deal, which is what feeds the trend line. Any deal sliding fast gets its owner a task the next morning. Nobody has to go looking for the deals at risk; the system surfaces them.
The result
A scoring engine that gives the whole team one honest read on every deal, explains itself on the record, and tells a rep what to do next. The model belongs to the business, so it can change as their playbook does.
To prove it under load, we seeded the org with a full set of demo opportunities carrying real activity, contact roles, and competitors, plus a month of score history so the trends and the at-risk alerts run on real movement. The engine scores a whole pipeline in a single pass, well inside Salesforce’s limits.
This is the developer work we bring when configuration alone will not do it: custom logic that is bulk-safe, tested, and built so the business can still own the parts that matter. If you want a read on your pipeline like this, let’s talk.