When AutoMerging a set of duplicates, our plugin will preserve populated fields from the loser records (Rank≥2) into UN-populated fields on the winner (Rank=1). It will do this for all fields contained in the comma-separated-list in the AutoMerge-Configuration record for that entity (Account, Contact or Lead). That works great when the Winner has no value, and the Loser does.
Here’s a screenshot of the default field-preservation behavior:
What happens when the Winner AND Loser records both have emailaddress1 populated with different values?
During AutoMerge the loser’s emailaddress1 value would be lost and only available later from the Loser (disabled) record. See how to set up a merged-records subgrid in our user guide so you can view Loser records from the remaining active (Winner) record.
Suppose you want to preserve that Loser:emailaddress1 into the Winner’s emailaddress2 field if both records had emailaddress1 populated with different values AND the Winner:emailaddress2 isn’t populated.
You can do this in a workflow rule that runs in the context of the Loser as it gets AutoMerged into the Winner.
Let’s show how to configure this complex field-preservation logic.
We want this workflow to run only for the Losing Contact which we achieve with the first 2 statements:
> Contact Status Equals Inactive
> Contact AMWinner ContainsData
Then the following addition IF criteria is to check on the specific field we want to run complex preservation rules on:
> Contact Email Contains Data (this is the Loser)
> Contact Email Does Not Equal AM Winner (Contact) Email
> AM Winner (Contact) Email Address 2 Does Not Contain Data
In this example we are also checking that the Winner’s email2 is empty so you are not over-writing it. Adjust this logic to your needs.
Now within the IF Conditional, update the Winner-Contact’s Email2 with the Loser-Contact’s Email1 like this:
Extra-Credit: You could also check that the Winner’s email2, though populated, holds the same value as Winner’s email1 and therefore you could over-write it with the Loser’s email1. Fancy-fancy.
Note: this article is showing how to preserve a single field. If you want to perform complex field preservation on several fields you can do it in the same workflow rule. Simply use the first two criteria in an outer IF-Conditional to make sure the rule is running on the just-deactivated Loser, and add multiple inner IF-conditionals (all parallel to each other) for each field you wish to preserve. Each of the inner-IF statements would have criteria like the last 3 shown above that check on the field values before copying.
Finally…test with gusto. Make sure the workflow is doing exactly what you want before mass-AutoMerging your duplicates.