﻿# How a CRM deduplication agent prepares contact merges safely

Build a CRM deduplication worker that checks identity evidence, previews the effects of a merge, and requires review when people or records may be different.

Author: Retrivium team
Updated: 2026-11-08
Canonical URL: https://retrivium.ai/journal/startup-worker-crm-contact-merge/
Language: en

A startup’s CRM can collect duplicates from imports, forms and integrations. A digital worker can gather likely pairs and prepare a merge proposal. The valuable deliverable is a precise view of what the receiving record will retain and which identity assumptions require a person’s judgment before execution. At a small company the CRM owner may share responsibility with support and billing. Let them confirm which downstream systems take new IDs or references from the CRM.

## Collect candidates with stable identifiers

HubSpot’s contacts API allows lookups by record ID, email or a configured unique identifier in relevant endpoints. Start from those facts and carry the source and freshness of each signal. Two people can have similar names and the same employer. A role mailbox may point to a rotating person rather than a lasting identity. [HubSpot contacts API](https://developers.hubspot.com/docs/api-reference/legacy/crm/objects/contacts/guide).

## Preview the surviving record

Show the proposed primary record, secondary record, conflicting property values and linked objects. HubSpot documents rules for merge effects and states that records cannot be unmerged. Treat the merge as irreversible within that product. If an application reconstructs records later, it needs a separate process and cannot assume all previous history or associations will return. [HubSpot record merging](https://knowledge.hubspot.com/records/merge-records).

## Handle a plausible false positive

Consider two contacts sharing a purchasing mailbox. One owns an active contract and the other filed a recent support request. A merge might redirect communication and blur which person consented to which notice. Provide the reviewer a side-by-side view of ownership and history, then allow an explicit decision to keep the records separate.

## Recheck both records before writing

Use the approved IDs and re-read both records immediately before execution. If an integration changed ownership or a salesperson attached a deal since review, regenerate the proposal. Keep a reconciliation entry with both prior IDs, the returned ID and the actor responsible. Pause any large import while resolving unexpected cross-account associations.

## Score precision and recovery cost

In a pilot, count candidates reviewed per hour, incorrect proposed merges and incorrect completed merges separately. Review historical pairs where email aliases changed or two departments used a shared address. Report missed duplicates alongside false matches. Estimate the operator time needed to investigate and repair a bad merge before expanding the worker’s permissions.

## Related reading

- [Google AIP update masks distinguish selection from replacement](/journal/guide-aip-update-mask-replacement-boundary/)
- [Bind approval to the pending action that will actually resume](/journal/frontier-swarm-approval-argument-binding/)
