# CRM Data Cleanup After an Acquisition — Workflow Blueprint

## Trigger and termination

- **Trigger:** an approved cleanup batch references immutable source snapshots and rule version.
- **Success:** every approved proposal has one verified target state and a complete change record.
- **Safe stop:** any unapproved proposal, integrity mismatch, relationship loss, consent/privacy conflict or unavailable rollback route.

## Data contracts

Input: source system, source record ID, entity type, permitted comparison fields, consent/privacy state, related-record counts, active-work flags and snapshot ID. Never include secrets. Output: candidate ID, matched reasons, proposed survivor, field decisions, relationship plan, approval, execution status and reconciliation evidence.

## Ordered steps

1. **Code — validate batch:** check scope, snapshot, rule version and unique business keys.
2. **Code — normalize in staging:** produce comparison values without altering source records.
3. **Code — propose candidates:** emit reasons and confidence; do not merge.
4. **Human — decide identity and fields:** approve, reject or request evidence. Privacy, consent and active-work conflicts cannot auto-pass.
5. **Code — execute idempotently:** use the candidate ID plus approval version; a retry returns the prior result.
6. **Code — reconcile:** compare counts, relationships, required fields and change ledger with the expected state.
7. **Human — close exceptions:** data owner resolves or defers every unmatched case.

## Failure, retry and rollback

Retry only after reading the candidate&apos;s effect state. If the target is unknown, reconcile before another write. Stop the batch when a critical invariant fails. Restore from the approved snapshot or reverse through the recorded field and relationship changes where the actual CRM supports that tested method.

## Permissions and tests

Separate read, proposal, approval and destructive-write roles. Test exact duplicates, likely matches, false positives, shared contact details, conflicting consent, active opportunities, missing keys, repeated delivery, partial write and rollback. Acceptance requires no unauthorized merge, no lost required relationship, complete change evidence and matched reconciliation counts.
