Bug: Assigned fulfillment location on order does not respect inventory level

Hi all,

I think that we have found a bug in the system that assigns the location of fulfillment in an order (Fulfillment order).

I have products located in 2 locations, both locations are sellable online (Fulfill online orders from this location).

I have a product with 0 available in CODE HQ, and 4 in POS store. Both are sellable online for this test.

Now I would expect that when I create an order with this product, that Shopify assigns the line item for this product to POS Store.

But the item in the order was assigned to CODE HQ (Online orders). But the only available inventory was located in the POS Store. So the location should be POS Store here. Now my fulfillment service kicks in and (logically) they report back that the item is not in stock. And the merchant needs to disappoint the customer because it’s out of stock (because it is assigned to the wrong location, the item remains available, so also more than 4 items can be sold).

For now we can mitigate the issue by making only 1 location available for online orders, but that is not the most ideal situation of course. I am convinced this is a bug in this part of Shopify, hopefully this can be solved quickly.