What's your biggest current challenge? Have your say in Community Polls along the right column.

Schedule Workflow to add order tags on specific date

Schedule Workflow to add order tags on specific date

David44
Shopify Partner
3 0 0

Hi all!

 

I need to create a workflow, that adds order tags on a specific day from 12am to 12pm. 

I started with this workflow:

Screenshot 2024-11-19 at 17.36.43.png

But how can i schedule this workflow to run only in a specific time window? I tried with the Schedule at trigger but that leads to other issues like order data retrieval etc:

Screenshot 2024-11-19 at 17.36.15.png

Anybody know of a way how to schedule workflows? 

 

Also @Shopify... why is this feature not a standard option in the flow app?

 

Thanks to you all and best regards!

Replies 4 (4)

RPiii
Shopify Staff
98 16 35

Is there a reason you want to only add tags at specific times? If so, you'll need a Schedule time trigger and then a Get order data action, which you can probably configure with a query that returns orders that have one of your relevant tags and don't yet have the "loyalty_club_member" tag, so you can batch through the orders. You'll also need a For each loop to Add order tags to each of the orders returned by the action.

David44
Shopify Partner
3 0 0

Thanks so much for the help. I will try it out today!

 

The reason for adding tags at specific times is, that we can then configure our ERP System to add a gift to the orders with that tag. This is to support special promotions during certain holidays etc. 

David44
Shopify Partner
3 0 0

This is what I came up with:

Screenshot 2024-11-20 at 11.08.28.png

 I realized, however, that this flow would still not just return me the orders from that specified timeframe. Which is a problem, because I want just those orders of that specific day to be tagged. Would you have a solution for this?

 

Also I am new tho queries so i am not sure if the following query would work:

Screenshot 2024-11-20 at 10.59.04.png

Again, thanks for your help!!

RPiii
Shopify Staff
98 16 35

The documentation for the query search syntax provides examples of using date filters in the order query. For example, if you set the "Scheduled time" trigger to launch at 12pm, then a filter in the query on the "Get order data" of {{ "now" | date_minus: "12 hours" }} would return all orders that match the criteria from 12am to 12pm.