Stratus Cloud Solutions Stratus Docs
Documentation / Data Cleanser User Guide / Advanced Reference

Merge Engine

Data Cleanser uses Salesforce native merge DML — not a custom REST merge API. Child records (Contacts, Opportunities, Activities, Cases, and so on) are reparented by Salesforce’s standard merge behavior.

Manual merge (single group)

  1. Update the master with user-selected field values (only accessible, updateable fields).
  2. Delete the Duplicate_Group__c row.
  3. Merge each loser into the master sequentially — capped at 30 merge DML calls per request.

In Review, Set as master always overrides automated survivorship scoring for that merge.

Mass merge

  1. Pick master = highest DCM_Master_Score__c (from master rules).
  2. Fill null master fields from duplicates (first non-null wins).
  3. Database.update(master, false) — on failure, the group stays and an error is logged.
  4. Pairwise merge reduction for multiple losers until one survivor remains.

Mass merge processes 10 groups per batch job and evaluates at most 20 members per group for master scoring. Partial failures never stop the batch — failed groups land in Settings → Warnings.

Overflow settings — what actually happens

When Overflow is ON for an object (Settings → Overflow Settings), the engine collects all PHONE and EMAIL field values from duplicates and dedupes them.

Overflow values appear as choices on the Description field in the merge workbench — not as automatic writes to secondary email or phone fields. Select the overflow values you want to keep on the surviving record. Mass merge uses fill-null-only logic and does not apply overflow the same way as manual merge.

Master rules scoring (survivorship math)

Master rules assign points per satisfied rule. After group creation, DCM_Master_Score__c is written on CRM records. Highest score wins in mass merge and multi-select merge.

Record-level rules

  • Oldest Record / Newest Record
  • Owner By / Not Owned By (specific user)
  • Most Opportunities, Most Contacts, Most Cases

Field-level rules

Operators vary by field type: text, number, checkbox, or ID.

Invalid 18-character Salesforce IDs are rejected with “Looks like the ID you entered is invalid. Please check it.”

Cross-object scenarios have no master step — leads are converted, not merged. See Cross-Object: Converting Duplicate Leads.

Person Accounts
  • Detected at runtime via IsPersonAccount / PersonContactId.
  • Name is never written on Person Accounts; split into FirstName / LastName when needed.
  • __pc fields are hidden from the merge UI when Person Accounts are disabled in the org.
Fields excluded from merge UI

Among others, the workbench excludes or hides:

  • LastActivityDate, MasterRecordId, SystemModstamp
  • Lead conversion fields
  • Location compound fields
  • Non-updateable dcmm__* package fields

Mass merge only fills null fields on the master from duplicates using fields in the supported object field map — no “longest wins” or picklist union logic.

Cross-object conversion internals
  • Groups in Cross_Object_Group__c; keys on DCM_Cross_Duplicate_Key__c.
  • Conversion uses standard Lead convert — not merge DML.
  • Create Opportunity preference maps through a legacy API with an inverted flag — verify behavior in a sandbox when changing Settings → Lead → Account, Contact.
  • Default converted status: Qualified if not configured.
  • Counts as 1 merge against trial license limits.
  • Page size: 20 groups; no mass merge or multi-select.
  • Does not interact with Salesforce Duplicate Rules.
Post-merge logging and warnings
  • Successful mass-merge groups are deleted; Duplicate_Report__c counters update.
  • Failures log to Merge_Log__c (max message 32,000 chars).
  • At most 50 failed record IDs listed per entry.
  • Retention: most recent 45 warnings; older entries pruned automatically.