Syncing Anonymous Leads with SFDC Contacts | Community
Skip to main content
June 2, 2014
Question

Syncing Anonymous Leads with SFDC Contacts

  • June 2, 2014
  • 12 replies
  • 4307 views
We're currently running associate_lead via the Munchkin API when a user signs up for our app and also creating an account in SF. This account gets synced to Marketo but does not merge with the lead that we created via the Munchkin API (even though they both have the same email). Does anyone have any good solutions for syncing leads created in SF with annonymous leads in Marketo? (so that we can retain web acticity from pre signup). Thanks!
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

12 replies

Jep_Castelein2
Level 10
June 3, 2014
Nick, take a look at this file on Dropbox. It shows a solution that doesn't create dupes. You will need to capture the Cookie ID and save it in SFDC, then associate the anonymous activity via a webhook. 

You could also do something similar via the SOAP API, but the webhook method is probably easier. 
June 3, 2014
Thanks a lot for sharing this, I looked it over but still not 100% sure how it works with SFDC. Is this workflow correct?

When the user signs up and I creat the lead in SFDC (email, name, company, etc) I also upload the Cookie ID. I then match that field to a custom field in Marketo. Then I'll be able to create a webhook and smartlist to sync the lead I created in SFDC with the annonymous lead that already existed in Marketo?
Jep_Castelein2
Level 10
June 3, 2014
First part is correct. The Munchkin code on the sign-up page generates a unique Cookie ID, which you save in a custom field in SFDC (as part of the form submission). This custom field syncs to Marketo, so you now have the Cookie ID in Marketo. However, it's just stored in a field, it's not actually associating the anonymous lead record to the known record yet. That's where the Webhook comes in. The webhook fills out a Marketo form on your own Marketo instance and passes in the Cookie ID. This will merge the anonymous lead records into the known lead record. Does that clarify?  
June 4, 2014
Ah ok that makes sense, thanks a lot. Would sending the lead a 'confirm your email' with a link to a Marketo landing page also accomplish this? Or once the lead is created in SFDC and synced down to Marketo this is the only way to sync?
Jep_Castelein2
Level 10
June 5, 2014
Yes, you can do that, but you will have a significant drop-off, because a lot of people won't click the email. Also, if people don't "confirm" their email, will you still send them emails? 
Mark_Rentschle3
Level 2
February 26, 2015
Jep, thank you for sharing this solution. I'm stuck on a couple parts and hoping you can provide a bit more detail:
  1. I am unable to access the attribute 'Marketo Cookie ID' in my smart campaign trigger. Is that just a place holder for the _mkt_trk field name? Or another value?
  2. Same question regarding the webhook, should the token actually be {{lead.Marketo Cookie ID}} or something else?
  3. Should the URL in the webhook be what it is in the screenshot, or something else?
Thanks!
Mark_Rentschle3
Level 2
February 27, 2015
FYI this solution is no longer supported. Here is the response I got from Marketo support:

That document is no longer valid. You can not trigger on the Marketo Cookie, there is also not a token for the cookie. You would need to have a method of capturing and storing the Cookie Id in a custom field. 

The server side forms post is also dated and localhost is not available. I apologize but that document is misleading. 
Jep_Castelein2
Level 10
February 27, 2015
It still works for me. I don't think this has ever been officially supported, but it definitely works for me. I can't guarantee it will work on all pods (I'm on app-sjf, for what it's worth).

Below is a screenshot of my webhook.I created a custom field "Marketo Cookie ID" in SFDC. It's up to you to populate that with the correct Cookie ID. My Smart Campaign is as follows: 
  • Smart List
    • Trigger: data value changes, field is "Marketo Cookie ID", new value is not blank
    • Trigger: lead is created, source = salesforce.com
    • Marketo Cookie ID is not empty
  • Flow
    • Call Webhook "Associate Cookie ID"
  • Schedule
    • Run every time
Mark_Rentschle3
Level 2
February 27, 2015
Thanks for responding.

Ok, so the comment from support "you
 would need to have a method of capturing and storing the Cookie Id in a custom field" is valid (i.e. I will need to figure out a way to do that outside of the Marketo UI). Correct?

Otherwise, the webhook will work, including the localhost URL? 
Jep_Castelein2
Level 10
February 27, 2015
Yes, that is correct. If you have a hidden form field _mkt_trk and the Munchkin on the page, it should automatically put the Cookie ID in that hidden field. I'm not sure if you can easily do that with a SFDC web-to-lead form (or whichever form you're using). If not, you can always use custom JavaScript to read the cookie and save it in a hidden field. 

Localhost URL works on my Pod and should in principle work on all Pods (haven't tested it on all Pods though). 

By the way: the response to the webhook call is a 302 error code. That's not really an error: it's just a redirect, which the webhook can't follow. It does actually work: you will be able to see the web page visits in the Lead record now.