SOLVED

override Marketo "unsubscribe" system flow action

Go to solution
Vlada_Prasolova
Level 5

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?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

View solution in original post

14 REPLIES 14
Anonymous
Not applicable

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.

Margaret_Duff
Level 1

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!

SanfordWhiteman
Level 10 - Community Moderator

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

Margaret_Duff
Level 1

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!

SanfordWhiteman
Level 10 - Community Moderator

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):

FBHttp.fetch(mktoRESTIdentity)

.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)

FBHttp.fetch(

`${mktoRESTLeadsByFilterBase}?filterValues=${webhookContext.leadEmail}&fields=${fieldsToSync}&filterType=Email`,

{

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"],

pushInput;

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

FBHttp.fetch(

mktoRESTPushLead,

{

method: "POST",

headers: commonHTTPHeaders,

body: JSON.stringify(pushReq)

}

)

.then((pushResp) => pushResp.json())

);

Margaret_Duff
Level 1

Thanks! Excited to take a closer look at this.

Vlada_Prasolova
Level 5

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

Margaret_Duff
Level 1

Hi Vlada! Did you get this solved? I had the same issue, and Marketo Support built me a solution like the one Delwin suggested above. I also saw "Unsubscribe Reason=blank" when I went to the person and viewed the "Info" section, but I was able to see Unsubscribe Reason values when I went to the "activity log" and clicked individual activities. I think it may just live at the activity level instead of the person level. Hope that helps!

Anonymous
Not applicable

In this case it is probably a good idea to check with support. The Marketo instance that I work in right now is pretty new so if you are working in an older Marketo instance some of those changes might not have been brought over to your instance.

Vlada_Prasolova
Level 5

Thank you for your suggestion, Delwin

Will try this on out for sure

Denise_Greenb12
Level 7

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:

Triggers:

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

Flow:

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.

Vlada_Prasolova
Level 5

Thank you, Denise!

that sounds like a plan.

Jim_Thao7
Level 9

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.

Vlada_Prasolova
Level 5

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