Match Algorithms
This page explains how Data Cleanser matches records under the hood. For day-to-day setup, start with the Match Rules page — return here when you need to tune scenarios, debug unexpected groups, or explain behavior to administrators.
Composite duplicate keys
Every match rule normalizes a field value into a token. Tokens are concatenated with underscores into
one composite key stored on each CRM record as DCM_Duplicate_Key__c. A human-readable version lives in
DCM_Duplicate_Key_Re__c.
- All match rules in a scenario are ANDed. Every populated rule must produce the same token for two records to group.
- Final token normalization: remove spaces, uppercase.
- Blank fields are omitted from the key. If Email is empty, that segment is skipped — not treated as “match on blank.” Two records can still group when their populated segments align, which can be broader than users expect.
Fuzzy is phonetic, not general typo tolerance. “Fuzzy” uses a 4-character Soundex-style code. Two values match only when their codes are identical after normalization — not when they are merely “close” in spelling. Use Word Mapping for synonyms like Corp → Corporation.
Matching types — implementation reference
| Matching type | What the engine does |
|---|---|
| Exact | Raw field value, then space-stripped uppercase. |
| Fuzzy | Soundex-style 4-character code (see below). |
| Word Mapping | Lookup in Word Mapping list; fallback to raw value. |
| Word Mapping Fuzzy | Word Mapping normalization, then Soundex code. |
| Word Removal | Split on spaces; drop Remove Words tokens; concatenate remainder. |
| Word Removal Fuzzy | Word removal, then Soundex code. |
| Alpha and Numeric characters only | Extract [A-Za-z0-9]+ segments and concatenate. |
| Numeric | Strip letters and common punctuation/symbols. |
| Relaxed Phone | Extract digit runs; drop a leading 1 (US country code). |
| First Word only | First space-delimited token only. |
| Street Address | Uppercase; replace CRESCENT→CRES, ROAD→RD, STREET→ST only. |
| X-Letters | First N characters, where N = count of X in the match type name. |
How “Fuzzy” (Soundex-style) works step by step
- Uppercase the input value.
- Map letters to digit groups: BFPV→1, CGJKQSXZ→2, DT→3, L→4, MN→5, R→6 (other letters → 0).
- Keep the first letter; deduplicate consecutive digit codes; strip zeros.
- Pad or truncate to exactly 4 characters.
- Two records match on a Fuzzy rule only when both codes are identical.
Examples: “Smith” and “Smyth” often share a code; “Acme Corp” and “Acme Corporation” will not unless Word Mapping normalizes them first.
Word Mapping and Remove Words pipeline
Dictionaries live under Settings → Word Mapping and Removal and are stored in the org-wide custom
setting Word_Mapping_Public__c.
-
Word Mapping tab —
Is_Remove__c = false. MapsName→Matching_Word__c(e.g. Corp → Corporation). -
Remove Words tab —
Is_Remove__c = true. Tokens inNameare stripped before comparison. - Loaded once per scan transaction and cached in memory for that run.
Cross-object match keys
- Lead side: field API names strip the
Lead#prefix. -
Contact side: uses
Cross_Field_Name__c, stripsContact#; supportsAccount#Fieldto read from the contact’s related Account. -
Cross-object keys are stored in
DCM_Cross_Duplicate_Key__c— not the same-objectDCM_Duplicate_Key__cfield.
See also Cross-Object: Converting Duplicate Leads for the user-facing conversion workflow.