Sanford, I have this exact issue, and with some help from Marketo, we solved this in a rather brute force way. I'm wondering if you have any more efficient or reliable ways to handle this. We create leads in Salesforce and Marketo simultaneously in many cases from our e-commerce site. Any time you enter your email on our site (usually not in a Marketo form), we add you to Salesforce and our other account systems for CRM and tracking, and call associateLead in Munchkin so that all the user's activity is associated with them immediately in all systems. Of course, since Marketo doesn't deduplicate Salesforce synced leads, this will result in a duplicate within 5 minutes when the Salesforce lead is synced back to Marketo. To ditch the duplicate as quickly as possible to avoid conflicts in behavioral scoring or unsubscribe preferences, or other fields, we use a Smart Campaign to fire a webhook to our own endpoint, which deduplicates the lead by finding all leads with the same email, and merging them all into the Salesforce one. This in theory works decently (not really, see below), but it still uses 2 API calls and isn't ideal from that perspective, because we'll hit API limits if we suddenly appear on national TV or have some unexpectedly large event, but perhaps the limits issue is just unavoidable with the way Marketo limits work. The worst part is, this doesn't actually work reliably due to data consistency bugs on Marketo's side. When we first implemented this, our find dupes, then merge behavior wasn't working consistently. After talking with support, we determined that the API to find leads didn't consistently return all the leads with the same email address if the leads were recently created. To get around this, we fire a deduplication webhook as normal, but then wait 3 minutes and do it again, in case the first one didn't work. In rarer cases, a lead may appear in Salesforce, but not appear in Marketo, so we also have to deduplicate all new leads that appear in Marketo, that aren't from Salesforce. Again, we have the same consistency bug with the API not returning all leads, so we try once, wait 3 minutes, then try again. In all, this means every lead that gets created results in 4 API calls to find duplicates (1 for the lead starting in Marketo, 1 for the Salesforce lead synced into Marketo, and double those for retries), and 1 API call to merge them. It's been working fairly reliably (except when we hit API concurrency limits), but the number of API calls is way too many. While we could always wait 3 minutes, this doesn't bode well for users on multiple devices doing things really quickly in real time. The longer a lead is a duplicate, the more behavioral and scoring data will be lost during the merge. There's got to be a better way... Any suggestions?
... View more