What is a Filtering Rule and how to use it

Refine duplicate detection in Salesforce by defining exclusion rules in Delpha. Learn how to use field comparisons, operators, and comments to discard false matches.

How to Define Exclusion Rules for Duplicate Pairs in Delpha

After Delpha identifies potential duplicate pairs, you may want to refine, exclude, or annotate some of them using exclusion rules. These rules help automatically filter out certain matches based on field-level comparisons and predefined logic.

What Are Exclusion Rules?

Exclusion rules let you define custom logic to update the status of a duplicate pair and optionally add a comment explaining why the pair should not be considered a valid match.

  • ✅ If a rule is triggered → The pair's status is changed to Auto No, and a comment is added.

  • ❌ If not triggered → No change in status, but a comment may still be added depending on your settings.

How to Define an Exclusion Rule

  1. Select the Field to Compare Choose a field from the object (Account, Contact, etc.).

  1. Choose an Operator Operators (case-sensitive, lowercase) define how the field is evaluated:

  • same: Both field values are equal

  • not same: Field values are different

  • empty: Field is empty for both records

  • not empty: Field is filled in both records

  • equal: Field value equals a specific value

  • not equal: Field value does not equal a specific value

  • greater than, lower than: Compare numerical or date values

  1. Enter Comparison Value (if needed) Only required for: equal, not equal, greater than, lower than No input needed for: same, not same, empty, not empty

  2. Define the Action (Discard Field)

    • discard = true: Pair is marked as Auto No, and the comment is added

    • discard = false: Only the comment is added; status remains unchanged

  3. Add a Comment (Optional) Define a custom message to populate the Comment field when the rule is applied. This helps document the logic behind each exclusion.

Rule Logic & Conditions

  • Within a rule: Conditions use AND logic

  • Across multiple rules: Evaluation uses OR logic

  • Evaluation order: Rules are applied from top to bottom

Practical Examples (Accounts)

Rule
Condition(s)
Action
Comment

1

Not Same RecordType + Equal RecordType = Group

Discard

"group"

2

Not Same RecordType + Equal RecordType = Partnership + Equal RecordType = Entity

Discard

"Partnership vs Entity"

3

Not Same RecordType

Discard

"record type"

4

Not Same City

Discard

(Add comment)

5

Not Same Country

Discard

(Add comment)

6

Not Same NetSuiteId (custom)

Discard

(Add comment)

7

Not Same Account Segment (custom)

Discard

(Add comment)

8

Not Same Account Type (custom)

Discard

(Add comment)


Examples in JSON

[  
# RULE 1
   {
    "name" :  "Rule 1",
    "comment" : "One record type is a Group",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"RecordType",
      "operator":"not same"
     },
# AND
     {
      "field":"RecordType",
      "operator":"equal",
      "value”:"Group"
     }
    ]
   },                    
# OR
# RULE 2
   {
    "name": "Rule 2",
    "comment":"Partnership vs Entity",
    "discard":true,
    "rules" : 
    [
     {
      "field":"RecordType",
      "operator":"not same"
     },
# AND
     {
      "field":"RecordType",
      "operator":"equal",
      "value" : "Partnership"
     },
# AND 
     {
      "field":"RecordType",
      "operator":"equal",
      "value" : "Entity"
     } 
    ]
   },
# OR
# RULE 3
   {
    "name" :  "Rule 3",
    "comment" : "Different RecordType",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"RecordType",
      "operator":"not same"
     }
    ]
  },

# OR
# RULE 4
   {
    "name" :  "Rule 4",
    "comment" : "Different City",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"BillingCity",
      "operator":"not same"
     }
    ]
   },
# OR
# RULE 5
   {
    "name" :  "Rule 5",
    "comment" : "Different Country",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"BillingCountry",
      "operator":"not same"
     }
    ]
   },
# OR
# RULE 6
   {
    "name" :  "Rule 6",
    "comment" : "Different NetSuite Id",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"NetSuiteId__c",
      "operator":"not same"
     }
    ]
   },
# OR
# RULE 7
   {
    "name" :  "Rule 7",
    "comment" : "Different Segment",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"AccountSegment__c",
      "operator":"not same"
     }
    ]
   },
# OR
# RULE 8
   {
    "name" :  "Rule 8",
    "comment" : "Different AccountType",
    "discard" : true,
    "rules" : 
    [
     {
      "field":"AccountType__c",
      "operator":"not same"
     }
    ]
   },
# OR
# RULE 9
   {
    "name" :  "Rule 9",
    "comment" : "French Duplicate",
    "discard" : false,
    "rules" : 
    [
     {
      "field":"BillingCountry",
      "operator":"same"
     },
#AND
     {
      "field":"BillingCountry",
      "operator":"equal",
      "value”:"France"
     }
    ]
   }
]
  • #AND and #OR are here for readability purpose only. They should be removed before applying the JSON.

  • API names must be used in JSON for the field tag.

Last updated

Was this helpful?