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

Solved

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

ZLA1
Visitor
3 0 0

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.

ZLA1_0-1697595551201.png

 

Accepted Solution (1)

paul_n
Shopify Staff
1336 151 307

This is an accepted solution.

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"

 

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.

View solution in original post

Reply 1 (1)

paul_n
Shopify Staff
1336 151 307

This is an accepted solution.

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"

 

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.