SOLVED

Re: How to prevent triggered messages to fire overnight

Go to solution
Stephanie_Lillo
Level 1

How to prevent triggered messages to fire overnight

We send one of our SMS messages using a trigger. While the message is supposed to send immediately after the triggered behavior, we can sometimes experience data delays that result in the user receiving the message in the middle of the night. 

 

Is there any way to setup a trigger with time restrictions so that it could hypothetically only send from 9am - 7pm. Ideally users that would have received it during 7pm - 9am would just get the message at 9am. 

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to prevent triggered messages to fire overnight

Ingredients:

  • String field (on the Person) Last SMS Trigger Request Time
  • 3 campaigns
    • 1st campaign triggers on the original trigger behavior
    • 2 SMS campaigns that are requestable (trigger on Request Campaign)

1st campaign sets the String field to {{system.time}} and requests the 2 others.  

 

SMS campaigns each filter on the current time, e.g.

 

   (

   [starts with] 07;08;09;10;11;12

   AND 

   [contains] "PM"

   )

  OR

   (

   [starts with] 01;02;03;04;05;06;07;08

   AND 

   [contains] "AM"

   )

 

would tell you if it's off-hours (well, it would say 07:00 PM exactly is off-hours, but other than that).

 

The filters are set to be mutually exclusive, so the person will only qualify for one of the campaigns.

 

The off-hours campaign does aWait  [must end at] 9am and then sends.

 

The on-hours campaign sends immediately.

 

You can read about an even more advanced technique in this post, which can cut down on the number of campaigns: 

 

https://nation.marketo.com/t5/Product-Blogs/Simulating-Wait-step-choices-using-Date-Tokens-and-date-...

 

Of course if you can actually check to see if the sometimes-delayed "data" is available (is that itself a Person field?) then just filter on that, it doesn't matter what the current time is, right?

 

P.S. Personally, I wouldn't do the above time comparison in Marketo. I'd do it much more simply with a webhook. But that's because I have a very robust ad hoc webhook environment available. 

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: How to prevent triggered messages to fire overnight

Ingredients:

  • String field (on the Person) Last SMS Trigger Request Time
  • 3 campaigns
    • 1st campaign triggers on the original trigger behavior
    • 2 SMS campaigns that are requestable (trigger on Request Campaign)

1st campaign sets the String field to {{system.time}} and requests the 2 others.  

 

SMS campaigns each filter on the current time, e.g.

 

   (

   [starts with] 07;08;09;10;11;12

   AND 

   [contains] "PM"

   )

  OR

   (

   [starts with] 01;02;03;04;05;06;07;08

   AND 

   [contains] "AM"

   )

 

would tell you if it's off-hours (well, it would say 07:00 PM exactly is off-hours, but other than that).

 

The filters are set to be mutually exclusive, so the person will only qualify for one of the campaigns.

 

The off-hours campaign does aWait  [must end at] 9am and then sends.

 

The on-hours campaign sends immediately.

 

You can read about an even more advanced technique in this post, which can cut down on the number of campaigns: 

 

https://nation.marketo.com/t5/Product-Blogs/Simulating-Wait-step-choices-using-Date-Tokens-and-date-...

 

Of course if you can actually check to see if the sometimes-delayed "data" is available (is that itself a Person field?) then just filter on that, it doesn't matter what the current time is, right?

 

P.S. Personally, I wouldn't do the above time comparison in Marketo. I'd do it much more simply with a webhook. But that's because I have a very robust ad hoc webhook environment available. 

Stephanie_Lillo
Level 1

Re: How to prevent triggered messages to fire overnight

Thanks so much, @SanfordWhiteman! This solution worked perfectly. 

SanfordWhiteman
Level 10 - Community Moderator

Re: How to prevent triggered messages to fire overnight

Great!