SOLVED

Wait Times on SMS (time range)

Go to solution
danielaggarwal
Level 1

Wait Times on SMS (time range)

We have an SMS that we need to send only during the hours of 9am-5pm. If someone qualifies at 10am, we dont want to wait until 9:00am the next day to send. How can we go about adding a wait step that ensures we are only sending during office hours and does not delay key messages.

 

Has anyone done this successfully? Marketo support response was that it is only possible with email and needs to be done via velocity scripting.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jo_Pitts1
Level 10 - Community Advisor

Re: Wait Times on SMS (time range)

@danielaggarwal ,

if someone qualifies at 17:01, do you want to text them at 09:00 the next day, or do you just want to text people IF they qualify between 09:00 and 17:00?

 

Either way, I'd use Flowboost to write a webhook.  In it, I'd:

  • Look at the time, work out if it was between 09:00 and 17:00.  If the time is between 09:00 and 17:00 set a variable to 'send now'.  If it is outside of 09:00-17:00 set the same variable to 'send later'
  • If someone can qualify multiple times, you will want to have a second variable containing the date and time to perform the send.  i.e.  yyyymmdd hh:mm:ss
  • Map those two variables to Marketo fields (for now, let's call that field 'When_To_Send', and 'When_To_Send_Date_Time').
  • Have a smart campaign that is triggered off When_To_Send_Date_Time being changed, and filtered on When_To_Send being 'Send Now', and have a flow step to send the text
  • If you want to send to people who qualify outside 09:00-1700, have a smart campaign that is scheduled to run daily at 09:00.  In it, filter on any values for When_To_Send_Date_Time being TODAY and When_To_Send being 'send later'

You can extend the logic about the setting of When_To_Send_Date_Time to cater to weekends as well very easily if needed (you've not stated this, but it seems likely you'll want it).

 

Cheers

Jo

 

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Wait Times on SMS (time range)


if someone qualifies at 17:01  text them at 09:00 the next day (we send SMS via truly and need someone on the clock to respond)

but IF they qualify between 09:00 and 17:00, send the SMS right away (as our reps are there to respond)


In FlowBoost, that’d be as easy as:

nowTz = FBUtil.time().tz("America/Los_Angeles");
nowHHmm = nowTz.format("HH:mm");

if( nowHHmm >= "09:00" && nowHHmm <= "17:00" ) {
    isBusinessHours = true;
} else {
    isBusinessHours = false;
}

Of course substitute your actual time zone.

 

(Note this works because the format HH:mm can be sorted as a string between other strings.)

View solution in original post

6 REPLIES 6
Darshil_Shah1
Level 10 - Community Advisor

Re: Wait Times on SMS (time range)

Advanced wait properties can be used to send out messages through Marketo campaigns during work days (M-F), or any other days / day ranges available in the advanced wait properties - but sending emails/text messages during a specific time window (like 9 AM to 5 PM) isn't natively supported in the Marketo as of now. You can of course choose to send the messages via batch campaign during the allowable time range but that would not be real-time/near real time delivery of message when compared with the messages sent by a trigger campaign. 

 

Best,
Darshil
SanfordWhiteman
Level 10 - Community Moderator

Re: Wait Times on SMS (time range)


Marketo support response was that it is only possible with email and needs to be done via velocity scripting.

This is a strange response. While it’s technically true, the type of Velocity you’d need to write (and companion trigger campaign listening for a VTL-driven Soft Bounce) is very complex. So it’s a stretch to to say it’s even possible with an email for 99.999% of people!

 

At any rate the only way to get this working with an SMS webhook or other flow step is to use another webhook-driven service to determine if it’s currently business hours or not, then trigger off that response.

Jo_Pitts1
Level 10 - Community Advisor

Re: Wait Times on SMS (time range)

@danielaggarwal ,

if someone qualifies at 17:01, do you want to text them at 09:00 the next day, or do you just want to text people IF they qualify between 09:00 and 17:00?

 

Either way, I'd use Flowboost to write a webhook.  In it, I'd:

  • Look at the time, work out if it was between 09:00 and 17:00.  If the time is between 09:00 and 17:00 set a variable to 'send now'.  If it is outside of 09:00-17:00 set the same variable to 'send later'
  • If someone can qualify multiple times, you will want to have a second variable containing the date and time to perform the send.  i.e.  yyyymmdd hh:mm:ss
  • Map those two variables to Marketo fields (for now, let's call that field 'When_To_Send', and 'When_To_Send_Date_Time').
  • Have a smart campaign that is triggered off When_To_Send_Date_Time being changed, and filtered on When_To_Send being 'Send Now', and have a flow step to send the text
  • If you want to send to people who qualify outside 09:00-1700, have a smart campaign that is scheduled to run daily at 09:00.  In it, filter on any values for When_To_Send_Date_Time being TODAY and When_To_Send being 'send later'

You can extend the logic about the setting of When_To_Send_Date_Time to cater to weekends as well very easily if needed (you've not stated this, but it seems likely you'll want it).

 

Cheers

Jo

 

danielaggarwal
Level 1

Re: Wait Times on SMS (time range)

Thank you very much for the help here! We will look into Flowboost.

 

What we need is:

if someone qualifies at 17:01  text them at 09:00 the next day (we send SMS via truly and need someone on the clock to respond)

but IF they qualify between 09:00 and 17:00, send the SMS right away (as our reps are there to respond)

SanfordWhiteman
Level 10 - Community Moderator

Re: Wait Times on SMS (time range)


if someone qualifies at 17:01  text them at 09:00 the next day (we send SMS via truly and need someone on the clock to respond)

but IF they qualify between 09:00 and 17:00, send the SMS right away (as our reps are there to respond)


In FlowBoost, that’d be as easy as:

nowTz = FBUtil.time().tz("America/Los_Angeles");
nowHHmm = nowTz.format("HH:mm");

if( nowHHmm >= "09:00" && nowHHmm <= "17:00" ) {
    isBusinessHours = true;
} else {
    isBusinessHours = false;
}

Of course substitute your actual time zone.

 

(Note this works because the format HH:mm can be sorted as a string between other strings.)

Jo_Pitts1
Level 10 - Community Advisor

Re: Wait Times on SMS (time range)

Slick.  Even less lines of code that I thought (and mine wasn't long 🙂 )