Case Study 04 · CModel Consulting · Salesforce RevOps
The Ask
Leadership wanted full pipeline visibility — quota attainment, historical close rates, rep-level performance. The instructions called for a scheduled Flow that would loop over every opportunity ever created, calculate historical win/loss rates per rep, and write those rates back to a field used in the dashboards. Run it daily. Keep it current.
I built it exactly as specified.
The Failure
The flow triggered on schedule. It looped through open opportunities, got won opps, got lost opps, nested loop through won opps, nested loop through lost opps, calculated the rate, reset the counters, wrote back to the record. The architecture was correct. The logic was sound.
Then it hit Salesforce's Apex CPU time governor limit and failed.
The flow interview failed on April 29, 2026 at 4:26 PM.
It ran for 45.17 seconds.
Error: CPU time limit exceeded. Apex CPU governor limit reached after looping through 30+ iterations of Get_Won_Opps collection.
Trimming the dataset to opportunities from 2017 onward — since the last seller was hired in 2019 — didn't help. Still failed. The loop-over-loop architecture was the problem. It wasn't a data issue. It was a structural one. I flagged this clearly to the Salesforce lead and RevOps lead. No response came back.
"Knowing when to stop forcing a broken solution is a skill. The job is to deliver the outcome — not execute the instructions blindly."
The Pivot
The underlying ask was quota attainment visibility — where each AE stands relative to their number, in real time. The historical close rate was a means to that end, not the end itself.
So I put quarterly quota directly on the User object. Nobody does this. Salesforce doesn't surface it there by default and most orgs don't think to use it. But it meant the quota lived where the rep lived — and any formula field on Opportunity could reference it through the Owner relationship.
The Build
Once the data foundation was right, the reporting layer came together cleanly. Each AE got their own dashboard — pipeline by stage, projected amount vs quota, close rate by quarter, open opportunities by age. The Sales Leadership dashboard rolled everything up into one view.
The Result
Leadership got what they actually needed — a live view of where each rep stood against their number, updated automatically on every opportunity change. The original ask (historical close rate via a scheduled flow) was a proxy for this. The delivered solution was more reliable, more maintainable, and required no ongoing intervention.
The broken flow is deactivated. The dashboards are live. The quota field on User gets updated quarterly in under five minutes. The formula does the rest.