Check number of variants out of stock (Flow that tags products by their overall availability)

2 0 0

I have set up a flow that tags products on three levels of availability:

  • good availability (has all variants in stock, at least a few items per variant) – currently condition checks whether product has not any out of stock variants and if total inventory is above 50 items
  • average availability (can have some variants out of stock, but overall has good stock) – currently the condition is to check whether total inventory for that product is less than 50 items
  • low availability – multiple variants out of stock, low stock levels – currently the condition is to check whether total inventory is lower than number of variants

As far as I know, there is currently no way to check number of available variants and support confirmed it. Current solution is close enough, because the main purpose of this is to set up ads in a way that most budget goes into products with the best availability. Low availability products will fall out from ad sets. I wonder if there is a more bulletproof way to do this. Plus I just love flow feature and maybe I will learn something new about it.  🙂


Replies 2 (2)

Shopify Staff
1070 137 254

One feature that may not be obvious - you can add liquid to tag fields. So in the tag, you could write some liquid code that outputs the tag based on a deeper understanding of the data. Flow also recently made it possible to use the assign and capture tags in liquid, which could help this use case. I suspect using that approach you may be able to do quite a bit more for your use case. If you have a specific amount that you need to get in liquid, followup with a question about that. 

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.
2 0 0

Thank you for pointing that out. I thought about it too. It would help to some degree, but then I would have to make rules in product feed to correctly read these tags. The app I am currently using only allows equal conditions (so no includes).