I am looking to write a query or shopify flow that gets me unfulfilled or partially fulfilled orders that are older than 3 days on a scheduler.
This is working fine.
created_at:<=‘{{ scheduledAt | date_minus: “3 days” }}’ AND
(fulfillment_status:unfulfilled OR fulfillment_status:partially_fulfilled) AND
NOT status:archived AND NOT status:cancelled
I am looking to add to this query to only get orders that contain the tags ‘Amazon Status - Planning’ and exclude orders that contain the tag ‘Amazon Status - Complete’
I’ve tried the below query, but it does not run (although I dont get errors in the query snytax).
created_at:<=‘{{ scheduledAt | date_minus: “3 days” }}’ AND
(fulfillment_status:unfulfilled OR fulfillment_status:partially_fulfilled) AND
NOT status:archived AND NOT status:cancelled AND tags:‘Amazon Status - Planning’ AND NOT tags:‘Amazon Status - Complete’
Is there a different query or another approach I should be taking? The use case is I have orders that get stuck in ‘Amazon Status - Planning’ and dont end up getting fulfilled.