Here it is: Your guide to understanding merges in Marketo, in Salesforce, and how the two interact.
Merging Two Leads
We begin with two records in Marketo which have been synced to Salesforce. Both are leads in Salesforce, not contacts.
Lead A, Marky Marky, has a Marketo ID of 1001446 and an SFDC ID of 00Qi000000vJ0hK.
Lead B, Markee Marquee, has a Marketo ID of 1001447 and an SFDC ID of 00Qi000000vJ0hU.
We wish to merge these leads in Marketo. In this example, I first select Lead B, and then hold SHIFT to select Lead A as well. Then right-click in the highlighted area to bring up the Lead Actions drop-down (or click Lead Actions at the top of the screen), and select Merge Leads from the choices.
Now I see the Merge Leads dialog box, where we decide which conflicting field values we want to win. We could click the box next to "Lead 1" if I want all of Markee Marquee's values to win. Instead we check the box next to "Marky" because we want that to be their first name, rather than "Markee". Then we click merge.
Note: whichever record was most recently updated will be pre-checked to win field conflicts.
Here's the result. Note how the remaining single lead has the ID 1001447, that of Lead B, the first one we selected. The first record you select is the target record - this records remains while the other record is deleted, it's field values, activities, and program memberships merged into this winning record. The leads are also merged in Salesforce, and the remaining record there has the ID 00Qi000000vJ0hU (Lead B) as we would expect.
Merging Leads and Contacts
Here we begin with a lead and a contact.
We have a lead, Marky Marquee (Marketo ID1001447, SFDC ID 00Qi000000vJ0hU), and a contact, Joe Hill (Marketo ID 1001448, SFDC ID 003i000002KAFGa). We first select Marky Marquee (the lead) and then select Joe Hill (the contact), and conduct the merge as we did above.
This time, however, the second record we clicked, Joe Hill, shows up as "Lead 1". This seems to contradict what we said earlier, but it's happening because the second record is the contact, and the contact is always going to be the target record. I want Marky's name to win out, so I check their First and Last Name and then click Merge.
Note: this will cause an error if the Marketo sync user in SFDC doesn't have the Convert Leads permission.
Note that the remaining record has the ID 1001448, the ID of the contact, even though that wasn't the first record we selected in Marketo. The contact is always the one which remains.
Here we have two leads: Dexter Science (ID 1001451) and James Frankough (ID 1001452). We add James to two programs, Program Example 1 and Program Example 2. We can see this in their activity log:
Now we merge the records, selecting Dexter first (so they'll be the winning record), but we check James's values for the First and Last Name. Below is their activity log after the merge. Notice that there are new Change Program Status activities - because the target record in the merge was 1001451, but the programs were associated with 1001452, the system has to copy their program statuses over during the merge.
If you double-click one of those activities, it gives "Lead merge transferring program membership (transfer)" as the activity's Reason.
Activities caused by merges can trigger campaigns. For example, suppose there is a smart campaign with the trigger Program Status Changes, for an old program with no activity in months. Activities caused by a merge like this could trigger such a campaign. To prevent this from triggering campaigns, we can add Reason as a constraint:
Next, we have two leads: John Doe (ID 247) and Johnathon Doe (ID 248). We've associated John Doe with two SFDC Campaigns: Campaign Example 1 and Campaign Example 2.
When we merge John Doe into Johnathon Doe, since the target lead is ID 248 and the campaigns are associated with ID 247, it has to copy them over - just like it did with campaign memberships.
However, unlike with program memberships, it does not provide a Reason in the Add to SFDC Campaign activity following the merge, meaning there's no easy way to prevent this from triggering campaigns which use the Added to SFDC Campaign trigger.