Skip to content

PranavNagrecha/AwesomeSalesforceSkills / skills/admin/duplicate-management

duplicate-management

Verified

Use when designing, reviewing, or troubleshooting Salesforce duplicate prevention, matching rules, duplicate rules, and merge governance. Covers cleaning up duplicates that already exist at ordinary volume: merge sequencing, survivorship, stewardship ownership. Also covers the deployable MatchingRule / DuplicateRule metadata, the Alert-vs-Block action pair, DuplicateRecordSet reporting, and the Apex DMLOptions.DuplicateRuleHeader.allowSave bypass. Triggers: 'duplicate rule', 'matching rule', 'merge strategy', 'dedupe', 'survivorship', 'D&B', 'same contact twice', 'clean up duplicate records', 'clean up duplicate accounts', 'DUPLICATES_DETECTED', 'allowSave', 'FindDuplicates'. NOT for cleanup at volume — hundreds of thousands of records, batch merge jobs, DemandTools/Cloudingo — use data/large-scale-deduplication. NOT for which field values and child records the platform keeps in a merge - use data/record-merge-implications.

references/well-architected.md

View on GitHub
# Well-Architected Mapping: Duplicate Management

## Pillars Addressed

### Reliability

Duplicate prevention and survivorship protect the accuracy and usability of core records.

- Matching and duplicate rules prevent avoidable record fragmentation.
- Merge governance keeps authoritative values consistent.

### Operational Excellence

Good duplicate management requires ownership, stewardship, and repeatable remediation.

- Steward workflows convert alerts into action.
- Metrics help tune rules instead of guessing.

### User Experience

Users trust Salesforce more when search, reports, and activity history point to one believable record.

- Reduced duplicate clutter improves day-to-day navigation.
- Clear blocking and alert behavior reduces confusion during data entry.

## Pillars Not Addressed

- **Security** - duplicate management touches access only incidentally.
- **Scalability** - the focus is record quality and stewardship, not system throughput design.

## Official Sources Used

- Metadata API Developer Guide, `DuplicateRule` — https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/api_meta.pdf (the `actionOnInsert` / `actionOnUpdate` `Allow`|`Block` enum, the `operationsOnInsert` / `operationsOnUpdate` `alert`|`report` arrays, the `alertText` constraint that at least one action must be `Allow`, `securityOption` `EnforceSharingRules` vs `BypassSharingRules`, `duplicateRuleFilter`, `sortOrder`, and the `DuplicateRuleMatchRule` / `ObjectMapping` cross-object shape used throughout `references/metadata-examples.md`)
- Metadata API Developer Guide, `MatchingRule` — same PDF (the one-file-per-object `<MatchingRules>` container, `matchingRuleItems` with `fieldName` / `blankValueBehavior` / `matchingMethod`, the closed `matchingMethod` enum `Exact`|`FirstName`|`LastName`|`CompanyName`|`Phone`|`City`|`Street`|`Zip`|`Title`, `booleanFilter`, and the rule that only `Active` and `Inactive` are declarable in a package)
- Metadata API Developer Guide, `FilterItem` / `FilterOperation` — same PDF (the operator set available to `duplicateRuleFilterItems`, cited in the filtered Block-rule example)
- Object Reference, `DuplicateRule` and `MatchingRule` / `MatchingRuleItem` standard objects — https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/object_reference.pdf (query-only supported calls, the four-value `sObjectType` picklist behind the "Standard Duplicate Rules Cover a Short, Fixed Object List" gotcha, the `RuleStatus` values behind the asynchronous-activation gotcha, and the Summer '20 View Setup and Configuration access rule that constrains steward reporting)
- Object Reference, `DuplicateRecordSet` / `DuplicateRecordItem` / `DuplicateJob` — same PDF (the artefacts the `report` operation produces, their read-write access model, `RecordCount`, and the polymorphic `RecordId` that limits custom report types to Account, Contact, Individual, Lead)
- Apex Developer Guide, "Triggers and Order of Execution" and "Setting DML Options" — https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/salesforce_apex_developer_guide.pdf (duplicate rules at step 6 and the block action halting after-triggers and workflow; the step 11b statement that duplicate rules are not re-run after a workflow field update; the scope limit that `DMLOptions` applies to Apex DML and not the UI)
- Apex Reference Guide, `DMLOptions.DuplicateRuleHeader`, `Database.DuplicateError`, `Datacloud.DuplicateResult` and `Datacloud.FindDuplicates` — Apex Reference Guide PDF (`allowSave` scoped to Alert rules, `runAsCurrentUser` and its lead-conversion recommendation, the `getDuplicateRule()` / `getErrorMessage()` / `isAllowSave()` result surface, and the 50-record input cap plus the `System.HandledException` thrown when no rule is active)
- Salesforce Well-Architected — data quality and stewardship framing behind the Reliability and Operational Excellence sections above
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 323kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall