Topic: Configure Shopify Flow wait times differently for weekday vs. weekend orders.
Current setup: Order created → wait 36 hours → check for shipping → send Slack if not shipped. Need longer wait (e.g., 48h) for Friday/Saturday orders due to warehouse not working weekends.
Limitation: No native Flow condition to check day of week.
Workarounds proposed:
• Liquid/tag approach: Store the order’s weekday using Liquid date filter (e.g., {{ order.createdAt | date: “%a” }}) in a tag/metafield, then branch logic on weekday vs. weekend. Add a short wait to ensure the tag/metafield is saved before the condition runs. (Code snippet provided.)
• Run code (JavaScript) approach: Use a Flow “Run code” step to compute isWeekendOrder based on order.createdAt (getUTCDay) and branch on the boolean for different wait durations. (Code snippet provided.)
Workflow design note: To avoid duplicating “check for shipping → send Slack” in both branches, move those shared steps into a separate workflow and invoke it from each branch after the respective wait.
Status: No built-in weekday check; viable workarounds shared. No final confirmation from the requester.
Summarized with AI on December 14.
AI used: gpt-5.
We use the trigger order created to notify us if no shipment has been made within 36 hours.
It goes something like this:
Order created >> wait 36 hours >> check for shipping >> send Slack message if no shipping.
But now we have the problem that our warehouse is not always working on weekends. Therefore we would like to have it something like this:
Order created >> Check for weekday (if order is created between Sunday and Thursday) >> Wait for 36 hours. But if the order was created between Friday and Saturday, wait e.g. 48 hours.
But I have not found out how to create a check based on weekdays,
Is it possible somehow?
one way you could approach is would be to print the day of the week this order was created on using a variable that prints the day of week in a tag or metafield, and later check again for that same value to determine if it’s a weekday or a weekend order:
{{ order.createdAt | date: "%a" }}
You can use a wait step for a few seconds to make sure the condition is applied on the updated item.
This way you can have different paths to manage your shipping processes.
If I understand correctly, after the Run code step we need to set up a condition that will establish different waiting times depending on the calculation result? This might be inconvenient as it would require duplicating the steps “check for shipping >> send Slack message if no shipping”.
No, I mean, first the code into the run code(missing the input shape and output shape object in purpose, I would give in pm), is checking if the order is made on a weekend /weekday, it can be easy adapted as dayOfWeek === 6 is Staturday.
There is no duplication in term of that if a condition is true, then proceed in a defined path, otherwise in another.
I see that there is no duplication in the code itself. I meant that duplication exists in the steps following the “Run code” phase. The subsequent steps differ only in the waiting time. The “check for shipping” and “send Slack message if no shipping” steps are identical, regardless of whether the order is placed on a weekend or a weekday.
The duplication of these steps can also be eliminated by moving them into a separate workflow and invoking it from both branches of the condition.