API to merge Anonymous and Known Leads based on Munchkin cookie ID

Anonymous
Not applicable

API to merge Anonymous and Known Leads based on Munchkin cookie ID

We have a client who use Form Assembly forms (non-Marketo forms) to submit Contacts in SFDC and update data across custom objects.

What we are looking to do is set up their forms to capture the Munchkin Cookie ID into a hidden field and pass this through with their record into SFDC, so when they sync into Marketo we have their cookie ID.

What API functions should we be using if we want to use the Munchkin ID value to look up to see if there is an Anonymous lead with that same ID, and merge the two records together?

Tags (1)
3 REPLIES 3
Anonymous
Not applicable

Re: API to merge Anonymous and Known Leads based on Munchkin cookie ID

Hi Carrie,

You can use SOAP API's getLead, setting attribute COOKIE for LeadKeyRef, where COOKIE is value generated by the Munchkin Javascript. (e.g. id:561-HYG-937&token:_mch-marketo.com-1258067434006-50277).

The full details of getLead can be found at
http://developers.marketo.com/documentation/soap/getlead/


Alok_Ramsisaria
Level 10

Re: API to merge Anonymous and Known Leads based on Munchkin cookie ID

Hi Carrie,
 
You will get the muchkin cookie id through "_mkto_trk" cookie" (e.g in PHP code you will get the cookie id throughh $cookie_id = $_COOKIE['_mkto_trk'];)

Now use $cookie_id in your hidden filed or if you want the details then use SOAP API get_lead() function

Hope this will help!
Anonymous
Not applicable

Re: API to merge Anonymous and Known Leads based on Munchkin cookie ID

You also use Chrome Developer Tools or Firefox's Firebug to inspect the ID stored on _mkt_trk. That is far quicker than coding. 

0EM50000000RGx0.jpg


0EM50000000RGx5.jpg