QUESTION:
If I enable Shared Contacts, what will be the impact when merging Contacts and Accounts via DemandTools?
ANSWER:
As long as "Use Salesforce Merge" is checked (which is the default and highly recommended), the merge will work exactly the same as when merging Accounts and Contacts "within an account" in the Salesforce User Interface as we use Salesforce's API merge code to execute the merge.
Salesforce WILL NOT allow a merge to complete if it will result in duplicate relationships.
*****************
Contact Example:
The Acme account has 2 Jon Smith contact records BOTH with an indirect relationship to XYZ Company. When Salesforce tries to update the contact ID on the non -master's contact relationship record it will be rejected since there is already one with the same contact and account ID.
Account Example:
There are 2 Acme Accounts, and one of the Accounts has a Contact that has an indirect relationship to the OTHER Acme Account. When Salesforce tries to update the Account ID on the non-master's account relationship record it will be rejected since there is already one with the same account and contact ID.
****************
If this is encountered when merging in DemandTools the merge will fail with the following information in the DemandTools logfile (this example is for a contact merge):
- 2016-06-07T15:13:05-06:00,Single Table Dedupe,"Merge To Master",Contact,Merge,003B0000006dyeoIAA,,,,""
- 2016-06-07T15:13:05-06:00,,"Merge Call Failure",,,,,,,"Msg:Before you can merge contacts, you must ensure that the merge won't result in duplicate account relationships by removing these existing relationships:<br/><p><table><th>Account Name</th><th>Contact Names</th><tr><td><a target='_blank' href='/001B000000CwhgG'> XYZ</a></td><td><a target='_blank' href='/003B0000006dyeo'> Jon Smith</a>, <a target='_blank' href='/003B0000006dyeP'> Jon Smith</a></td></tr></table> StatusCode:208 Fields: "
- 2016-06-07T15:13:05-06:00,Single Table Dedupe,"Dedupe complete",,,,,,,""
- 2016-06-07T15:13:05-06:00,Single Table Dedupe,"Batch Dedupe",Contact,,,,,,"0 Contact objects were merged into 0 Contact(s)<CR><LF>There were 1 errors."
Note: The message is provided by Salesforce in raw html (we simply capture it in the log file). If you try to merge the exact same records directly in the Salesforce User Interface the message will be formatted in a readable fashion.
To successfully merge, the user will need to manually access one of the records and remove the relationship that would result in the duplicate, then reprocess the merge.
If there are no conflicts, the merges will complete. Contact/Account relationships on the non-master records are merged onto the master record (i.e. merging Contacts where the non-master Contact has an indirect relationship that DOES NOT currently exist on the master Contact).
***************Merging Contacts Between Accounts******************
Since Salesforce DOES NOT allow merging between Accounts in the user interface, the Salesforce API merge call does not take into consideration that the non-master Account could be different than the master account, and therefore does not check if an indirect relationship should be created as part of the merge process , i.e. when the Salesforce Shared Contacts option "Save the relationship between the contact and the previous primary account as an indirect relationship" is selected.
However, in DemandTools there is an option to "Reparent Contacts Before Contact Merge". Checking that option will create an indirect relationship on the master Contact since it re-parents the non-master Contact prior to executing the merge. The option can be found in DemandTools -> Options -> General Settings from the top menu.
Note: If the Salesforce Shared Contacts option "Delete the relationship between the contact and the previous primary account" is selected the DemandTools option noted above is irrelevant (no indirect relationship will be created).