Hi there. We have several products that we allow to go to backorder/preorder status within shopify and allow customers to place orders for those items.
Our fulfillment backend however makes finding these orders tedious when it comes to fulfillment. (We are using Cin7 Core). We would like to know if it’s possible to tag an order that contains an item with a managed stock level of less than 0 with a) the SKU of the backordered item, or b) BACKORDERED as a tag.
This will allows us to find these orders quickly in the fulfillment system for processing and shipping. I’d prefer to stay with flow if possible and not use a 3rd party app.
This option checks if the product associated with any line item on the order has a totalInventory less than or equal to 0, and if so, it adds a BACKORDERED tag to the order.
Another approach is to loop over the line items and check a similar condition. This way we can include the sku on the tag, like BACKORDERED: {sku}.
Since the flow is run AFTER the order is placed, an order can accidentally be tagged with ‘backorder’ if the order got the last item in stock, since the logic of ‘total inventory’ being 0 or less is true.
Would using ‘current QTY’ ( lineItemsForeachitem.currentQuantity – The line item’s quantity, minus the removed quantity.) be a better fit in this scenario?
Otherwise, this does work, with the exception of the aforementioned ‘last item’ order.
Quantity is the quantity ordered and not the in-stock quantity. I would just change the operator to less than 0, although this assumes that you allow the number to go negative.
You can definitely do this with Shopify Flow as described above
Another option (something more flexible or easier to maintain) is using a rule-based tagging app instead of building complex Flow logic.
For example, with AutoTag Pro you can create rules like:
• If any line item inventory ≤ 0 → add tag BACKORDERED
• If SKU contains -BO → add tag backorder
• If product tag = preorder → add order tag automatically
The app runs on webhooks, so orders are tagged in real-time and tags can also be removed automatically when conditions no longer apply.
This avoids having to maintain multiple Flow branches when your rules change.