Automatic Lead status sync when a Deal is won
Understand why your leads automatically transition to "closed_won" whenever a deal is marked won, regardless of the import source (HubSpot, Stripe, AI import, manual edit).
Deal won -> Lead "closed_won" auto-sync
In one sentence
When a Deal transitions to won in Metrikia, the linked Lead is automatically transitioned to closed_won: regardless of the source (HubSpot sync, Stripe Checkout, AI import, manual edit).
Why it matters
The Lead status is the source of truth for:
- The conversion funnel on
/app/dashboard - The
closing rateKPI (% lead -> deal) - Filtered lists in
/app/crm(Closing view, Active view) - Multi-touch attribution eligibility
If a Deal is won but the Lead stays appointment_booked or deal_pending, KPIs become inconsistent and Metrikia raises a data-quality warning.
What happens automatically
| Action | Lead consequence |
|---|---|
| Deal created from HubSpot sync with won stage | Lead -> closed_won |
| Deal created via Stripe Checkout (payment received) | Lead -> closed_won |
| Deal created via AI import with deal.status = won column | Lead -> closed_won |
| First payment recorded on a pending Deal | Deal -> won, Lead -> closed_won |
| Manual PATCH of Deal to won | Lead -> closed_won |
What Metrikia does NOT do
- Does NOT downgrade a
closed_wonLead when the Deal is laterreopen-ed (rare business case; handle manually). - Does NOT touch orphan Leads (Deal without a linked Lead). A warning is logged.
Verify
- Open the Deal at
/app/closing/deals - Click "Mark won"
- Navigate to the linked Lead in
/app/crm - The status shows "Won" in green right after the refresh (TanStack Query refetch on focus, 60s cache).
If something looks off
- Lead keeps its old status despite a
wonDeal: refresh the page (TanStack cache expires after 60s), or check Sentry for aDealWonEvent received but lead not foundwarning (orphan Deal). - You need to fix pre-existing historical drift: contact support: an SQL backfill is available on the admin side.
Going further
The rule does NOT cascade in reverse: if you set a Lead manually to closed_won without a Deal, Metrikia does NOT create a synthetic Deal. You must create the Deal explicitly.
Technical reference
This sync is automatic: as soon as a deal becomes won, the matching lead status follows immediately.
Previous guide
Connect the Chrome extension and the Claude plugin
Next guide
Enable Google Ads conversion feedback
To go further, check out our blog, the documentation or contact support.