runbookify
← All plans
Sales & CRM / Lead Capture & Routing

Lead Dedup & Merge Console

Build an internal console that compares incoming leads against your existing CRM, scores likely duplicates, and lets a reviewer choose merge, keep-both, or create-new — so the same person never ends up owned by two reps.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Storage, Auth, RLS)Resend (email)
What you'll build

A login-protected console where you upload a batch of incoming leads, see ranked duplicate suggestions with match scores, resolve each one field-by-field, and export an approved "create" file plus a "merge map" CSV for your CRM — with nothing written until a human confirms.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Supabase account
  • A free Vercel account
  • A free Resend account
  • An incoming lead file (CSV or Google Sheet)
  • An export of your current CRM leads/contacts/accounts

The problem this kills

Duplicate leads are a quiet tax on every sales team. A prospect fills out a webinar form, then a demo form, then gets uploaded from a tradeshow list — and now the same person exists three times in your CRM, owned by two different reps, getting emailed twice and called by both. Marketing ops spends hours each week eyeballing exports, trying to guess whether "Acme Inc" and "Acme, LLC" are the same company and whether jsmith@acme.com and J.Smith@Acme.com are the same human.

Most "dedup" tools either auto-merge (terrifying — they silently pick a winner and you lose data) or do nothing useful at all. What you actually need sits in between: a tool that does the tedious fuzzy matching for you, ranks the suspects, and then hands every real decision to a person who can see both records side by side.

What you'll build

A private web console for your team where you:

  1. Upload a batch of incoming leads (CSV or Google Sheet) and an export of your existing CRM leads, contacts, and accounts.
  2. Let the tool normalize and fuzzy-match on email, name, company, and phone — handling the messy stuff like email casing, Inc/LLC/Ltd company suffixes, and phone formatting.
  3. Review ranked duplicate suggestions, each with a match score and a clear "why we think these match."
  4. For each suspect, choose Merge (with a field-by-field "which value wins" picker), Keep both, or Create new — preserving the original owner and the earliest-created date unless you explicitly change them.
  5. Export an approved "create" file for genuinely new leads and a "merge instructions" map your CRM admin can act on — in the exact columns your system expects.

Nothing is ever written automatically. The AI drafts the suggestions; a person approves; only then does anything leave the console.

What's inside the Implementation Plan

The plan is a complete, paste-and-go runbook for Claude Code. The very first thing it does is interview you about your business — your CRM, your form and list sources, how your data is actually named (email/company/phone field conventions, account vs. contact structure), your typical and peak lead volumes, your ownership and routing rules, and your messy edge cases. It then reads back a short tailored spec for your thumbs-up, so the tool you build fits your CRM and your rules — not a generic template.

After the interview it walks you, prompt by prompt, through:

  • Setting up the database, login, and per-organization security.
  • The normalization + fuzzy-matching engine (email primary key, company + normalized name as the secondary key).
  • The scored duplicate-suggestion queue.
  • The side-by-side review screen with the field-by-field merge picker and the merge/keep/create gate.
  • The audit trail and the CSV / merge-map exports.
  • A full "No API yet?" fallback so you can build and use the whole thing today with just a Google Sheet in and clean CSVs out — no CRM integration required.

Every build step ends with a ready-to-copy prompt.

The governance it includes (this is the point)

This isn't a script that mangles your CRM. It's an internal tool with real controls baked in:

  • Login so only your team can open it.
  • Row-level security so each person only ever sees their own organization's data.
  • A complete audit trail — who reviewed what, what they decided, and when.
  • A hard human-in-the-loop approval gate — the AI proposes merges; a person reviews and confirms before any merge map or create file is produced. Never auto-merge.
  • Duplicate guards so the same incoming batch can't be processed and merged twice.
  • Ownership and history preserved — the original owner and earliest-created date carry forward unless a reviewer deliberately overrides them.

Who it's for

Marketing ops and CRM admins who fight duplicate leads created by forms, lists, and events — and anyone tired of two reps calling the same prospect because nobody had a safe way to merge.

You've got this — paste the first prompt and let the agent interview you.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.