Unknown cause of lead merge (leaddb) - Expert knowledge required!

Go to solution
Level 9

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

Since this isn't the batch conversion issue and Justin has correctly identified (I've seen that one too) I feel like we are back to perhaps a non-standard conversion process in Salesforce we need to identify. If Marketo can't see the lead through it's conversion to a contact (even for a little while) it will believe it needs to create a new record, which turns out to be a duplicate. I've worked with literally hundreds of synced instances, and every time I have seen this issue it has turned out to be a non-standard conversion process, a permissions issue with the Marketo sync user, or something else that means Marketo loses track of the original lead on conversion. The fix is always in Salesforce. We just need to nail it down.

Level 4

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

OK, I'll play that game

My Sync user is a custom profile cloned from the system admin profile in SF. It has basically full access to the SF org, bar some objects that are not relevant to it.

Is there anything specific to audit on this user? It certainly has never displayed a permission issue to date.

If it was not a permission issue, when you say "non-standard conversion process", what does that mean?

When you say "something else that means Marketo loses track of the original lead on conversion", what could cause this?

Thanks Veronica!

Level 1

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

Sean, were you able to find the solution to this? I'm seeing the same leaddb issues happening on my end. We're using Leandata to run our conversion, but are transitioning to Ringlead soon. I thought Ringlead would be the fix, but am distressed that you're having issues with Ringlead conversions as well. 

Level 4

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

Hi Matt,

I've been holding off bothering to reply to this thread. Yes, I found a solution. After my ticket spent months in Marketo's top tier support channels, they didn't have a solution. Well, not entirely true. They did, but it was not the actual solution. Here was there response.


Hi Sean, 

Thank you for your patience with this one. Our Engineering team looked into this case and found logs for the affected records. One such is below: 

Logs show operations of data pull: 
Lead Pull conversion SOQL: 
Mar 28 17:42:31 

Contact Record created in sfdc at: 
sfdc_created_date: 2019-03-28 17:42:32 

Contact pull-updates SOQL: 
Mar 28 17:42:46 

During a Lead to Contact conversion. When the standard conversion process is performed in SFDC, a new contact is created in SFDC and the data mapped between lead and contact is used to populate the fields of the contact in SFDC. The lead in turn becomes a "shell" of a lead. This conversion is pulled during the Pull Conversion operation in the sync. New contact records or contact updates are both pulled in the Contact Pull-Updates operation in the sync. 

The lead was converted to a contact during the short window of time between the conversions were pulled and the start of the updates being pulled. The new contact was pulled over to Marketo by the pull-updates operation rather than the pull-conversions. Hence the creation of the new contact in Marketo - a duplicate. During the coming sync cycle after that, the pull-conversions operation merged the duplicates to complete the conversion. 

Our engineers have confirmed that when this scenario occurs (a conversion happened in that small time gap), this behavior is expected to occur. 


See, I already knew this. That the API calls run in a specific order (there is a post on this somewhere) and that these got out of sync. But why? There is no answer to that, nor why my records caused this to occur dozens of times.

Well. I can now report that in our case, this was not due to RingLead. It was actually caused through the combination of having a lead validation rule in SF, plus a small setting enabled in SF.

In SF, navigate to Setup then search for "Lead Settings". Locate the "Require Validation for Converted Leads" checkbox and Disable this setting. This setting was causing field validation and workflows to execute on conversion, and this was the cause for breaking the sync API execution timing.

Prior to figuring this out, we also setup a great Marketo program that "captured" these irregular merge records. I highly recommend creating this as an operational program so that you stamp these errors as they occur so that you can clean them up.

Basically, the activity log registers two "Person is Created" records when this bug occurs. So you can capture that and add the record to a static list. My list currently has 18 people in it.




I wanted to let support try and come up with this solution or at least tell us to check that setting in SF, but unfortunately they didn't have many cases of this error occurring and never once pointed to this SF setting as a possible cause of the issue. 

I feel pretty confident that if you disable that setting in SF, you two will see these issues cease to occur. 

Funny thing that having that program to stamp them in place, one person (like 1 week ago) triggered the issue to reoccur. But I guess that's acceptable and is what you would consider "regular" occurrence of this de-sync timing issue.

I hope that this information helps others now and in the future. I lost maybe 40 hours to this issue.

Finally, shout out to Veronica Holmes‌, it was an issue in Salesforce  Nice work haha.



View solution in original post

Level 1

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!


This is amazing! Thanks for sharing. How did you figure out that the "Require Validation for Converted Leads" setting had to be disabled to fix the issue?

Level 4

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

I think I just spent a lot of time testing different things. Veronica kept pointing out that it must be a "non standard conversion", but I had no specific Apex or Workflows hooked on to conversions. But when I found this setting which related specifically to conversion and what is executed on it, I just tested disabling it and found it to solve the issue.

The big question is though..... Did this solution work for you?

Level 10

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

Quite possibly Marketo changed the default reasons at one point in time. But yes, some in deep dive documentation into lead merge would have been nice.

Level 4

Re: Unknown cause of lead merge (leaddb) - Expert knowledge required!

There is more information Justin Norris added here, which also confirms the issue:

Disabling the sync is not a solution however, as I tested the conversion being done from RingLead in batch, Ringlead, single records one by one, and Manual conversion within SF and was able to trigger the issue in all three scenarios.