Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Trying to get a Shopify Flow to send a daily reminder for inventory that is 'less than or equal' to zero, but to exclude products tagged with the following using a 'Get product data' advanced query:
- Cookie
- Cupcake
- Cake
- Brownie
- Bowl
- Rocky
This is what I wrote:
tag_not:Cookie,Cupcake,Cake,Brownie,Bowl,Rocky and inventory_total:<=0
As it exists right now, it emails me a list of 100 items, and it includes everything it shouldn't... What am I doing wrong?
Solved! Go to the solution
This is an accepted solution.
Simplify your query to something like
tag_not:Cookie AND inventory_total:<=0
Then add back into more logic once it's working.
When queries fail, they return all products.
You invented some syntax there that is not supported. See https://shopify.dev/docs/api/usage/search-syntax
In particular, you cannot add a list of things to a field like:
tag_not:Cookie,Cupcake,Cake,Brownie,Bowl,Rocky
I think you would want something like
tag_not:Cookie AND tag_not:Cupcake
Thanks for the response, Paul. I tried this, but it did not work.
tag_not:Cookie AND tag_not:Cupcake AND tag_not:Cake AND tag_not:Bowl AND tag_not:Rocky AND tag_not:Brownie AND inventory_total:<=0
Any other suggestions that you think may work?
Make sure there is no white space in the field.
I need more detail than "did not work" to be able to help. Can you describe what is happening now?
This query for example works in my store:
tag_not:test AND tag_not:lens AND inventory_total:>0
I'll try my best to convey what happened. With the query below it sent an email with 100 items out of stock, including things that were in the tag_not listings.
tag_not:Cookie AND tag_not:Cupcake AND tag_not:Cake AND tag_not:Bowl AND tag_not:Rocky AND tag_not:Brownie AND inventory_total:<=0
As far as I can tell there is no white space in the query.
This is an accepted solution.
Simplify your query to something like
tag_not:Cookie AND inventory_total:<=0
Then add back into more logic once it's working.
When I run this query via Graph QL, it returns only orders WITH the tag instead of all orders without the tag haha is that even possible?
orders(query:"tag_not:Special Terms")
Try putting single quotes around the tag name since it has a space
Wow.. lol, yup that did it! thank you so much Paul!
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024