I created a matching rule and duplicate rule to prevent 2 account records with same value on "Sample" field from being created. I created the matching rule as "Sample" exact match. But when I try to create accounts with duplicate values in "sample" , it's not firing the duplicate rule. What could be the possible reason
Apparently duplicate rules don't fire of there are over 100 matches or something similar. I ran into problems on my development org importing lots of duplicates trying to create an auto merge function. I got it working and then I noticed lots of them were no longer being identified as duplicates while they were earlier.
This me stop straight away as if not every duplicate is caught I can't rely on it
This is because of the limited number of match keys Salesforce uses to identify dupes (in order to speed up their matching algorithm).
As per Salesforce documentation:
In rare instances, match keys result in undetected duplicates, but generally, match keys greatly improve the performance of duplicate rules.
A shorthand (and indexed) representation of each SObject record called a match key is created for each matching rule, as described in the above documentation (e.g. "mpnf415555" might represent a Contact Marc Benioff with phone # 1-415-555-1234). It's intent is to narrow the search the the most likely duplicates, and only the first 100 are checked.
So if you have a high enough data volume, or enough Accounts with similar values in fields included in matching criteria (e.g. a catch-all like "[No Account]"), you are liable to have the records you're trying to detect not included in that first 100.
Not aware of any great workarounds; a non-ideal solution is to alter both records to try and make their match keys unique.