18 Replies Latest reply on Feb 26, 2017 7:28 PM by Sanford Whiteman

    Change program status from a lead alert email

    Jason Hamilton

      Hello all,

      Looking for a way to change a lead's program status from an alert email. For example a lead fills out a form registering for an event, alert goes to program owner, the owner clicks accept or decline, and depending on the link they click, the program status would change for the lead. Has anyone had any success doing anything like this?

      Any ideas would be appreciated.

       

      Thanks,

      Jason

        • Re: Change program status from a lead alert email
          Sanford Whiteman

          Interesting one.  Aside from using a webhook -- which would work, but isn't necessary -- you could have a referral-type LP (no Munchkin cookie on the form, following the usual prescription) that automatically posts a form using the Forms 2.0 API with the lead's email address. The accept/decline could be in the URL, so you don't have to waste a lead field on it. 

           

          Then trigger on Fills Out Form, Form is 'Program Owner Approval', Query String contains 'accept'.

          3 of 3 people found this helpful
          • Re: Change program status from a lead alert email
            Dan Stevens.

            So it sounds like you have an event program with approve/reject functionality.  If so, we've built all of the assets/workflows to support this:

             

            This uses a similar approach that Sandy suggested above.

            5 of 5 people found this helpful
              • Re: Change program status from a lead alert email
                Jason Hamilton

                Thanks Dan,

                This is super helpful, I wish I could mark both of you as correct.

                 

                Jason

                  • Re: Change program status from a lead alert email
                    Dan Stevens.

                    No problem, Jason - just happy to help.  The one item I forgot to include in my reply is what that URL looks like within the alert:

                     

                    • Approve registrant: https://yourdomain.com/{{my.ApprovalPageURL}}.html?EmailAddress={{lead.Email Address}}&First={{lead.First Name}}&Last={{lead.Last Name}}
                    • Deny registrant: https://yourdomain.com/{{my.DenialPageURL}}.html?EmailAddress={{lead.Email Address}}&First={{lead.First Name}}&Last={{lead.Last Name}}

                     

                    The URL tokens above aren't actually URLs, but rather the value that's contained in the highlighted area of the LP URL builder:

                     

                      • Re: Change program status from a lead alert email
                        Robert Kelen

                        Dan, what are the form settings to support populating the three URL-toggled fields in this way? Thanks.

                          • Re: Change program status from a lead alert email
                            Dan Stevens.

                            The three URL parameters are contained within the alert that gets sent to marketing.  When they click on "approve" or "decline", the URL on those buttons/links include those three URL parameters.

                             

                            Here's the composition of the alert that gets sent to marketing:

                             

                             

                            The ACCEPT button/link is made up as follows:

                             

                            https://pages.avanade.com/{{my.ApprovalPageURL}}.html?EmailAddress={{lead.Email Address}}&First={{lead.First Name}}&Last={{lead.Last Name}}
                            

                             

                             

                            Here's what the form looks like (all hidden fields; disregard the DemandBase hidden field - that's for something else):

                             

                            And here's the landing page - in this example, the APPROVAL one (the script that you see here is to grab the First/Last name of the lead so that it can be inserted here ("Please confirm your approval for FIRST LAST to attend the event"):

                             

                             

                            Here's the HTML where the FIRST and LAST are populated:

                             

                             

                            And finally, the smart campaign that processes the APPROVAL when the form is submitted on the approval page:

                             

                             

                            1 of 1 people found this helpful
                              • Re: Change program status from a lead alert email
                                Robert Kelen

                                Thanks Dan for filling those extra details. That's exactly what I was seeking to better understand.

                                  • Re: Change program status from a lead alert email
                                    Dan Stevens.

                                    One other important item that I failed to mention - if it wasn't already assumed - but you need to use a LP (for the approve/decline LPs) that has Munchkin tracking disabled.  See details in this thread: Non-trackable landing page is still identifying me

                                    1 of 1 people found this helpful
                                      • Re: Change program status from a lead alert email
                                        Robert Kelen

                                        Thanks Dan for that last note. The back and forth on Non-trackable landing page is still identifying me was quite a read; I'll have a to give a try to see if I correctly understood all the fine points.

                                          • Re: Change program status from a lead alert email
                                            Dan Stevens.

                                            Here, let me simplify this for you:

                                             

                                            Place this code in the <HEAD> of the LP template, just below the META tags:

                                             

                                            <!-- CREATE EMPTY MUNCHKIN COOKIE - TO ESSENTIALLY MAKE THE PAGE UNTRACKABLE -->

                                              <script>document.cookie = "_mkto_trk=;path=/;domain="+".YOURDOMAIN.com"+";expires=0"</script>

                                            <!-- END -->

                                             

                                            Be sure to modify ".YOURDOMAIN.com" for your domain.  This is the only customization that necessary here.

                                             

                                            And then place this script directly on the LP in design view (we still use the older LP framework - not guided - for some of our internal/operational LPs due to the ease of placing code like this directly on the page):

                                             

                                            <!-- Clear the Marketo tracking cookie value on submission of the form, without having to delete the cookie itself from the user’s browser. -->

                                            <script>// <![CDATA[

                                            //add a callback to the first ready form on the page

                                            MktoForms2.whenReady( function(form){

                                                //add the tracking field to be submitted

                                                    form.addHiddenFields({"_mkt_trk":""});

                                                    //clear the value during the onSubmit event to prevent tracking association

                                                form.onSubmit( function(form){

                                                    form.vals({"_mkt_trk":""});

                                                })

                                            })

                                            // ]]></script>

                                            <!-- END -->

                                             

                                            We've created the code above as a snippet and just drag the snippet onto any page that we want to prevent Munchkin tracking (while use the no-tracking LP template):

                                             

                                            1 of 1 people found this helpful
                                              • Re: Change program status from a lead alert email
                                                Sanford Whiteman

                                                Note Robert the first part of the code above should only be used if you want the *entire session* untracked -- that is to say, that none of the program owner's web activities need to be tracked in Marketo.

                                                 

                                                For internal users, this is usually the case. But a counterexample would be when you use Marketo to monitor use of some internal pages, like HR or scheduling apps, etc. In such cases, you don't want to delete the cookie because then you'll get anonymous activities again (until they are next associated by clicking an email or via an associateLead call).

                                                 

                                                A MktoForms2.whenReady listener is sufficient to no-track the form submit without no-tracking the whole sesh.

                                                • Re: Change program status from a lead alert email
                                                  Robert Kelen

                                                  How do these extra steps (the MktoForms2.whenReady listener, and the empty cookie) differ from the built-in "Disable Munchkin Tracking" template action? Thanks.

                                                    • Re: Change program status from a lead alert email
                                                      Sanford Whiteman

                                                      They serve distinctly different -- sometimes complementary, sometimes conflicting -- purposes.

                                                       

                                                      • Disable Munchkin Tracking: Won't load nor init() the Munchkin library on that page, so won't send pageview or click events. But doesn't stop an existing Munchkin cookie from being added to a form.

                                                       

                                                      This is the option that is frequently misinterpreted as "no-track" when actually it means "no-new-track," if you will.  And because not everyone will have an existing cookie, it can appear to work, like if you're testing in Incognito/InPrivate windows (which is a good idea in general). But in reality it doesn't suffice to create a Referral Form, and can actually make things worse, because it makes it harder to track the use of the referral form itself by salespeople/partners etc.

                                                       

                                                      • Empty or delete Munchkin cookie: As long as the Munchkin library is not init()'d later on that page, will will ensure the form post is not tied to an existing lead. But also forces the session to be anonymous again. So if you make use of Munchkin tracking data for your internal people and/or partners, you'll be cutting yourself off from that information unnecessarily, since all you want is for their referrals to not take over their data.

                                                       

                                                      Note that the code above doesn't actually delete the cookie, it empties it but the cookie still exists for the duration of the page view and maybe much longer. The cookie is set to delete only when the browser closes (expires=0). While the cookie is empty, whether it's considered de facto nonexistent depends on the JavaScript code that's used. Some code will say an empty cookie is as good as nonexistent, others won't.

                                                       

                                                      This difference in behavior means you really shouldn't use that code but rather this:

                                                       

                                                      document.cookie="empty=;path=/;domain=.example.com;expires=" + new Date(0).toGMTString();

                                                       

                                                      The code above truly removes the cookie (immediately). If indeed that's what you want to do.

                                                       

                                                      • whenReady listener: Ensures that form post will not contain a cookie value, thus the form data will not reassociate the session. This is what you typically want for a Referral Form. Does not delete the existing cookie, just stops it from being sent for Filled Out Form activities in particular, so standard Munchkin activities are still tracked.

                                                       

                                                      The go-to code for this (Dan posted it above) is kinda quirky, relying on undocumented Forms 2.0 behavior, but totally works.

                                                      2 of 2 people found this helpful