cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Schedule action based canvas on weekdays only

Yusuf
Active Member II

Hi I have an action based canvas triggered by an event that I would like to send on weekdays only (Mon to Fri). Those that are eligible to get the send on a weekend, I would like the message to be delayed until Monday, so I can't use abort message as it would just cancel the send. The canvas is triggered by an event so it can't be managed at an entry schedule level. Does anyone have any suggestion on how this can be achieved?

Thanks

Yusuf

1 ACCEPTED SOLUTION

BenLerner-Paio
Specialist

So you can in fact use the liquid and abort message, and then put a decision step of receiving message from previous step, then subsequent step of "Delay 2 days" then duplicate the message step.   Let me know if you need some help as I've got that liquid code somewhere.

View solution in original post

6 REPLIES 6

BenLerner-Paio
Specialist

So you can in fact use the liquid and abort message, and then put a decision step of receiving message from previous step, then subsequent step of "Delay 2 days" then duplicate the message step.   Let me know if you need some help as I've got that liquid code somewhere.

Hey I was also thinking along the same lines of using a blank web-hook message to determine weekday/weekend and abort message, followed up by a step to check if message was received from previous step. Yes please, if you do have the liquid code to determine weekend/weekday and abort message that would be really helpful.
Thank you!

Hey Yusuf!  Sorry I just saw this now.   Here is a sample of something that could work:

{% assign allowed_days = "Monday, Tuesday, Wednesday, Thursday, Friday"}
{% assign current_day = "now" | date: "%d" %}
{% if allowed_days contains current_day %}
	We're clear to send the message - add here!
{% else %}
	{% abort_message("Sorry, its a weekend!") %} 
{% endif %}

Thanks, I managed to get this to work ๐Ÿ™‚