Forum Discussion

Rajorigin's avatar
Rajorigin
Specialist
2 years ago

How to restrict action based trigger from firing messages on weekends and public holidays

Hello Bonfirerers,

Hope you are all doing well.

For one of our service-related proactive messaging, I am using a custom event to trigger comms from Braze by sms and push. The event is not real time but is batched from our data lake based on emails that are triggered from a different CRM system the previous day. For example, if emails were sent on Monday the custom event will trigger the braze canvas on a Tuesday. Since they are Action based, I do not see a straightforward way to restrict sending messages on weekends. I could possibly include an additional event property say "email_send_date = Friday" and by filtering for this property I can delay the canvas for 3 days to hold off SMS and Push sends until Monday.

Keen to have your thoughts on any alternative solution that you know of/ tried before using Liquid, which I could possibly use to control these sends instead of creating multiple canvases - one for the weekdays and weekend. Also, not sure how to restrict the messages from sending on public holidays. 

Regards
Raj

  • 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

     

     

  • Thanks AllanHeo, awesome stuff, will try this sooner and let you know how I go, really appreciate your response. 

  • Dany's avatar
    Dany
    Active Member II

    If only we could add weekdays to Quiet Hours, that would be so much cleaner solution.
    But let's not lose hope just yet - I posted this product request just a couple of years ago..)))