Get order by legacy id

Hi @jrtwynam @originsid
I apologize for the delay in my response to it.
So right now, the warehouse will return the warehouse to which the order is locked to, not allocated necessarily.
Unfortunately, I was told that this is not going to be changed for now. The reason for this is that, for example, an order might have many line items, some allocated to a certain warehouse and som allocated to another, and to be able to reflect this correctly we will have to define an Allocated Warehouse to each of the line items. Right now this is a task we cannot take base on the amount of work it requires, but I will keep this on my notes in case things change and we find that we can work on this.
Again, I appreciate your patience with this, and please let me know if there is anything else I could help you with.
Thanks again
Tom

Hi @tomasw,

Thanks for the follow up. I understand that that particular field will return the warehouse to which the order is locked to as opposed to allocated to, but if I think about it logically, thatā€™s actually what I want. The problem I have now is that I donā€™t understand why itā€™s locked to a particular warehouse.

For example, if an order comes in with only one order line, and that entire order line is allocated to a particular warehouse, does it not make sense for the order to also be locked to that same warehouse? Because thatā€™s not what weā€™re seeing. How is it possible for an order to be completely allocated to one warehouse but locked to another? To me, ā€œlockedā€ means that the only warehouse that can do anything with it is the one itā€™s locked toā€¦ which in this example would mean that the order would never get filled. That doesnā€™t seem to be the case, though - the order gets locked to our Primary warehouse but allocated entirely to our Secondary warehouse, and yet our Secondary warehouse is able to fill and ship the order without any intervention from our Primary warehouse. Soā€¦ what does it mean to say itā€™s locked to the Primary warehouse?

Alternatively, if an order comes in that has multiple order lines, and theyā€™re allocated to different warehouses, my understanding of the allocation rules is that the order is first locked to one warehouse until that warehouse fills its order lines, and then itā€™s re-locked to the next warehouse for it to continue the order. In this case, it makes sense for an order line to be allocated to one warehouse but the order be locked to another; however, in this case, we still have a sensible situation where the order is locked to a warehouse that also has some of the order lines allocated to it.

Is there some sort of allocation configuration we have that might be causing this? Or am I misunderstanding the meaning of ā€œlockedā€ in this context?

I note in your reply that you said youā€™d have to define an Allocated Warehouse to each of the line items, but what Iā€™m currently pulling is an attribute of the line items:

"line_items": {
      "edges": [
        {
          "node": {
            "id": "TGluZUl0ZW06Mzc5MzI5MzQw",
            "sku": "70419835-BOR-12939-10890A",
            "quantity": 1,
            "product_name": "Fuel Injection Throttle Body Repair Kit-TBI Tune-Up Kit BWD 10890A",
            "fulfillment_status": "pending",
            "quantity_allocated": 1,
            "backorder_quantity": 0,
            "barcode": null,
            "locked_to_warehouse_id": null,
            "warehouse": "Primary"
          },
          "cursor": "YXJyYXljb25uZWN0aW9uOjA="
        }
      ]

Or at least, it let me add the ā€œwarehouseā€ tag within the line_items group (Iā€™m not sure of the exact JSON terminology). But in any case, it implies that the warehouse returned will be specific to the line item, not to the order, although I suppose itā€™s possible that it is actually an attribute of the order thatā€™s just getting repeated with the line items, similar to how an SQL statement would work with a header/detail relational table structure.

Thanks.

Hi @jrtwynam
So right now we removed the ā€œLocked to Warehouseā€ from the UI. The reason for this is that with MWA (Multi Warehouse Allocation) accounts, the Locked to Warehouse option will get always overridden by the Rules of Multi Warehouse.
I will create a request to add a description to that field in case you are using MWA Rules.
As those rules can be a lot, and quite complex, it may cause to have different SKUs allocated to different warehouses, based on availability, distance, etc.
To be able to cover that we would need to create a new type and display for each line item the warehouse that is allocated to. Right now due to the amount of work it requires we will not be able to do so, but I will keep it in my notes in case this keeps coming up or we get the possibility of adding it while working on something else.
Thanks again, and please let me know if I can explain better or there is anything el see I could help you with
Tom