3

I'm just starting to use CiviCRM. So I realize that this could be a very dumb question.

I'm trying to deduplicate contacts by name AND surname. When I create a new deduplicating rule using name and surname, it looks like it gets all the contacts with the same name OR surname.

For example, if I have

  • Mario Rossi
  • Mario Verdi
  • Mario Bianchi
  • Mario Neri

they are all shown as duplicates...but they are not.

Is there a way to create a rule which addresses just contacts with same name AND surname (or vice versa)?

Thank you in advance.

3

Welcome to CiviCRM SE. Eileen's answer is definitely the right place to start, but you might want to look at a related question that I asked about the built-in (reserved) de-duplicate rules, as they aren't entirely clear from the documentation. It says "NAME" in the description, but actually uses the fields "First Name" and "Last Name" (You have used different terminology. It took me a while to work out how it worked.

See Reserved de-dupe rules

Update: Remembering odd behaviour with my previous issues, I looked again and have found that the de-dupe rules appear to be cached. So if you create a rule, adjust it and try with the new version, the old version is still used. I missed this before because I was checking the database and the rule is updated properly there. If you go to Administer >> System >> Cleanup Caches and Update Paths and select Cleanup Caches then try the de-dupe rule again it works as expected. If you were experimenting, then I expect this is the problem.

Alternatively if you delete the rule and add the new version it will also work.

A note on the page where you edit de-dupe rules to tell you to clear the cache would be very helpful. Let me know if this solves your problem and I'll report it as a bug/enhancement.

  • Thank you @Mick Kahn Unfortunately that's a little bit beyond me. And for what I get, it doesn't address my issue. I just want to create a simple rule to search for duplicate contacts that have the same First Name AND Last Name. I do not have any built-in rule to do so. The weird thing is that when I create a rule with "Fist Name" (in Italian = Nome) and "Last Name" (in Italian = Cognome) with proper weights, the rule still searches for First Name OR Last Name to match duplicates. Please see screenshots here: [link]snag.gy/yxYSjk.jpg [link]snag.gy/bKy3jO.jpg – Marco Jul 19 '19 at 10:18
  • This reminded me that I say some strange results when I was testing before and so I did some more testing and have updated my answer, which may solve things. – Mick Kahn Jul 19 '19 at 13:47
  • 1
    Great! Cleaning the cache worked perfectly. And yes: it would be nice to have a reminder. Thank you! – Marco Jul 22 '19 at 6:30
2

I think this blog does a reasonable job of describing it https://civicrm.org/blog/spidersilk/understanding-civicrm-dedupe-rules

Here are the official docs

https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/

  • but we could do with pulling some in from the docs

Basically you need to check your weights - if you have them both set to '5' & the threshold is 10 then you need both for a dupe. If the threshold is 5 then either/or

  • 1
    Thank you @eileen. These two articles are very useful! Unfortunately, it's still not working for me. I've set the right threshold to work as AND but they still do not match name AND SURNAME. Please see screenshots here: [link]snag.gy/yxYSjk.jpg [link]snag.gy/bKy3jO.jpg – Marco Jul 19 '19 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.