Forum Discussion
How to restrict action based trigger from firing messages on weekends and public holidays
Hi Raj,
Very interesting problem to solve for! I can't think of a clean, straightforward solution, but definitely see some possibilities, although they might be kind of hacky.
If possible, I think the best solution would be to control this from your server's end. If you're able to make your server wait to trigger these messages on weekends and holidays, that would be the best. However, I understand that may not be an option.
One solution I had involves using this filter below and Liquid in your message. In your message, you'd abort the message if "today" = Saturday, Sunday, or any of the public holidays.
The users will still progress to the next step of the Canvas only if they haven't received the message from the previous step. The following message steps will all be identical to the first message. There may need to be multiple iterations of this, because if a user is set to receive the message on a Saturday, they'll actually have to wait 2 days until it's Monday to receive the message on a weekday. If Monday is a holiday (e.g. Labor day), they'll have to wait 3 days.
I'd say 5 iterations safely covers any situation where you might have many weekends and holidays all consecutively aligned (5 might be overkill.. haha).
I agree that it's not the prettiest solution, but it's one I thought of at the moment. I'll definitely revisit if I can think of more. Let me know what you think!
Thanks,
Allan
Related Content
- 9 months ago