Re: Shopify Flow Check Order Tags on a schedule

Shopify Flow Check Order Tags on a schedule

jayswee
Shopify Partner
1 0 0

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.

 

Reply 1 (1)

paul_n
Shopify Staff
1584 171 364

With tags, I think you need to use tag_not instead of NOT tags. Also it's "tag" not "tags". 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.