5 Replies Latest reply on Jun 27, 2018 10:38 PM by Sanford Whiteman

    Bypass Marketo dedupe rules to create new leads every time

    Natali Talevski

      Hi,

       

      Is it possible to have Marketo create a new lead every time a form is submitted rather than dedupe? For example, if j.smith@email.com submitted the form twice, it would create a new lead twice rather than update the existing lead? We only need this to happen for one particular form and not every form. Marketo have said its possible to do via this API call http://developers.marketo.com/rest-api/lead-database/, but has anyone done it another way?

       

      Thanks

       

      Natali

        • Re: Bypass Marketo dedupe rules to create new leads every time
          Sanford Whiteman

          I'm unhappy that the API was officially suggested here. That's a truly awful idea.

           

          It's actually extremely simple to do, as long as you're positive that your database filling with duplicate email addresses is what you want.

           

          Use another visible field on the form in place of Email Address, call it Proxy Email in this case.  Have the Email Address be a random hidden field. Then in a flow, Change Data Value Email Address → {{lead.Proxy Email}}.

           

          On the page with the form, have this JS:

           

          MktoForms2.whenReady(function(form)
            form.onSubmit(function(form){
              var currentValues = form.getValues();
              form.addHiddenFields({
                Email : currentValues.ProxyEmail + Math.random()
              });
            });
          });
          
            • Re: Bypass Marketo dedupe rules to create new leads every time
              Natali Talevski

              So I've been testing this, and it only works if cookies are completely cleared from the page. Also, the hidden email field isn't needed as the change data flow will update the field. I've made it so the page is not tracking or leaving cookies, and used the same proxy email field in the form with the change step in the trigger. That seems to work

                • Re: Bypass Marketo dedupe rules to create new leads every time
                  Sanford Whiteman

                  So I've been testing this, and it only works if cookies are completely cleared from the page.

                  No, it works perfectly fine as described (aside from a missing curly brace in my code, which you presumably adjusted as there's a syntax error otherwise).

                   

                  You must not have implemented it correctly, which is why you saw the cookie-related behavior.

                   

                  Also, the hidden email field isn't needed as the change data flow will update the field

                  It absolutely is needed. The Email field is mandatory so Marketo will create a new unique lead record regardless of there being an associated cookie. That's the key to the whole thing.

                   

                  If you don't have the Email field on a form at all (not a proxy field, the system field literally named Email) you will continually reuse the same lead record in Marketo. That's well-known behavior and exactly what you need to work around. By having the Email field present in every form submission, but always guaranteed unique, a new record will be created each time.  Then on the server side, you copy the user-entered proxy email field over the system Email field, so all leads end up with the same active Email field value.

                   

                  And you need to have Munchkin enabled or you won't log anyone's actions (including the last person who filled out the form). That doesn't make sense from a usability standpoint.

                   

                  Here are four leads created in succession from the same form with the same visible data:

                   

                  In this case I have left the Email field as is-is to show you how it works directly after form submission.

                   

                  Then I add the SC + Flow step as described:

                   

                   

                  Then fill out the field 4 more times and search the db again:

                   

                  4 unique leads with the same Email.

                   

                  Munchkin is enabled as normal for the form, and you can see Visit Web Page activities for the currently associated lead: