Master Rules allow for automated selection of master records for each group in the results grid based on attributes of the records in the duplicate group.
Select a Pre-built Rule or Create a Custom Rule
1. Selecting a Pre-Built Master Rule
- DemandTools ships with a number of pre-built master rules for common logic used when selecting master records. These can be used as is or modified as needed.
- Pre-built Master Rules will be displayed in the upper right hand portion of Step 3 - Results Grid
- Check the desired rule and follow the instructions in section below: Applying A Selected Master Rule
- Detailed descriptions of all the pre-built master rules that ship with DemandTools can be found HERE.
2. Creation and Editing of Master Rules
- Users have the option to create their own master rules based on their specific business needs. The New Rule and Edit Rule buttons can be used to create/modify rules.
- When building a master rule there is the option to add unlimited conditions for analyzing either the record (as a whole) or the field values that the record contains.
- At the record level, options such as oldest, newest, most recently modified, and active owner (note that RECORD is the field selection for these options to appear). Constraints will vary based on the table being deduped. For field values, the Single Table Dedupe displays constraints appropriate for the data type of the field being analyzed.
- 1: Add Condition(s)
- Pick the field to base a condition on
- Any field in that particular table can be used within the rule, including custom fields
- RECORD (as a field name) allows constraint selections based on the "RECORD as a whole"
- Most XX Objects: Can pick any object to do a real-time count, including custom objects
- If Tasks are chosen to be counted ALL Tasks will be counted including archived Tasks
- Most Complete Record: Picks the record with the most populated fields
- Most Recent Opportunity (for Accounts only): Picks the Account record with the newest Opportunity (based on created date)
- Standard Owner: If Partner Portal/Communities are enabled keeps the record owned by the standard user owner vs. a portal user owner
- Portal User (for Contacts only): Picks the Contact that is also a Portal/Community user as the master
- Select the constraint
- Options will vary based on the type of field selected
- Equals/Does Not Equal, Contains/Does Not Contain, Is Populated/Is Not Populated, Oldest/Newest, Largest/Smallest etc.
- Upper Case, Lower Case, Mixed Case, Longest String
- Select the value if applicable
- To OR multiple text values use a | (pipe) symbol (vs. a comma) between each value Detailed information on OR'ing text values in a Master rule can be found in the Validity Community Forum Post Master Rule Condition: Using OR in a condition for multiple text values.
- Select a score for each constraint
- Scores are used to weight the importance of a particular constraint
- A record will receive that score if the criteria is met
- The default rules that ship with the software are based upon a 100 point scoring system, but any system can be used.
- NOTE: The Maximum score for any individual condition is 1024
- Negative scores can be applied to penalize a record
- When adding multiple constraints, the record is scored in cumulative fashion with each additional positive expression adding to the total score of the records
- The record with the highest score will be chosen as the master
- Pick the field to base a condition on
- 2: Using the Score Delta
- The final component to creating a Master Rule is the decision to use or not use a score delta. The score delta will be used by the deduper to help determine master vs. non-master records. The value of the score delta determines how many points away a master record has to score from the next nearest non-master record in order to be selected as the master.
When Unchecked (NOT USING A SCORE DELTA)
- The Master Rule will score the records
- The record with the highest score will be chosen as the master
- In the event of a tie score, the first record in the group will be chosen as the master
When Checked (USING A SCORE DELTA)
- Select the number of points a record needs to score higher than all others to be chosen as the master
- A delta of 1 is the default (when checked) but higher deltas can be chosen (e.g. needs to score higher by 10 points)
- A master record will ONLY be selected when one record scores higher by the amount of the chosen delta
- In the event of a tie score (or the delta is not met) a master WILL NOT be selected
- The scores will be displayed, but the pins will remain gray and the boxes, unchecked
- 3: Rule Name
- Name the Custom Rule and Save
- Master Rules are saved locally on the PC in the DemandToolsData\MasterRules directory
- To share Master Rules with other users, this directory can be moved to a shared drive or rules can be emailed to another user and then saved on that users DemandToolsData\MasterRules directory
- More information on file paths can be found HERE.
Step 2: Applying a Selected Master Rule
To apply a master rule click one of the Current Master Rule options in Grid Control
- All: Applies the selected Master Rule to all records
- Checked: Applies the selected Master Rule to any checked sets
- Unchecked: Applies the selected Master Rule to unchecked sets
The Unchecked option allows users to apply a rule to all records, then apply a different rule to any sets that did not have a master selected, or make manual selections for key groups then apply a rule to what's left (the unchecked)
Alternatively, master records can be selected based on the currently selected master rule in the upper right hand of the interface when the end user selects Merged Checked Records and the merge process will be completed (this option will not allow for master selections to be reviewed before merging, the master selection and merging happen in one step)
If a score delta was used in the selected Master Rule such that not all groups may have had a master selected, the results can be displayed by checked or unchecked by selecting the appropriate option in "Grid Display" at the bottom of the results grid:
All master selections should be reviewed carefully to ensure logic worked as expected before executing the merge
NOTE: Applying a Master Rule "To All" will overwrite manual and custom merge settings.
If manual selections have been made select "Merged Checked Records" to merge these groups and then apply a master rule to the remaining groups in the results grid.
Or:
1. Apply the rule first and then overwrite with manual selections
2. Apply to Unchecked so only groups without a master will have the rule applied