Forum Discussion

Yusuf's avatar
Yusuf
Active Member II
12 months ago

Schedule action based canvas on weekdays only

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

  • 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.

  • 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.

    • Yusuf's avatar
      Yusuf
      Active Member II

      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!

      • BenLerner-Paio's avatar
        BenLerner-Paio
        Specialist

        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 %}
  • EmPaulin's avatar
    EmPaulin
    Practitioner III

    Adding to this - how would you go about sending a certain message if a mail is opened depending on the day of the week, Monday / Tuesday / Wednesday.... ? 

    • BenLerner-Paio's avatar
      BenLerner-Paio
      Specialist

      Just to clarify, you want to send a message based on the day of the week that the email was opened?  Not sure that's possible without some serious API calls to pull in campaign data for a specific user and then using it to query based on the timestamp of the open event.