Help please! Need to limit multiple triggers firing

Sean_Richards
Level 5

We need some help.

 

We have a smart campaign that powers our demographic score program logic.

 

The trigger in this case is designed to fire off when any of the data values changes occur that would affect our demographic score calculation. Therefore, the campaign has triggers for a number of different fields.

 

See below image:

 

What we are experiencing is that when a person has multiple data value changes made in Salesforce, when the sync occurs, it causes multiple occurances of the smart campaign to execute.

 

This causes issues because it not calculating the scores correctly.

 

I thought that I could circumvent this by adding a field called "demographic score lock", which would get set to true by the first spawn of the campaign as it's first Flow step, however, it doesn't work, unfortunately, multiple executions occur in a split second before the flow step can lock the others out.

 

So my question is, architectually, how can I have a smart campaign that has multiple triggers, and have a lead qualify for multiple triggers in the same campaign (i.e. data value changes "country" AND data value changes "email"), but limit the system from only executing it once until the first campaign has fully executed? I had a flow step at the end of a bunch of daisy chained request campaigns that sets the lock back to false.

 

Seriously, any help would be grately appreciated.

 

Cheers,

Sean

demo1.png

 

Sean Richards
17 REPLIES 17
Priyank_Joshi3
Level 6

Hi Sean,

 

1) There's an error which I notice in your flow step where Demographic score should be '=0' instead of 0.

2) Update qualification rules so that each record can qualify once or once every 24hours.

3) Like the way you have used filter to limit records you can also ad more filters say Country is not empty OR email address Is not empty etc..  

4) You can use flow step with request campaign, that way lead with flow from one campaign to another based on it's execution of defined flow step. 

SanfordWhiteman
Level 10 - Community Moderator

2) Update qualification rules so that each record can qualify once or once every 24hours.


That doesn't fit the business requirements, because there's no restriction that the values will only change once every 24 hours. The goal is to have scores adjusted a maximum of one time for every CRM sync cycle. 

Sean_Richards
Level 5

Exactly!

Sean Richards
Sean_Richards
Level 5

So this would help you all understand the issue better: https://youtu.be/Id1xfYvIiJE?t=1907

 

We modelled this off Edward's architecture. When you see the "Gating ReRoll" Campaign, you will see he also has multiple triggers, but I can't figure out how this would not also result in a CRM sync firing off multiple parallel campaigns when mutliple data values are changed from a single sync.

 

The consequence is that each campaign starts at a slightly different timestamp, so the first campaign might reach a score flow step and add +20, but then the second campaign starts, and sets the score back to zero, so these parallel campaigns are affecting the score field at the same time, but out of order.

Sean Richards
Sean_Richards
Level 5

I had an idea. I could puish this back to Salesforce to handle the triggers and abstract it into a single boolean instead. So basically, have salesforce calculate if one or more of those fields are changed, update a checkbox to true to tell marketo to rerun the demographic score recalculation. Then update the trigger in Marketo to be a change to that boolean and = true. Then at the end of the recalc, reset the check to false.

Sean Richards
SanfordWhiteman
Level 10 - Community Moderator

Another idea:

 

Have a DateTime formula field in SFDC. This field will not itself cause a sync. But when the sync runs and any other non-formula fields change, the formula field will be brought over and in turn trigger a Data Value Changes in Marketo.

 

And that DVC then becomes a proxy for the (imaginary) SFDC Sync Complete trigger that we don't have.

 

When that DVC triggers, concatenate your interesting {{lead.tokens}} into a single Textarea field, let's call it Synced Scorables. Make sure to choose a suitable delimiter between tokens. Something exotic like "␤" (the symbol-for-newline character) will likely do, although a real control character would be better it's probably not worth the work.

 

Then when a Data Value Changes triggers for Synced Scorables, you know that at least one of the tokens contained in the concatenated field has changed. The trigger itself will only fire once per sync cycle.

Sean_Richards
Level 5

I think both our methods are similar mate. They both abstract the trigger logic into a single field, and use that field to spawn the re-roll to occur once 🙂

 

I'm a big SF dude, so using the SF process step to check for any changes and flag a boolean seems like the easiest and cleanest way for me.

 

Thanks and I'll report back if this works. I've also sent @Edward_Unthank_ a tweet to see if he came across this issue in his logic before or not.

Sean Richards
SanfordWhiteman
Level 10 - Community Moderator

Right, they both collapse the change detection into a single field, but one is built more on the SFDC side and the other on the Marketo side. If you weren't into building things out in SFDC yourself, it'd be easier to get the SFDC admin to add the field and you wouldn't have to explain anything else. 🙂

Sean_Richards
Level 5

Yeah definitely, I makes it easy when you are the lead admin for both platforms 🙂

 

FYI: We tested and it all works now (yay!)

Sean Richards
dubelclique
Level 1

Echoing the method suggested in #4 above, we use use individual "Request Campaign" steps in the flow to process each potential individual data value change independently. Each "Request Campaign" flow step looks like this:

 

If [Field we're scoring on] is NOT EMPTY

Requested Campaign: [Smart Campaign for field we're scoring on]

Default Choice: Do Nothing

 

Each individual smart campaign processes the score change for that field based on values stored in program tokens. Each individual smart campaign also includes a Send Email step (with no email selected) to help prioritize the campaign against anything else running at the moment. Kind of a hack, but it helps.

 

--joe

SanfordWhiteman
Level 10 - Community Moderator

This doesn't help with the potentially parallel execution, however. B/c the issue is that Sean doesn't want independent processing.

dubelclique
Level 1

Interesting... I would have expected a similar problem to what Sean's describing, which we've not seen. Then again, it's also entirely possible we're not seeing as many data values change simultaneously from SFDC.

 

For my own understanding, do successive Request Campaign flow steps process without regard to those campaigns actually completing?

 

--joe

SanfordWhiteman
Level 10 - Community Moderator

For my own understanding, do successive Request Campaign flow steps process without regard to those campaigns actually completing?

Yes.

dubelclique
Level 1

Thanks for the clarification, Sanford! 

Jay_Jiang
Level 10

Hey Sean, can't you just make it run once per hour or something? 

 

You have a 15 minute wait step, meaning any updates to the contact record would have 15 minutes to poll before what ever field triggered the scoring campaign first causes it to run through once and calculate a final score.

 

Alternatively, you can set up daily batch campaigns for each/groups of the scoring fields and you would cascade the schedule every half an hour accordingly if one calculation relied on a pre-req

Amit_Jain
Level 8 - Community Advisor

Hi Sean,

 

Would you mind sharing the screenshot for the flow as well? I'll be able to answer this only when I see the full smart campaign setup. DM me if needed.

 

Also when you say, not able to calculate the score correctly, do you mean, it's doubling up the score sometime?

 

Regards,

Amit

Sean_Richards
Level 5

Hi Amit,

 

Here is the flow and also the daisy chain. Essentially, it resets person score back to behaviour score, then kicks off a chain of request campaigns.

 

The issue is that if this chain is started 3 times from 3 data value changes, yes, it tends to double the end result, or not quite double as there is three campaigns running, all making demographic score changes in parallel.

 

demo2.pngdemo3.png

Sean Richards