runbookify
← All plans
Sales & CRM / Sales Operations & CRM Data Hygiene

Lead-to-Account Matching Backfill

Match orphaned leads and contacts back to the right accounts by email domain, company name, and address - with confidence scores and a human approval gate - so reps and reporting finally see the whole account picture.

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

Import your leads and accounts, get scored link proposals (domain/name/address), confirm each one, and export a clean CSV of lead-to-account assignments plus a 'create new account' list ready to load back into your CRM.

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

  • An export of unlinked leads/contacts (CSV or Google Sheet)
  • An export of your accounts (name, email domain, address)
  • Free accounts: Vercel, Supabase, Resend
  • No coding experience needed - you'll paste prompts into Claude Code

The problem this kills

Your CRM is full of leads and contacts that float free - never connected to an account. A rep opens an account and sees three contacts when there are really fifteen. Reporting undercounts pipeline because half the deals attach to orphaned records. Marketing emails the same company under four different spellings. Everybody knows the data is wrong, but nobody has a weekend to hand-match thousands of records.

The fix is mechanical, but it's tedious and error-prone by hand: match each loose lead to the company it actually belongs to, using the signals you already have - the email domain, the company name, the address. The hard part isn't the matching. It's doing it safely, at volume, without quietly stitching the wrong contact onto the wrong account.

What you'll build

A small private web app that takes two exports - your unlinked leads/contacts and your existing accounts - and proposes the right link for each lead, scored by confidence. Email domain is the strongest signal (free-mail domains like gmail.com are flagged, not matched). Company names get normalized so "Acme Inc.", "Acme, LLC" and "ACME Ltd" line up. Shared domains and conglomerates get flagged for a human look.

You review the proposals - confirm a link, send a lead to a brand-new account, or leave it an orphan - and only then does the tool produce a clean linking file. Nothing touches your CRM until a person says yes.

What's inside the Implementation Plan

  • It opens by interviewing you about your business. Before it builds anything, the plan has the AI ask you about your CRM, your export columns, your naming conventions (Inc/LLC/Ltd, regional spellings), your free-mail and shared-domain edge cases, and your match rules - then it reads back a short spec and waits for your thumbs-up. You get a tool tuned to your data, not a generic template.
  • A step-by-step build, each step ending in a prompt you paste straight into Claude Code.
  • A confidence-scoring matcher (domain, normalized name, address) you can tune.
  • A review screen for confirming, reassigning, or rejecting each proposed link.
  • The full governance layer below, built in from the start.
  • A CSV-export fallback so you can build and use the whole thing today, even with no API into your CRM.

The governance it includes (this is the point)

  • Login so only your team can open the tool.
  • Row-level security so each user only ever sees their own organization's data.
  • A complete audit trail - every match run, every confirm/reject, who did it and when, tied to a match-run id.
  • A hard human-in-the-loop approval gate - the AI drafts the links, a person reviews and approves, and only confirmed links land in the export. Low-confidence matches are reviewed one at a time.
  • Duplicate guards - each lead/contact id can be linked to exactly one account, so the same record can't be processed or double-linked twice.

Who it's for

Revenue operations and sales-ops people cleaning up a CRM where leads and accounts were never properly connected. If you've inherited a pile of orphaned contacts and you're the one accountable for clean reporting, this is for you. No developer required.

You've got this - paste the first prompt and let the interview tailor the rest.

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.