Re: Can you use a Marketo lead ID instead of Email as a key in a form?

Jon_Wu
Level 4

Can you use a Marketo lead ID instead of Email as a key in a form?

I have a webhook that I'm using to associate a _mkto_trk cookie with leads as suggested by Marketo support. There's a lot of background there, but my goal was to associate a user's _mkto_trk with a duplciate lead synced in from Salesforce using the webhook. The problem is that the form uses Email is the key to figure out which lead to push the cookie to and Marketo often associates the cookie with the lead I don't want.

If I could submit leadId instead of email in the form, this would solve the issue. Is this an option? What hidden field name would this use in the form and how do I get the leadId from a token in my webhook?

I realize this seems pretty weird in terms of dealing with duplciates, and I'm also investigating other ways to handle that as well - perhaps by creating a webhook to trigger mergeLead logic from the SOAP API. The main issue we were trying to solve was https://community.marketo.com/MarketoDiscussionDetail?id=90650000000PpvjAAC, but support pointed me down this path.
Tags (1)
3 REPLIES 3
Jep_Castelein2
Level 10

Re: Can you use a Marketo lead ID instead of Email as a key in a form?

With the solution suggested by support, you should probably stop using Associate Lead, so you don't create dupes anymore. WOuld that be possible? 

If you cannot avoid created dupes, then you could use the SOAP API to associate by Lead ID (can't be done with forms) or indeed use the Merge functionality. However, it's generally better if you can avoid creating the dupes in the first place. 
Anonymous
Not applicable

Re: Can you use a Marketo lead ID instead of Email as a key in a form?

Is this issue resolved? we also have a requirement to pass Lead ID in webhook token. Please share if you found the solution for the same?

Jon_Wu
Level 4

Re: Can you use a Marketo lead ID instead of Email as a key in a form?

Unfortunately, the only possible solution in my case is to have a webhook that calls an API you write to deduplicate leads. You would call this webhook any time a new account is created where the email address isn't empty and the source wasn't Marketo. For example, in my case, leads must be created both through Munchkin and Salesforce (so data could be synced back) so we were getting duplicates since the Salesforce sync doesn't dedupe (which is really lame). One thing to caution you against is calling the webhook to deduplicate leads without an email address as they will become "known leads" in Marketo even though they are really anonymous (no email). This will cause your account to fill up because these leads without emails won't get automatically deleted after 90 days. You can actually use this issue to your advantage, but in general, you probably don't want this.