Sub topic 6
Matching equations, field conditions and blank fields
This chapter assumes you know how to open Setup, that you understand the difference between exact and fuzzy matching, and that you have started building a custom matching rule. Here you will learn how the matching equation combines field conditions. You will also learn what happens when a field is empty.
What a matching equation is
A matching equation is the logical expression that a custom matching rule evaluates for each pair of records. It is built from field conditions joined by AND and OR. If the whole equation is true for two records, the rule reports them as a match.
Each field condition names one field and one matching method, such as Exact or Fuzzy: First Name. Salesforce also lets you pick Match Blank Fields for that field.
Combining conditions with AND and OR
Setup shows the equation as a list of conditions. By default it joins conditions with AND, and you can switch to OR or write a custom expression, for example (1 AND 2) OR 3.
- AND narrows the result. Every joined condition must match.
- OR widens the result. Any one condition is enough.
(Fuzzy: Last Name AND Fuzzy: First Name AND Exact: Email) OR (Exact: Phone AND Exact: Last Name)This equation flags two contacts if the names are similar and the emails are identical. It also flags them if the phone number and last name are identical, even when the first names differ.
A small set of conditions in a few OR groups is easier to test and explain than one long chain. Keep the number of fields low.
How blank fields are treated
By default, a blank field never matches. If two contacts both have an empty Email, the condition Exact: Email is false for that pair. This default prevents false positives, where thousands of records with no email would otherwise match each other.
If you select Match Blank Fields on a condition, two blank values count as equal. Use it carefully.
| Setting | Both values blank | One blank, one filled |
|---|---|---|
| Default | No match | No match |
| Match Blank Fields | Match | No match |
Even with Match Blank Fields on, a blank never matches a filled value.
Effect on the rule
Blank handling explains many "why wasn't this flagged?" cases. Suppose the equation is Fuzzy: Last Name AND Exact: Email. A new contact with no email can never match an existing contact under this equation. To catch that case, add an OR branch that does not depend on email, such as last name plus company.
Common errors
- Putting every field in one AND group, which misses records that are missing any one value.
- Using OR between weak fields such as City, which creates many false matches.
- Forgetting that a rule must be activated and used by a duplicate rule before the equation has any effect.
Exercise
A matching rule uses Fuzzy: Last Name AND Exact: Email, and Match Blank Fields is off. Two contacts are named "Garcia" and both have an empty Email. Does the rule flag them? What change would flag them without enabling Match Blank Fields on Email?
Show answer
No. A blank Email never matches a blank Email by default, so the AND condition is false. Add an OR branch that uses other fields, for example Fuzzy: Last Name AND Fuzzy: First Name AND Exact: Account Name, so records without email can still match.