Shopify Flow how do I check quantity for only individual variants on a order not parent product

Hi,

I’m creating the following Shopify Flow to send an internal email if a SKU on an order is oversold.

However, I’m running into an issue where the flow is firing every time a product on an order is showing -1 stock, since our products have multiple variants, I only want the flow to check for stock levels of individual SKUs. The image below shows an example of the flow firing when I don’t want it to, since the variant stock of -1 in this case isn’t the SKU on the customer’s order.

Any help or ideas would be appreciated.

Thanks!

1 Like

Hi @BAdam

Have a try like below

Hi @Sonya_2025 ,

I have set it to zero to see if the flow will target just the specific SKU on an order. But I’m not sure how this will solve it, because I only want the flow to fire when a SKU on an order is oversold.

Currently, it will check the quantity of all the SKUs in a parent product and will pass the flow if it finds a variant with a quantity less then zero, even if the SKU he has in his order is over 0.

I hope that makes sense.

Hi @BAdam

Pls pay more attention at the place I marked. It is different to your settings.

Hi @Sonya_2025 ,

My apologies thanks for your help I’ll give it a try!

Thanks

You are checking if at least one line item has a product where at least one variant <= -1.

Change that to check:

if at least one order / lineItems / variant / inventoryQuantity <= -1

Thanks @paul_n appreciate the help