Running Flows based on Time of Day | Community
Skip to main content
New Participant
October 25, 2017
Solved

Running Flows based on Time of Day

  • October 25, 2017
  • 1 reply
  • 3213 views

Does anyone know of a way to only have Smart Campaign Flows run during certain times of the day? We are looking to have an automated message sent out to individuals who fill out "Contact Me" forms on off hours, 5pm to 9am.  If a form is filled out between 9am and 5pm then it should skip the step. Same with only having Flows run on weekends as well. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Could you give an example of what this looks like?

Well, every webhook/scripting engine is going to look different. Generally speaking you'll be sending {{system.datetime}} in the webhook payload, then getting back a true/false for on-hours/off-hours.

The schedules could be expressed in several different ways, like cron-style*:

* 8-16 * * MON-FRI

* 9-17 * * MON-FRI

Or more JavaScript-y:

8to4 : { startHHmm : "08:00", endHHmm :  "16:00" },

9to5 : { startHHmm : "09:00", endHHmm :  "17:00" },

SchedulesByOffice: {

  "New York" : 9to5,

  "Los Angeles" : 8to4,

  "Columbus" : 9to5

}

I should have been clear that you either need to be using a scripting plug-in for Marketo, or hire a developer to build a special-purpose one.

*The cron and JS object examples here aren't complete or exactly equivalent, but you get the idea.

1 reply

SanfordWhiteman
New Participant
October 25, 2017

We do this using a webhook to call out for business hours/holidays (also depending on region) and only call the alert campaign if allowed.

RobSt3Author
New Participant
October 25, 2017

Thanks for the reply Sanford! Could you give an example of what this looks like?

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
October 26, 2017

Could you give an example of what this looks like?

Well, every webhook/scripting engine is going to look different. Generally speaking you'll be sending {{system.datetime}} in the webhook payload, then getting back a true/false for on-hours/off-hours.

The schedules could be expressed in several different ways, like cron-style*:

* 8-16 * * MON-FRI

* 9-17 * * MON-FRI

Or more JavaScript-y:

8to4 : { startHHmm : "08:00", endHHmm :  "16:00" },

9to5 : { startHHmm : "09:00", endHHmm :  "17:00" },

SchedulesByOffice: {

  "New York" : 9to5,

  "Los Angeles" : 8to4,

  "Columbus" : 9to5

}

I should have been clear that you either need to be using a scripting plug-in for Marketo, or hire a developer to build a special-purpose one.

*The cron and JS object examples here aren't complete or exactly equivalent, but you get the idea.