Re: REST API and Munchkin

Anonymous
Not applicable

REST API and Munchkin

All,

I am pretty new to Marketo development, but we have integrated or site with Marketo using the REST API to create/update leads.

We have a custom form for leads to sign up for our product.  We intercept the request and use the REST API to create a new Marketo Lead.  We use a custom field to uniquely identify the leads.  We don't use email address as a unique identifier.  This works fine.

We would also like to use the Munchkin API to track usage patterns and link that data to a lead, once the lead signs up.

Can we get the Munchkin cookie and pass that information with the REST API request to create/update the lead?  

Note: email address is NOT the unique identifier for our leads.  We have a custom field that we use for de-duping

https://community.marketo.com/MarketoDiscussionDetail?id=90650000000Pu3CAAS

The above link seems to incidate we cannot use the REST API and must use the Munchkin Associate Lead function.  I believe the Munchkin API always uses email addresses for de-duping, which will not work in our use case.

Thanks for any information.

Cheers,


Jim

 
Tags (1)
8 REPLIES 8
Kenny_Elkington
Marketo Employee

Re: REST API and Munchkin

Hi Jim,

You can use the REST Associate Lead method for this as well: http://developers.marketo.com/documentation/rest/associate-lead/
Anonymous
Not applicable

Re: REST API and Munchkin

You need to use email or lead id to create/update lead, but you can cookie to get data about leads:
http://developers.marketo.com/blog/get-a-visitors-cookie-id-and-then-query-associated-lead-data/
Anonymous
Not applicable

Re: REST API and Munchkin

Thanks! Both answers were helpful.

It sounds like you cannot pass the cookie at the time the lead is created/updated and the we need two separate REST calls.  I was hoping to avoid two calls, but this will meet our needs.

Cheers,

Jim
Anonymous
Not applicable

Re: REST API and Munchkin

Not sure if you considered this, but we do a repost to Marketo to capture leads--essentially we have an ASP form that captures the submissions, applies some logic and then reposts it to Marketo. That way we still get the 'completed form' trigger. Thought I'd mention it.
Anonymous
Not applicable

Re: REST API and Munchkin

Thanks Mark.  I am not familiar with the completed form trigger, but I'll take a look.

From my limited understanding, if we post to Marketo, the system will de-dupe on email address.  That will not work for us as we have a custom unique identifier and we allow more than one lead with the same email.
SanfordWhiteman
Level 10 - Community Moderator

Re: REST API and Munchkin

@Jim While I understand the need for enforcing uniqueness in different ways, bear in mind that coupling site requests to a tightly-governed resource like the REST API (you only get 10,000 API calls per day) is a dangerous practice from a security standpoint.  You've basically added in a DDoS vulnerability: only 10,000 fake requests and your site is rendered inoperable for the rest of the day.  When using the API it's better to bulkify calls and run them asynchronously, so you get more control.
Anonymous
Not applicable

Re: REST API and Munchkin

Thanks for the insight Sanford.  I had not considered that.
Anonymous
Not applicable

Re: REST API and Munchkin

Following up on comments from Sanford and Mark, I started researching Forms and Triggers.

The following article seems to incidate that we can use forms and look for duplicates based on other fields (like name or some other custom field).

https://community.marketo.com/MarketoArticle?id=kA050000000KypcCAC

Am I reading this correctly?  

Can we use forms to create more than one lead with the same email address and de-duplicate based on some other field?