How can I tag pre-orders in Shopify flow when item quantity is zero?

Topic summary

A user wants to automatically tag orders as “pre-order” using Shopify Flow when any item has zero or negative available quantity at a specific location.

Current Issue:

  • The existing flow isn’t working correctly
  • It appears to be checking inventory across all locations rather than a specific one

Recommended Solution:
A respondent identified the problem: the flow contains an incorrect loop in the condition logic. Instead of the current path, the condition should follow:

  • order / lineItems / variant / inventoryItem / inventoryLevels / available

The corrected condition should check:

  • If at least one line item has at least one inventory level where available <= 0 AND location.name == "Warehouse" (or the specific location name)

This targets location-specific inventory rather than global inventory across all locations.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

I would like to tag orders with a pre-order tag using shopify flow when -

any item on the order has available quantity <=0 for a specific location.

Our current flow is not working correctly as it is looking at quantity across all locations.

My Flow trigger is order created.

Attached screenshot of current flow.

You have a loop in that condition (order / lineItems / variant / inventoryItem / variant), which you should remove. That is NOT checking location inventory. Instead you should check:
order / lineItems / variant / inventoryItem / inventoryLevels / available (its under deprecated)

Overall your condition should look close to this:

if at least one of order / lineItems
 if at least one of variant / inventoryItem / inventoryLevels
     level_item.available <= 0
     AND
     location.name == "Warehouse"
2 Likes