Showing results for 
Search instead for 
Did you mean: 

Master ID



The company I work for has previously developed various scenarios, rule sets and field rules for use in our deduplication process in an older version of DemandTools. Most of these scenarios have been migrated and/or implemented in the most recent version of DemandTools. Yet, there are several gaps in the documenation I have available of said scenarios and it's functionality.

  1. The first question I have, there is a custom field in our Salesforce environment which is used to denote the Salesforce ID of the new master record on the deduped contact. It's goal is to, in a different system, link those two contacts together as well to make sure calculations based on relation number. My question is this: is it possible to, when merging two contacts, to automatically fill the custom Master ID field on the duped contact with the ID of the new master contact?
  2. Second question, there is also a custom database management field based on a picklist which denotes that a duped contact has been merged with another contact. Is there a way to fill in a value from said picklist on all duped contacts in a run (these are the same values)?

If both are not possible, how do I make these challenges work in an alternative manor?

Thanks in advance!


Validity Team Member
Validity Team Member

Hi @FlorianW,

Thank you for reaching out.

  1. This is possible, but not necessarily always direct.  Firstly, does the SF ID on the custom field align with the actual records ID?  Have you thought of using a scheduled Modify job to update that field on all records on a regular basis?
    1. This could be accomplished after the merge by using the Modify module to copy the SF ID to the custom field using the Field to Field action.
    2. Depending on how easy your Winner Rules are, you could possibly do a custom score on the field in our Field Rules area.  This is unlikely to be easy if you have many rules in place for Winner Rules, but can be done.  Once setup, you wouldn't have to do it again on that specific scenario.


Anthony Lardiere Jr
Senior Customer Success Manager

Hi Anthony (@AnthonyValidity),

Thanks for your reply. Please find below the answers to your questions:

  1. Short answer, yes. Say contact A has SF ID '1' and contact B has SF ID '2'. Based on our winner rules, contact B becomes the master. All child objects under contact A are merged to contact B and field values are populated based on the field rules. However: I need the SF ID of '2' to be added to this 'Master ID' field under contact A. That field remains empty under contact B as there is no master contact besides itself. Ideally I would want to update the 'Master ID' field from the merge process.
  2. Basically the same applies here, except it is a constant value. Same scenario: everything under contact A gets merged into contact B. After the merge I need a 'DMBT reason' field populated with a value that indicates that this contact (A) has been merged. Basically part 2 of the indication that contact A has been de-duped.

Hope that clears things up.


Validity Team Member
Validity Team Member

Hi @FlorianW ,

I think I have a workflow that will give you the desired results you're looking for.  It utilizes both the Dedupe and Import modules and can be scheduled.

Please let me know how this goes for you.

Adding Winner ID and Constant to Duplicate Record After Merge in Dedupe

 When deciding to not delete duplicate records after a merge in Dedupe and wanting to relate the Winning record back to the duplicate record using the Winning record’s Salesforce ID in a custom field on the duplicate record and adding a constant indicating that the duplicate record was merged, you can use a multi-module workflow using both Dedupe and Import.

Step 1:  Record Selection Criteria (RSC) and Fields to Show on Preview

  1. Launch DemandTools 5.x and open the Dedupe module.
  2. Select Source as CRM Object.
  3. Select the object you’d like to dedupe – in our example it is the Contact Object.
  4. In the RSC, condition on a subset of records if desired.  Take note of this conditioning as you will use it in Import later.
  5. Choose any fields you’d like to see in the Merge Management / Preview screen before merging the records.

Step 2: Matched Records / Fields to Compare

  1. Choose what fields you’d like to compare to create a duplicate match.  You can utilize cross-field matching, Comparison Types, and algorithms as desired.

Step 3: Merge Management / Preview Screen

  1. Apply Winner Rules or choose the Winning records manually.
  2. Apply Field Rules if desired.
  3. Under Merge Options, check the Add Prefix checkbox.  Choose a field that is not part of step 1 or step 2 to add a prefix to all duplicate records (non-winning).
  4. Perform the merge and review audit log.


Step 1:  Data Mapping

  1. Launch DemandTools 5.x and open the Import module.
  2. Select as the Source environment as the same environment you’re currently logged into in the top right corner.
  3. Choose the Salesforce Object that you focused on in the Dedupe module.
  4. In Filter Records, use the same conditions you use in the Dedupe module PLUS the field you selected in Merge Options “NOT starts with” and the prefix you chose.
  5. For Operation, choose Update.
  6. For Method, choose Match Conditions.
  7. For the second Salesforce Object, choose the same object as the first Salesforce Object which should be the same object that you worked on in the Dedupe module.
  8. Map all fields that you want to match to, update, and see on the source side of the Preview screen.  Most fields should be DO NOT UPDATE except for:
    1. Id = Custom Field to enter the Winning records SF ID on the duplicate record(s).
  9. Use the Add Constant area to add a constant where all records updated will have a checkbox indicating that they were merged into another record.


Step 2:  Select Records (Target Records)

  1. In the Record Selection Criteria (RSC), select the field you added the prefix to in the Dedupe scenario and add the condition “Starts with” and then the prefix you decided to use.
  2. Choose fields you’d like to see for the Target Records (duplicate records) in the Fields to Show on Preview area.


Step 3:  Match Records

  1. Mimic the match conditions from Fields to Compare in Dedupe in Match Step 1 of the Import scenario.
  2. DO NOT choose a Winner Rule.  If you choose a Winner Rule, any set of records in a match where there are multiple duplicate records will not all be updated with the Winning records Salesforce ID.  When you do not choose a Winning Rule, all records matched will be updated.


Step 4:  Preview screen

  1. Review the match results being sure to look at both the source and target record values.
  2. Perform the update by hitting the Import button.
  3. Review the audit log.


Conclusion: After the update, all duplicate records (non-winning records) should now have their Winning record equivalent’s Salesforce ID on your custom field.  Also, all updated records should now have the constant value that you added in step 1 indicating the updated record was merged into a Winning record.




Anthony Lardiere Jr
Senior Customer Success Manager

Hi @AnthonyValidity,

I will send you a response on your DM so that I can refer to some elements in the workflow a little more specifically.