Salesforce Contact & Lead Dedupe
MaintainDuplicates are piling up across Contacts and Leads. You need to find them, get RevOps to review, and merge only what they approve — with receipts for every operation.
The Slack Message
We've got duplicates everywhere in Salesforce — Contacts with the same email, Leads that are clearly existing customers. Can you clean this up? But I need to review everything before you merge anything. Give me a spreadsheet I can go through with the team.
The Prompt
Kicked off from the terminal with the full workflow spec.
We have ~15K Contacts and ~10K Leads in Salesforce and duplicates are everywhere. I need to: 1. Export Contacts and Leads 2. Find all duplicate clusters 3. Get a review queue I can hand to the RevOps team in Sheets 4. After they approve, apply only the approved merges with receipts Use the b2b_person profile. Don't merge anything without my approval.
The Review Queue Is the Product
This is not “magic merge.” Gremlin finds duplicates, recommends the survivor record, and generates a review queue your team can approve in Sheets. Export → plan → review → approve → apply. Nothing changes until your team says go.
Core Workflow
Export, plan, review, dry-run, apply. Every step is supervised.
Export from Salesforce
Pull Contacts and Leads via SOQL snapshot or use existing CSVs.
Plan & Cluster
Blocking-first candidate generation, fuzzy scoring, cluster classification, survivor selection.
Review Queue
Cluster review CSV with recommended actions, confidence, merge rationale. Open in Sheets.
Dry-Run Preview
Preview every merge and conversion operation before anything changes.
Apply Approved
Execute only approved operations with receipts, state files, and resume support.
"15K Contacts and 10K Leads. I'll export both objects, run the enterprise planner with the b2b_person profile to avoid coworker-bridge false positives, then generate the review queue."
"Step 1: Export Contacts and Leads from Salesforce. Step 2: Run enterprise-plan with b2b_person profile. Step 3: Generate cluster review CSV. Step 4: Wait for human approval. Step 5: Dry-run, then apply."
"Good. 25K total records. The b2b_person profile uses email, phone, and company_name blocking — no domain_name blocking, which avoids chaining coworkers who share a domain."
"8 clusters from 25K records — that's clean data with a few real duplicates. The review_clusters.csv has cluster_id, recommended_action, merge_confidence, golden_record_id, and review_notes. I'll hand this to the team."
Plan generated. review_clusters.csv ready for RevOps review in Sheets. 8 clusters, 0 coworker-bridge false positives.
The Review Queue
This is what your RevOps team sees. Each cluster has a recommended action, confidence score, and merge rationale. They fill in approval_status and optionally override the master record.
| cluster_id | recommended_action | merge_confidence | golden_record_id | review_notes | approval_status |
|---|---|---|---|---|---|
| C-001 | merge | 0.97 | 003A | Exact email match | approved |
| C-002 | lead_to_contact_resolution | 0.92 | 003B | Lead matches existing Contact | approved |
| C-003 | merge | 0.78 | 003C | Mixed cluster: multiple Leads + Contacts — skipped during apply | rejected |
"RevOps approved 6 of 8 clusters. 2 mixed clusters (multiple Leads + multiple Contacts) were rejected — those get skipped during apply. Let me dry-run first, then apply."
"Dry-run looks clean. 4 Contact merges (2 victims each), 2 Lead conversions. Applying with state file for resume support."
All approved merges applied. 2 clusters remain for manual review. Full receipt in receipt.json with before/after state.
Safety Guarantees
Requirements
Salesforce Connected App
Export and merge operations
Gremlin CLI 0.1.21+
Enterprise dedupe commands
Contact and Lead exports
CSV or live SOQL snapshot
Author Apex permission
Required for Lead-to-Contact conversion
Results
b2b_person profile eliminated coworker-bridge matches
Receipt with before/after state for every merged record
Try This Workflow
Start with two small CSVs locally. No Salesforce connection needed to see the review queue.