8 Replies Latest reply on Feb 13, 2015 2:12 PM by 73611

    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

       
        • Re: REST API and Munchkin
          Kenny Elkington
          Hi Jim,

          You can use the REST Associate Lead method for this as well: http://developers.marketo.com/documentation/rest/associate-lead/
          • 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/
            • 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
              • Re: REST API and Munchkin
                Mark Budzyn (Prod)
                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.
                • 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.
                  • Re: REST API and Munchkin
                    Sanford Whiteman
                    @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.
                    • Re: REST API and Munchkin
                      Thanks for the insight Sanford.  I had not considered that.
                      • 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?