CRM deduplication
Keep CRM accounts duplicate-free: audit company identity, build a recurring deduplication play directly on the CRM model, search and score duplicate candidates, merge safe exact matches, and route uncertain clusters to manual review.
Set up the crm-deduplication cookbook in this project.
1. If the Cargo CLI is not installed yet, follow every step in https://api.getcargo.io/INSTALL.md
2. From the Cargo project, run: cargo-ai cdk add cookbook/crm-deduplication
3. Then follow .claude/skills/crm-deduplication/SKILL.md. Stop for my approval before any paid call, and stop at "cargo-ai project plan" before deploying anything.$cargo-ai cdk add cookbook/crm-deduplicationKeep CRM accounts duplicate-free without creating a second account model. This folder is a worked
example: copy it into a Cargo CDK project as a sibling, reconcile its CRM model and connector with
compatible resources already in the project, adapt infra/, and follow the approval gates
before deploying or running the disabled play.
The agent first audits live CRM account identity coverage and candidate classes. After the operator
approves the matching keys, survivor precedence, automatic-merge class, and manual-review
destination, it builds one deduplicate_accounts play directly on the CRM account model. Each run
searches the live CRM, normalizes and scores duplicate evidence, selects a deterministic survivor,
then merges the narrow automatic class or pauses for Cargo’s native Human Review. Approval merges;
decline or timeout leaves the records separate.
The checked example is HubSpot. Salesforce and Attio adapt the same resources. The play is disabled,
noConcurrency, and limited to 15 CRM rows. Nothing in this folder deploys, runs, or touches
customer data by itself.
This pipeline requires the cargo-cdk authoring skill:
npx skills add getcargohq/cargo-skills --skill cargo-cdk
SKILL.md is the procedure. Supporting depth:
| Path | Purpose |
|---|---|
SKILL.md | Outcome, installation, contracts, approvals, and cost |
infra/connectors/ | The CRM slot and the Slack review destination |
infra/models/crm-accounts.ts | The CRM account extract the play runs on |
infra/plays/deduplicate-accounts.ts | The row workflow, its guards, and the trigger |
infra/scripts/policy.ts | Generic domains and survivor precedence — the knobs to adapt |
infra/scripts/evidence.ts | deriveEvidence, the script node’s body, declared with defineScript |
references/audit.md | Identity coverage, candidate classes, and survivor audit |
references/configure.md | CRM search, scoring, merge, and Human Review configuration |
references/run.md | Pilot approval, verification, reporting, and Cargo links |
evals/acceptance.md | Acceptance checklist |
evals/contract.mjs | Executable deduplication graph and safety contract |