14 Replies Latest reply on Mar 12, 2019 2:55 PM by Margaret Duff

    override Marketo "unsubscribe" system flow action

    Vlada Prasolova

      We have customer profile on our website where the customer can update his mailing preferences.

      The form is on Marketo and the updates are pushed to marketo as well but i have recently came across a case that i'm as yet unable to solve.

      An old customer went to his profile and updated preferences/subscribed to something.

      He got pushed to Marketo all right, with a flag "unsubscribed = FALSE, but bc it's a really old record he wasn't in Marketo, so marketo created a new record.

      So far so good, but, it turned out the marketo "remembered" he has been unsubscribed long time ago, so what it did, it changed the unsubscribed value back to TRUE with a system flow action:


      System flow action for 'Change Data Value' triggered Wed, 30 May 2018 08:33:24 -0500

      my question is how do i override this system flow action if the "re-subscription" happens AFTER the initial opt-out and and person is no longer in Marketo by the time it occurs


      i thought about creating a counter-campaign like "original source = that account form" and unsubscribe = TRUE, change it back, but how do i avoid re-subscribing those who had been created from this form but went and opted-out later of their own free will?

        • Re: override Marketo "unsubscribe" system flow action
          Jim Thao

          If you set it to allow the record to only flow through once, you should be good.  If they do get deleted somehow and get recreated again, they will be allowed back through your campaign that first time again and never again.

            • Re: override Marketo "unsubscribe" system flow action
              Vlada Prasolova

              i'm sorry, but i do not get your suggestion.

              which campaign you are talking about? Marketo internal system flow action that restores the information about unsubscribers even if the lead gets deleted?

              I do not have influence over it, that's the problem

              my leads are created via different channels, the point is that if the created record has ever been in your database and was removed with an "unsubscribe = TRUE", marketo forces it to "unsubscribe" again, even though it has legitimately re-entered your database again.

              i could set a re-subscribing campaign, changing this system flow action back to false, but i'm afraid i could affect real unsubscribers somehow, which would be even bigger problem

            • Re: override Marketo "unsubscribe" system flow action
              Denise Greenberg

              Hi Vlada,

              As a first step, you might want to create a smart campaign that adds people in the situation you describe to a static list, and then monitoring it for awhile before creating a triggered campaign to reverse the Marketo Durable Unsubscribe (which is what kicked in here). If it occurs very infrequently, you could just set up an alert for yourself and fix them manually. If it happens, often monitoring the activity logs of the people in the static list will help you devise an appropriate triggered campaign to do the reversals. Based solely on your description, that campaign might look something like this:



              Person is Created

              Fills Out Form (your Preference Form)


              Filters (all):

              Person was created -> in past 10 minutes

              Filled Out Form (preference form) ->in past 10 minutes

              Unsubscribed is False



              Wait 20 minutes

              If Unsubscribed is True, Add to List


              That should capture the people who subscribed but got reversed.



              I am assuming you already have logic that changes Unsubscribed from True to False if someone who is unsubscribed comes along and fills in preferences form and subscribes to something.

              • Re: override Marketo "unsubscribe" system flow action
                Delwin Ng

                One way to reserve this would be build a smart campaign like this:

                Smart List:

                Trigger Data Value Changes, Attribute: Unsubscribe, with the constraints Previous Value = False, New Value = True.

                Filter 1: Filled out Form for the customer profile form, Date of Activity in the Past 10 minutes

                Filter 2: Unsubscribed Reason is "System flow action sysActionChangeDataValue resetLeadEmailStatus"

                Flow: Change Data Value of Unsubscribe to False


                This should only catch only people who are having their unsubscribed field being modified from the durable unsubscribe. The Unsubscribed Reason filter should ensure that only the changes from durable unsubscribe will move on to the flow.

                1 of 1 people found this helpful
                  • Re: override Marketo "unsubscribe" system flow action
                    Vlada Prasolova

                    Thank you for your suggestion, Delwin

                    Will try this on out for sure

                    • Re: override Marketo "unsubscribe" system flow action
                      Vlada Prasolova

                      though i have just noticed that the is no "unsubscribe reason" field in such case, it's "unsubscribe cause" which is not in any of the available marketo filters

                      is there a way to extract it?




                      System flow action for 'Unsubscribe Email' triggered Thu, 14 Jun 2014 03:17:03 -0500


                      • Re: override Marketo "unsubscribe" system flow action
                        Margaret Duff

                        Hi Delwin Ng ! I am successfully using a campaign like this to resubscribe people. Thanks to you (and Marketo Support) for sharing this tip!


                        Now, I'm curious about managing more granular email preferences across duplicate records, since our current data management strategy requires some intentional duplicates. I know the durable unsubscribes process can find duplicate records and push updates from one record to the rest. But I haven't seen a way to do that for any attribute except the "unsubscribe" attribute. Is there a way have changes to an email subscription attribute automatically populate across duplicate records?


                        For example, if a user goes into my preference center and subscribes to my "Inbox0IsALie" email series, I'd like to have the "Subscription - Inbox0IsALie" attribute updated across any other duplicate records. Is that possible? Thanks!

                          • Re: override Marketo "unsubscribe" system flow action
                            Sanford Whiteman

                            You can only do this for custom fields via a webhook that in turn loops back and calls the REST API.

                              • Re: override Marketo "unsubscribe" system flow action
                                Margaret Duff

                                Thanks, Sanford Whiteman! I'm new to this, but want to see if I can figure it out. I have been reading the Marketo/Salesforce webhook and API documentation and trying to poke around github and the interwebz for examples of something similar. Any chance you have seen or built something with a similar structure that I you recommend I look at to help wrap my brain around this? Or, any tips on where to look? Any suggestions would be absolutely appreciated!

                                  • Re: override Marketo "unsubscribe" system flow action
                                    Sanford Whiteman

                                    The webhook implementation will always be language-specific so we'd have to know what language is most comfortable for you to work in.


                                    As our webhook service uses standard JavaScript, the main routine looks like this (with a more exception handling in production):


                                    .then((identResp) => identResp.json())
                                    .then((identRespJ) => {
                                        // get session access_token
                                        commonHTTPHeaders = { 
                                          'Authorization' : `bearer ${identRespJ.access_token}`,
                                          'Content-Type' : 'application/json;charset=UTF-8'
                                    .then(() => 
                                      // get all leads matching current lead's email (including current lead)
                                          headers: commonHTTPHeaders
                                    .then((getResp) => getResp.json())
                                    .then((getRespJ) => {
                                      // filter list of leads to (a) exclude current lead and (b) leave only interesting custom fields to sync
                                      var matchedLeads = getRespJ.result,
                                          thisLead = matchedLeads.find((lead) => lead.id == webhookContext.leadId ),
                                          secondaryLeads = matchedLeads.filter((lead) => lead != thisLead ),
                                          reservedFields = ["id","email"],
                                      reservedFields.forEach((field) => delete thisLead[field] );      
                                      pushInput = secondaryLeads.map((secondaryLead) => Object.assign({}, secondaryLead, thisLead) );
                                      return Object.assign(pushTemplate, { input : pushInput });
                                    .then((pushReq) =>
                                       // sync list of leads back to Mkto
                                            method: "POST",
                                            headers: commonHTTPHeaders,
                                            body: JSON.stringify(pushReq)
                                        .then((pushResp) => pushResp.json())
                                    1 of 1 people found this helpful