Flight log 01
From first booking to yearly invoices
A revenue engine for a SaaS company that sells to local governments
| Item | Detail |
|---|---|
| Client | US software company selling multi-year subscriptions to cities, counties and districts |
| Team size on Salesforce | ~60 users: sales, account management, onboarding, data, marketing |
| Platform | Sales Cloud with a custom onboarding data model |
| Role | Pedro Benitez, lead Salesforce developer: designed and built everything below, over 5 months |
The mission
The company was growing, but Salesforce couldn't keep up:
- Revenue numbers weren't trustworthy. Deals without products showed made-up values, a "contract value" field was really a product count, and nobody could see what a multi-year deal would bill each year.
- Booked meetings created messy deals. Meetings landed on the wrong account, on old deals, with the wrong owner, and lost their notes and marketing source.
- Marketing couldn't prove what worked. One overloaded "source" field, no first-touch vs last-touch, manual conference lists, and no way to tie a postcard scan back to a person.
- Onboarding and ownership ran on memory. Dates were overwritten by a hidden rule, folder links were typed by hand on every module, and who-owns-what lived in people's heads.
- No history. Leadership couldn't see how the pipeline looked last month or last quarter.
What was built

1. Yearly invoice schedule with built-in price increases
When a multi-year deal closes, Salesforce now creates one invoice per contract year with each product's price for that year, including a compounding annual increase (with an opt-out at close). On every anniversary, prices and onboarding values step up on their own. Tech: custom Invoice + Invoice Line objects, async record-triggered flow, daily scheduled flow with bulk-safe queries, guided close screen. Prototyped as a spreadsheet + clickable mock so the client approved the logic before anything changed in Salesforce.
2. A clean deal from every booked meeting
Every meeting booked through the company's scheduling tool now becomes a correctly owned opportunity on the right account, with its notes, guests and marketing source attached. Stale early-stage deals close themselves with a clear reason, and the team gets a Slack summary. Tech: record-triggered flow on the scheduling connector (~50 decisions), multi-domain account matching, contact find-or-create, Apex helper for guest lists, platform events to Slack.
3. Marketing attribution end to end
Each contact and deal now records where it first came from, where it last came from, and how it converted. Conference contacts join the right campaign automatically, and direct-mail postcards carry a QR code unique to each person, so a scan updates that person's campaign status in Salesforce. Tech: UTM-to-source mapping, cascading flows to open deals, standard campaign statuses on every campaign, print-and-mail API → webhook → Salesforce.
4. Ownership and onboarding on autopilot
Customer accounts always land with the right owner, expansion deals follow the account's commercial owner, onboarding dates fill themselves in, folder links are set once per customer, and account managers get a Slack nudge 60 days after go-live to review adoption. Tech: before/after-save flows with trigger order, async child updates, scheduled flow + platform event → Slack, backfills from field history.
5. Two years of pipeline history
Every Friday, Salesforce saves a snapshot of every open deal. 96 weeks of history were rebuilt from Salesforce's own change records, so leadership could chart the pipeline over time from day one. Tech: snapshot custom object, weekly scheduled flow, history reconstruction from OpportunityHistory and field history, Bulk API load.
Also delivered
- Least-privilege API access for the client's engineering and analytics teams (OAuth client credentials, integration users, read-only permission sets)
- A permissions audit showing exactly who can see and edit what
- A guardrail that stops reps closing deals with discontinued products
- An audit of a contact-enrichment integration before switching it on (20,000+ vendor contacts matched against the CRM)
Results
| Item | Detail |
|---|---|
| 20+ hours | saved every week across the team |
| 115,000+ | weekly pipeline snapshots rebuilt across 96 weeks, 0 duplicates |
| 3,700+ | deals with corrected revenue values, 0 left wrong |
| 25,000+ | accounts re-tiered and verified, 0 mismatches |
| 100% | of customer accounts on the correct owner |
| 700+ | onboarding modules synced automatically to their customer's folders |
| 140+ | conference campaigns standardized |
| 0 | failed records across every data load: always preview → 3-record test → full load |
Tools and skills
Record-triggered, scheduled and screen Flows · Apex and test classes · Lightning Web Components · Platform Events · Custom objects and data modeling · Dynamic Forms · Permission sets and field-level security · OAuth integrations · Bulk API · Salesforce CLI · Git version control · Slack and webhook integrations
Start with a 30-minute call
Tell us what's slowing your team down. You'll get an honest read on what to fix first, even if the answer is that you don't need us.