Reserved de-dupe rulesAdding value conditions to dedupe rulesCreate new contacts every time someone makes a contribution ( with duplicate emails )Deduping organizationsWhat are the Attributes for the Reserved DeDupe RulesContact Dedupe BasicsCivi duplicate rules with respect to email & primary versus location typeEmployer on Profile - MismatchingDedupe Rules to import contacts without email addresses *UPDATE*Import Contacts with dedupe rulesUnsupervised reserved rule for individuals not working

What is a clear way to write a bar that has an extra beat?

AES: Why is it a good practice to use only the first 16bytes of a hash for encryption?

Watching something be written to a file live with tail

Brothers & sisters

What's the difference between 'rename' and 'mv'?

Does a druid starting with a bow start with no arrows?

Can one be a co-translator of a book, if he does not know the language that the book is translated into?

Anagram holiday

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Blender 2.8 I can't see vertices, edges or faces in edit mode

Forgetting the musical notes while performing in concert

Today is the Center

Doing something right before you need it - expression for this?

Why do I get two different answers for this counting problem?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Why doesn't H₄O²⁺ exist?

Can a virus destroy the BIOS of a modern computer?

How to draw the figure with four pentagons?

Should I tell management that I intend to leave due to bad software development practices?

How do I write bicross product symbols in latex?

How can I tell someone that I want to be his or her friend?

Why does Arabsat 6A need a Falcon Heavy to launch

Is it legal for company to use my work email to pretend I still work there?

A reference to a well-known characterization of scattered compact spaces



Reserved de-dupe rules


Adding value conditions to dedupe rulesCreate new contacts every time someone makes a contribution ( with duplicate emails )Deduping organizationsWhat are the Attributes for the Reserved DeDupe RulesContact Dedupe BasicsCivi duplicate rules with respect to email & primary versus location typeEmployer on Profile - MismatchingDedupe Rules to import contacts without email addresses *UPDATE*Import Contacts with dedupe rulesUnsupervised reserved rule for individuals not working













3















I'm wanting to refine the de-duping rules, but first of all I'd like to find out exactly what the predefined rules are before I create my own. They are reserved, so you can't edit them, which is fine, but it only tells you which fields they use and not what the weights and thresholds are so the full behaviour is not clear.










share|improve this question


























    3















    I'm wanting to refine the de-duping rules, but first of all I'd like to find out exactly what the predefined rules are before I create my own. They are reserved, so you can't edit them, which is fine, but it only tells you which fields they use and not what the weights and thresholds are so the full behaviour is not clear.










    share|improve this question
























      3












      3








      3


      1






      I'm wanting to refine the de-duping rules, but first of all I'd like to find out exactly what the predefined rules are before I create my own. They are reserved, so you can't edit them, which is fine, but it only tells you which fields they use and not what the weights and thresholds are so the full behaviour is not clear.










      share|improve this question














      I'm wanting to refine the de-duping rules, but first of all I'd like to find out exactly what the predefined rules are before I create my own. They are reserved, so you can't edit them, which is fine, but it only tells you which fields they use and not what the weights and thresholds are so the full behaviour is not clear.







      duplicate-contacts






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 hours ago









      Mick KahnMick Kahn

      641216




      641216




















          3 Answers
          3






          active

          oldest

          votes


















          2














          If you have access to the database type



          SELECT * from civicrm_dedupe_rule r inner join civicrm_dedupe_rule_group rg on rg.id = r.dedupe_rule_group_id;



          which will give you a table which isn't pretty but is mostly understandable.






          share|improve this answer

























          • Ah you're right. I'll update answer.

            – Demerit
            11 hours ago











          • Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

            – Mick Kahn
            9 hours ago


















          2














          Using Demerit's correct and useful answer above, here are the details in plain text of the three pre-configured rules that you can't see by the normal method, so may be of use to others:



          Name and Email (reserved): Supervised: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 7



          Email: Length "null", Weight 10



          Threshold 20



          Email (reserved): Unsupervised: Individual



          Email: Length "null", Weight 10



          Threshold 20



          Name and Address (reserved): General: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 5



          Street Address: Length "null", Weight 5



          Middle Name: Length "null", Weight 1



          Suffix: Length "null", Weight 1



          Threshold: 15






          share|improve this answer


















          • 1





            Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

            – petednz - fuzion
            7 hours ago







          • 1





            For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

            – petednz - fuzion
            7 hours ago


















          1














          Demerit's and Mick's answers are incorrect for the (built-in) reserved rules - though it's definitely confusing!



          If a RuleGroup has a value in the name field, and that name corresponds to a filename in CRM/Dedupe/BAO/QueryBuilder, then the customized SQL in those files will be used. The existing entries in civicrm_rule for those RuleGroups are holdovers from before that system existed, and editing them has no effect.



          "Standard" dedupe rules with multiple criteria are very inefficient compared to handwritten SQL, which is why this is a valuable technique. You can create your own handwritten queries with hook_civicrm_dedupe, and the Veda dedupe extension has a number of excellent examples. Note that this extension doesn't work on modern Civi because of some of its other functions, but the dedupe rules can be ripped out into something else.



          Finally - I learned just yesterday that the built-in handwritten dedupe rules seem to execute different SQL when comparing in Unsupervised/Supervised mode (a single contact) vs. General mode (find all dupes). While I haven't proved it, I suspect that if you're in the rare scenario of needing to optimize your unsupervised/supervised dedupes, creating a new class to extend CRM_Dedupe_BAO_QueryBuilder is the way to go. I just posted org.agbu.optimizeddedupe to provide an example of this.






          share|improve this answer























          • Thanks. Good lord...

            – Demerit
            1 hour ago











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "605"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcivicrm.stackexchange.com%2fquestions%2f29155%2freserved-de-dupe-rules%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          If you have access to the database type



          SELECT * from civicrm_dedupe_rule r inner join civicrm_dedupe_rule_group rg on rg.id = r.dedupe_rule_group_id;



          which will give you a table which isn't pretty but is mostly understandable.






          share|improve this answer

























          • Ah you're right. I'll update answer.

            – Demerit
            11 hours ago











          • Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

            – Mick Kahn
            9 hours ago















          2














          If you have access to the database type



          SELECT * from civicrm_dedupe_rule r inner join civicrm_dedupe_rule_group rg on rg.id = r.dedupe_rule_group_id;



          which will give you a table which isn't pretty but is mostly understandable.






          share|improve this answer

























          • Ah you're right. I'll update answer.

            – Demerit
            11 hours ago











          • Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

            – Mick Kahn
            9 hours ago













          2












          2








          2







          If you have access to the database type



          SELECT * from civicrm_dedupe_rule r inner join civicrm_dedupe_rule_group rg on rg.id = r.dedupe_rule_group_id;



          which will give you a table which isn't pretty but is mostly understandable.






          share|improve this answer















          If you have access to the database type



          SELECT * from civicrm_dedupe_rule r inner join civicrm_dedupe_rule_group rg on rg.id = r.dedupe_rule_group_id;



          which will give you a table which isn't pretty but is mostly understandable.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 11 hours ago

























          answered 12 hours ago









          DemeritDemerit

          4,0662621




          4,0662621












          • Ah you're right. I'll update answer.

            – Demerit
            11 hours ago











          • Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

            – Mick Kahn
            9 hours ago

















          • Ah you're right. I'll update answer.

            – Demerit
            11 hours ago











          • Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

            – Mick Kahn
            9 hours ago
















          Ah you're right. I'll update answer.

          – Demerit
          11 hours ago





          Ah you're right. I'll update answer.

          – Demerit
          11 hours ago













          Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

          – Mick Kahn
          9 hours ago





          Thanks that tells me what I need, so I have deleted my earlier comment on your previous version of the answer

          – Mick Kahn
          9 hours ago











          2














          Using Demerit's correct and useful answer above, here are the details in plain text of the three pre-configured rules that you can't see by the normal method, so may be of use to others:



          Name and Email (reserved): Supervised: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 7



          Email: Length "null", Weight 10



          Threshold 20



          Email (reserved): Unsupervised: Individual



          Email: Length "null", Weight 10



          Threshold 20



          Name and Address (reserved): General: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 5



          Street Address: Length "null", Weight 5



          Middle Name: Length "null", Weight 1



          Suffix: Length "null", Weight 1



          Threshold: 15






          share|improve this answer


















          • 1





            Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

            – petednz - fuzion
            7 hours ago







          • 1





            For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

            – petednz - fuzion
            7 hours ago















          2














          Using Demerit's correct and useful answer above, here are the details in plain text of the three pre-configured rules that you can't see by the normal method, so may be of use to others:



          Name and Email (reserved): Supervised: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 7



          Email: Length "null", Weight 10



          Threshold 20



          Email (reserved): Unsupervised: Individual



          Email: Length "null", Weight 10



          Threshold 20



          Name and Address (reserved): General: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 5



          Street Address: Length "null", Weight 5



          Middle Name: Length "null", Weight 1



          Suffix: Length "null", Weight 1



          Threshold: 15






          share|improve this answer


















          • 1





            Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

            – petednz - fuzion
            7 hours ago







          • 1





            For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

            – petednz - fuzion
            7 hours ago













          2












          2








          2







          Using Demerit's correct and useful answer above, here are the details in plain text of the three pre-configured rules that you can't see by the normal method, so may be of use to others:



          Name and Email (reserved): Supervised: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 7



          Email: Length "null", Weight 10



          Threshold 20



          Email (reserved): Unsupervised: Individual



          Email: Length "null", Weight 10



          Threshold 20



          Name and Address (reserved): General: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 5



          Street Address: Length "null", Weight 5



          Middle Name: Length "null", Weight 1



          Suffix: Length "null", Weight 1



          Threshold: 15






          share|improve this answer













          Using Demerit's correct and useful answer above, here are the details in plain text of the three pre-configured rules that you can't see by the normal method, so may be of use to others:



          Name and Email (reserved): Supervised: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 7



          Email: Length "null", Weight 10



          Threshold 20



          Email (reserved): Unsupervised: Individual



          Email: Length "null", Weight 10



          Threshold 20



          Name and Address (reserved): General: Individual



          First Name: Length "null", Weight 5



          Last Name: Length "null", Weight 5



          Street Address: Length "null", Weight 5



          Middle Name: Length "null", Weight 1



          Suffix: Length "null", Weight 1



          Threshold: 15







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 9 hours ago









          Mick KahnMick Kahn

          641216




          641216







          • 1





            Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

            – petednz - fuzion
            7 hours ago







          • 1





            For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

            – petednz - fuzion
            7 hours ago












          • 1





            Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

            – petednz - fuzion
            7 hours ago







          • 1





            For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

            – petednz - fuzion
            7 hours ago







          1




          1





          Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

          – petednz - fuzion
          7 hours ago






          Not blaming you at all but some of those look a bit nuts. Is it possible you mis-copied the Email Unsupervised? Having Email = 10 and Threshold = 20 does not seem healthy. I do not see that on a site i just checked. The Threshold was set to 10.

          – petednz - fuzion
          7 hours ago





          1




          1





          For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

          – petednz - fuzion
          7 hours ago





          For the Name and Address (which I do see the same on a db i just checked) have Middle Name = 1 and Suffix = 1 for a Threshold of 15 seems pointless as they will never play a role in determining someone is a match will they?

          – petednz - fuzion
          7 hours ago











          1














          Demerit's and Mick's answers are incorrect for the (built-in) reserved rules - though it's definitely confusing!



          If a RuleGroup has a value in the name field, and that name corresponds to a filename in CRM/Dedupe/BAO/QueryBuilder, then the customized SQL in those files will be used. The existing entries in civicrm_rule for those RuleGroups are holdovers from before that system existed, and editing them has no effect.



          "Standard" dedupe rules with multiple criteria are very inefficient compared to handwritten SQL, which is why this is a valuable technique. You can create your own handwritten queries with hook_civicrm_dedupe, and the Veda dedupe extension has a number of excellent examples. Note that this extension doesn't work on modern Civi because of some of its other functions, but the dedupe rules can be ripped out into something else.



          Finally - I learned just yesterday that the built-in handwritten dedupe rules seem to execute different SQL when comparing in Unsupervised/Supervised mode (a single contact) vs. General mode (find all dupes). While I haven't proved it, I suspect that if you're in the rare scenario of needing to optimize your unsupervised/supervised dedupes, creating a new class to extend CRM_Dedupe_BAO_QueryBuilder is the way to go. I just posted org.agbu.optimizeddedupe to provide an example of this.






          share|improve this answer























          • Thanks. Good lord...

            – Demerit
            1 hour ago















          1














          Demerit's and Mick's answers are incorrect for the (built-in) reserved rules - though it's definitely confusing!



          If a RuleGroup has a value in the name field, and that name corresponds to a filename in CRM/Dedupe/BAO/QueryBuilder, then the customized SQL in those files will be used. The existing entries in civicrm_rule for those RuleGroups are holdovers from before that system existed, and editing them has no effect.



          "Standard" dedupe rules with multiple criteria are very inefficient compared to handwritten SQL, which is why this is a valuable technique. You can create your own handwritten queries with hook_civicrm_dedupe, and the Veda dedupe extension has a number of excellent examples. Note that this extension doesn't work on modern Civi because of some of its other functions, but the dedupe rules can be ripped out into something else.



          Finally - I learned just yesterday that the built-in handwritten dedupe rules seem to execute different SQL when comparing in Unsupervised/Supervised mode (a single contact) vs. General mode (find all dupes). While I haven't proved it, I suspect that if you're in the rare scenario of needing to optimize your unsupervised/supervised dedupes, creating a new class to extend CRM_Dedupe_BAO_QueryBuilder is the way to go. I just posted org.agbu.optimizeddedupe to provide an example of this.






          share|improve this answer























          • Thanks. Good lord...

            – Demerit
            1 hour ago













          1












          1








          1







          Demerit's and Mick's answers are incorrect for the (built-in) reserved rules - though it's definitely confusing!



          If a RuleGroup has a value in the name field, and that name corresponds to a filename in CRM/Dedupe/BAO/QueryBuilder, then the customized SQL in those files will be used. The existing entries in civicrm_rule for those RuleGroups are holdovers from before that system existed, and editing them has no effect.



          "Standard" dedupe rules with multiple criteria are very inefficient compared to handwritten SQL, which is why this is a valuable technique. You can create your own handwritten queries with hook_civicrm_dedupe, and the Veda dedupe extension has a number of excellent examples. Note that this extension doesn't work on modern Civi because of some of its other functions, but the dedupe rules can be ripped out into something else.



          Finally - I learned just yesterday that the built-in handwritten dedupe rules seem to execute different SQL when comparing in Unsupervised/Supervised mode (a single contact) vs. General mode (find all dupes). While I haven't proved it, I suspect that if you're in the rare scenario of needing to optimize your unsupervised/supervised dedupes, creating a new class to extend CRM_Dedupe_BAO_QueryBuilder is the way to go. I just posted org.agbu.optimizeddedupe to provide an example of this.






          share|improve this answer













          Demerit's and Mick's answers are incorrect for the (built-in) reserved rules - though it's definitely confusing!



          If a RuleGroup has a value in the name field, and that name corresponds to a filename in CRM/Dedupe/BAO/QueryBuilder, then the customized SQL in those files will be used. The existing entries in civicrm_rule for those RuleGroups are holdovers from before that system existed, and editing them has no effect.



          "Standard" dedupe rules with multiple criteria are very inefficient compared to handwritten SQL, which is why this is a valuable technique. You can create your own handwritten queries with hook_civicrm_dedupe, and the Veda dedupe extension has a number of excellent examples. Note that this extension doesn't work on modern Civi because of some of its other functions, but the dedupe rules can be ripped out into something else.



          Finally - I learned just yesterday that the built-in handwritten dedupe rules seem to execute different SQL when comparing in Unsupervised/Supervised mode (a single contact) vs. General mode (find all dupes). While I haven't proved it, I suspect that if you're in the rare scenario of needing to optimize your unsupervised/supervised dedupes, creating a new class to extend CRM_Dedupe_BAO_QueryBuilder is the way to go. I just posted org.agbu.optimizeddedupe to provide an example of this.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Jon G - Megaphone TechJon G - Megaphone Tech

          27.5k11872




          27.5k11872












          • Thanks. Good lord...

            – Demerit
            1 hour ago

















          • Thanks. Good lord...

            – Demerit
            1 hour ago
















          Thanks. Good lord...

          – Demerit
          1 hour ago





          Thanks. Good lord...

          – Demerit
          1 hour ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to CiviCRM Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcivicrm.stackexchange.com%2fquestions%2f29155%2freserved-de-dupe-rules%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to create a command for the “strange m” symbol in latex? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How do you make your own symbol when Detexify fails?Writing bold small caps with mathpazo packageplus-minus symbol with parenthesis around the minus signGreek character in Beamer document titleHow to create dashed right arrow over symbol?Currency symbol: Turkish LiraDouble prec as a single symbol?Plus Sign Too Big; How to Call adfbullet?Is there a TeX macro for three-legged pi?How do I get my integral-like symbol to align like the integral?How to selectively substitute a letter with another symbol representing the same letterHow do I generate a less than symbol and vertical bar that are the same height?

          Българска екзархия Съдържание История | Български екзарси | Вижте също | Външни препратки | Литература | Бележки | НавигацияУстав за управлението на българската екзархия. Цариград, 1870Слово на Ловешкия митрополит Иларион при откриването на Българския народен събор в Цариград на 23. II. 1870 г.Българската правда и гръцката кривда. От С. М. (= Софийски Мелетий). Цариград, 1872Предстоятели на Българската екзархияПодмененият ВеликденИнформационна агенция „Фокус“Димитър Ризов. Българите в техните исторически, етнографически и политически граници (Атлас съдържащ 40 карти). Berlin, Königliche Hoflithographie, Hof-Buch- und -Steindruckerei Wilhelm Greve, 1917Report of the International Commission to Inquire into the Causes and Conduct of the Balkan Wars

          Category:Tremithousa Media in category "Tremithousa"Navigation menuUpload media34° 49′ 02.7″ N, 32° 26′ 37.32″ EOpenStreetMapGoogle EarthProximityramaReasonatorScholiaStatisticsWikiShootMe