โ12-19-2023 06:12 AM
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
Solved! Go to Solution.
โ12-19-2023 11:50 PM
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.
โ12-19-2023 11:50 PM
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.
โ12-20-2023 03:33 AM
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!
โ12-23-2023 02:38 PM
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 %}
โ01-04-2024 09:51 AM
Thanks, I managed to get this to work ๐