7 Replies Latest reply on Nov 12, 2016 11:23 PM by Sanford Whiteman

    Munchkin API & Smart List Triggers

    Mike Dexter

      The majority of lead data that is delivered to our client's Marketo instances is via the Munchkin API. When we first received training from the local Marketo trainer and talked about the API and the best way to go about things they suggested the best way to fire triggers for smart lists for leads delivered by the Munchkin API was the following:

       

      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

       

      1. Create a program

      2. Create a smart campaign for a new lead with the following smart list parameters:

      new-lead.png

      3. Create the flow steps for that "new lead" smart campaign

      4. Clone the smart campaign for "new leads" and rename it to "existing leads" and use the following smart list parameters:

      existing-lead.png

      We would then use the following javascript code to get the lead information into Marketo using the Munchkin API. The $.now() in the "formID" attribute is used to trigger the "data value changes" for existing leads at is sends over a unix timestamp so Marketo sees it as a change in that value.

      from-id-field.png

       

      This method works fine but it seems like a lot of duplicate effort. We have to make a smart campaign for new leads and a smart campaign for existing leads. And if the flow steps need to change we have to update them in both new & existing smart campaign flows.

       

      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

       

      So, we thought, what about the following revised method? It seems to be achieving the same trigger results for both new and existing leads but we can do it with a single smart campaign for both new and existing leads.

       

      1. Create a program

      2. Create a smart campaign with the following smart list parameters:

      revised-method.png

      We would then use the following javascript code to get the lead information into Marketo using the Munchkin API. This associates the lead for new and existing leads and we send a "virtual page view" with the "visitWebPage" method that we can then use for our trigger.

      form-id-page.png

       

      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

       

      Are there flaws in the revised method or is there a better way to do it?

        • Re: Munchkin API & Smart List Triggers
          Sanford Whiteman

          The major flaw in the revised method is that you've doubled the number of network requests in exchange for a little help with SC organization. That can be an uneven tradeoff.  Why couldn't the the Smart Campaigns already be combined and then use Add Choice - Data Value Changed to choose between flow options?

           

          Pulling back a bit, why aren't you using the Forms API, if you're always executing associateLead in the context of a form?  The Munchkin API is versatile in the sense that it still fits if you learn the lead's identity via means other than form fillout (like a CMS/extranet/ecommerce session or even OAuth login).  But if they're filing out a form, the Forms API is a better fit.

            • Re: Munchkin API & Smart List Triggers
              Mike Dexter

              Sanford Whiteman

              "Why couldn't the the Smart Campaigns already be combined and then use Add Choice - Data Value Changed to choose between flow options?"

              Can you elaborate on this. How are you suggesting to combine the two smart campaigns - can you provide the smart list parameters you would implement. We found that "data value changed" only worked for an existing lead, not a new one. We're trying to create a smart list with triggers that work for a new lead or an existing lead.

               

              "Why aren't you using the Forms API"

              The forms we are creating for clients need to do more than just send data to Marketo. So we find for our workflow it is more efficient to us the Munchkin API.

                • Re: Munchkin API & Smart List Triggers
                  Sanford Whiteman

                  We found that "data value changed" only worked for an existing lead, not a new one. We're trying to create a smart list with triggers that work for a new lead or an existing lead.

                  I understand that. Both Data Value Changes and Lead is Created triggers can be used in the same SC.  Triggers are always connected with an implicit boolean OR.

                   

                  The forms we are creating for clients need to do more than just send data to Marketo. So we find for our workflow it is more efficient to us the Munchkin API.

                  The Munchkin API as you're using it is just upserting four Marketo fields, keying on Email. This can be done using a Forms API submit, and you don't have to spend another roundtrip retrieving the Munchkin security hash. It means you get a real Filled Out Form activity in Marketo as well. Calling the Forms API doesn't mean you can't do whatever else you want to do with your form as well (i.e. posting to another server).

                    • Re: Munchkin API & Smart List Triggers
                      Mike Dexter

                      Sanford Whiteman

                      Both Data Value Changes and Lead is Created triggers can be used in the same SC

                      I see. So you're suggesting something like this. "Lead is created" and the "Form ID" filter get our new leads and the "data value changes" will sort out the existing people:

                      example.png

                       

                      "The Munchkin API as you're using it is just upserting four Marketo fields"

                      This example was a cut down version - didn't want to complicate things

                        • Re: Munchkin API & Smart List Triggers
                          Sanford Whiteman

                          (You're @ing one of my secondary profiles... don't worry, I'm watching the thread!)

                          I see. So you're suggesting something like this. "Lead is created" and the "Form ID" filter get our new leads and the "data value changes" will sort out the existing people:

                           

                          example.png

                           

                          The OR vs. AND (ANY vs. ALL) for filters that you circled isn't involved in that logic. Triggers are always OR. So as long as the filters don't exclude any leads then the triggers + filter will catch the leads in question.

                           

                           

                          This example was a cut down version - didn't want to complicate things

                          associateLead updates lead fields, just like the Forms API. The primary difference is in the security applied to the updates. You can block field updates via (unauthenticated) form fill and only allow them via (authenticated) associateLead. If you don't block updates then the available functionality is identical.

                            • Re: Munchkin API & Smart List Triggers
                              Mike Dexter

                              Really appreciate your time. Been very interesting. We just took it for granted how the Marketo employee/trainer said to do it. Should have posted here - would have saved a lot of duplicate work!

                                • Re: Munchkin API & Smart List Triggers
                                  Sanford Whiteman

                                  We just took it for granted how the Marketo employee/trainer said to do it. Should have posted here - would have saved a lot of duplicate work!

                                  Happy to help. There are a lot of different ways to accomplish the same short-term task in Marketo, which can be kind of maddening. But there's almost always something, be it performance/capacity/bugs/maintainability/side effects, that makes one approach the best.

                                   

                                  For more check my blog, probably the only purely technical blog with a Marketo focus out there, and my many posts here!