6 Replies Latest reply on May 16, 2017 12:39 PM by 4b1952456fc7431c5b2b4b1d9caef9c93b039ec8

    Forms API - Update by Lead ID

      Hi, I'm working on an unsubscribe form using the Forms 2.0 API, and was wondering if it is possible when saving to /index.php/leadCapture/save, to have that process search and update records based upon Lead ID instead of email address. We have experimented including Lead API as a field in the form, but it appears to have no effect.

       

      Thanks

        • Re: Forms API - Update by Lead ID
          Sanford Whiteman

          It's not possible -- one of many reasons that abiding by Marketo's default dedupe key (i.e. email address) is a good idea.

           

          What's the specific case you're trying to resolve? When would someone be reaching your Marketo-hosted unsubscribe form without an email address or associated web session, but with their Lead ID?

          • Re: Forms API - Update by Lead ID

            We have multiple brands and our "real" dedupe is email + brand (we have ~15).  We had some challenges we with using email address as dedupe/natural key - we could have somebody change the email address in one brand and not another, and associating custom records was a chore.

             

            You mentioned associated web session, could I get something like that to work? 

             

            If we hosted our own unsubscribe/resubscribe pages, could we get lead ID passed in the URL, and call the REST API from our end to update the record?

              • Re: Forms API - Update by Lead ID

                Also, would implementing Workspaces solve this? (would Forms API differentiate between records with the same address but in different workspaces)?

                • Re: Forms API - Update by Lead ID
                  Sanford Whiteman
                  You mentioned associated web session, could I get something like that to work?

                  When someone clicks a Marketo-tokenized link, their web session is automatically associated with their specific lead. You don't have to do anything to make this work -- that's why I was asking about the specific case where someone wouldn't have a token link but would have a lead ID available. That's not a common set of factors (not to say it does not happen).

                   

                  If we hosted our own unsubscribe/resubscribe pages, could we get lead ID passed in the URL, and call the REST API from our end to update the record?

                  Using the REST API for this creates a DoS vulnerability, so I advise strongly against it.

                    • Re: Forms API - Update by Lead ID

                      Thank you for the follow-up, I really appreciate it.  I am thinking Workspaces is our "salvation" here, I just want to confirm.  Here's the specific use case:

                       

                      1. Our leads table is de-duped based upon email and brand (so the same email can be associated with different online brands, and as far as the customer is concerned, they are completely separate entities)
                      2. We use Forms to handle unsubscribe and resubscribe requests (again, these are brand-specific)
                      3. If a customer clicks on an unsubscribe link in a Forms email (appended via Marketo) and goes to the associated brand-specific Unsubscribe landing page, the lead record saved isn't necessarily the one that is associated with that brand, but sometimes can get saved to another lead record.  We think it might be because that lead record may have had more recent activity, but we are not sure.  I haven't been able to find much in the documentation that says what the defined behavior is if there is more than one lead with the same email address

                       

                      So... that is why I was interested in maybe getting my hands on the Lead ID, because that would ensure that I would be hitting a unique record.  But it also sounds like there might be something going on with the session token perhaps not doing what it should.  I'm checking and the lead/Capture/save2 call does have the mrk_tok value set to what I'm seeing passed to the unsubscribe landing page, so I don't think we're breaking anything there. 

                       

                      So, if the token isn't enough to guarantee I'm hitting the right record, I want to make sure that adding Workspaces will (before we drop the additional coin on it).

                       

                      Again, thank you so much for taking the time to respond.