nelson pointing at marketo

Simulating Wait step choices using Date Tokens and date math

SanfordWhiteman
Level 10 - Community Moderator
Level 10 - Community Moderator

The post title is a bit of a mouthful, but if you've been bitten by a certain feature gap you'll know what I mean.

 

One of the first things you learn about Wait steps is they don't have a literal Add Choice option.

nelson pointing at marketo

 

This can be frustrating when you want to vary the Wait delay based on  runtime conditions (that is, conditions you can’t know until the person has qualified and entered the flow) importantly including no delay at all.

 

But with a tiny bit of work, you can simulate Wait step choices.

 

It’s a matter of managing a Date/DateTime field, earlier in the same flow, using Marketo’s simple plus/minus support.

 

Here’s such a field:

 

field mgmt

 

And here’s a flow that uses that field to manage a subsequent Wait step:

 

flow steps

 

This approach works because of 3 convenient truths:

 

  • Change Data Value is synchronous within a single flow[1]
  • Date tokens understand a few math operators
  • Wait steps using a Date token will be skipped if the Date token is empty

 

Truth be told, I don't always endorse this tack over multiple Smart Campaigns. Whatever’s making you want drastically variable Wait periods (other than implicitly variable periods like wait-until-anniversary) may mean the lifecycle is going to differ in other ways as well, in which case discrete SCs help you keep your sanity. But it's there if you want it.

 

P.S. Yes, you can also use a Number {{my.token}} for the delay itself, a setup that might be almost too cool to follow! Or a Text {{my.token}} (don’t know why you’d choose this over Number, though) as long as you don’t include the unit  (“days”, “hours”) in the value, keep that hard-coded in the Change Data Value box.

 



Notes
[1] “Synchronous” meaning the New Value is guaranteed to be readable in the next flow step. Contrast this with, for example, webhook-based updates, which are asynchronous (background) value changes.

10976
13
13 Comments
Kris_Latulippe
Level 2

When you state "you can also use a Number {{my.token}} for the delay itself" - are you saying that in the wait step, you can tokenize the minutes, for instance, if you wanted to wait 5 minutes, you could use Wait Step -> Duration {{my.3 minute wait}} minutes <--- as long as I keep the word "minutes" outside of the token? Or are you suggesting using a number using the Advanced Wait Properties option of Date Token? If this is the case, how to I force it to use minutes instead of days?

SanfordWhiteman
Level 10 - Community Moderator

The former, Kris.

EDIT: misread Kris's question here at first. The actual answer is "Neither. You use the delay {{my.token}} in the Change Data Value, not in the Wait -- it's still the same sequence of CDV, followed by Wait. You can't leave out the CDV".

Kris_Latulippe
Level 2

Interesting, I tested this out a couple of different ways and it simply skipped the wait step on each account so I am unable to validate. 

Here is the token:

Screen Shot 2019-07-06 at 12.43.07 PM.png

Using Duration in wait step:

Screen Shot 2019-07-06 at 12.45.22 PM.png

Wait step skipped:

Screen Shot 2019-07-06 at 12.45.09 PM.png

Even though it seems to have accepted the token "{{my.SFDC Campaign Wait Step}} minutes" it ends up skipping instead of actually waiting. Any suggestions? Thanks!

SanfordWhiteman
Level 10 - Community Moderator

I actually need to re-answer your question above as I read it too fast.

The delay {{my.token}} (if you choose to use one) is used in the Change Data Value, not in the Wait.

Jay_Jiang
Level 10

Unfortunately wait steps don't take dateTime tokens which are accurate to the minute/hour.

Currently, the only way I've found to incorporate wait choices down to minutes/hours inside Marketo only is to use request campaign, where the request campaign in your flow has choice logic and the requested campaigns have different wait step durations.

You will need to split your campaign into sections. As an example, a typical campaign might need to be split into 3 sections:

1. first part of your campaign flow

2. choices of wait lengths

3. rest of your campaign flow

So at the end of (1) you request one of many (2) and in each one of (2) there's a wait step and the last flow step to request (3)

SanfordWhiteman
Level 10 - Community Moderator

Nope, it works with minutes and datetimes just fine. You must not have tested correctly: I have tokenized waits of 5, 10, 20 minutes running with the method described here.

Jay_Jiang
Level 10

Tried

pastedImage_2.png

How did you get the wait step to finish on a specific hour and minute when you can only use date tokens and pick an time on the hour?

pastedImage_3.png

Ariel_Sasso
Level 4

Awesome information as always!!!

Diego_Lineros2
Level 7

This is somenthing very interesting, if it is a trigger campaign, it works for me, if it is a batch campaign doesn't take the datetime token.

Diego_Lineros2
Level 7

I have a text token with this format 16 Jul 2019 12:00 UTC then I have a data change step like this {{my.texdatetoken}} - 2hours , then the waiting step. The calculation is correct and it works as trigger, not as batch because I get the same error than Jay Jang