We are having issues with the setup of two warehouses, each with their own inventory and products pointing to one or the other warehouse.
Attached are two orders one for Warehouse #1 called Regal and the other for Warehouse #2 called Rhiem. The source code for both orders are showing location ID of 35022962754. This is a Regal location ID 35022962754. Rhiem location ID is 35591553090 but the order has Regal location ID instead. Can anyone help me understand why the Rhiem order is not showing Rhiem location ID?
The location_id field on the order object corresponds to the location the order was processed at, not where the items are located. Is this app a fulfillmentService, and did you create these orders using the app? This field is usually null for orders that go through the online store, but since a location_id I showing there I believe that corresponds to the fulfillmentService's location.
These were test orders created within the Shopify Admin. So they were both coming in from the same place essentially. We are trying to set up two physical warehouse locations and both seem to be pulling all orders, instead of the sku items designated to them.
We thought the locationID was the source of the problem. Any thoughts?
The location_id on an Order is essentially irrelevant. When an order is created, Shopify will just automatically pick the first location in the ordered list that has inventory available.
When you create a fulfillment for this order in Shopify, Shopify will prompt you to choose a location to fulfill from (assuming both locations have inventory). If you wish to manage fulfillment events outside of Shopify, you can create Fulfillments via the API and attach the appropriate location ID.
Either way, the location_id associated with this Fulfillment (not the Order) is the relevant identifier as far as the warehouse is concerned.
Your fulfillment app should listen to `fulfillment/create` webhooks. The Fulfillment object will contain a `location_id` attribute which represents the location that the fulfillment should be processed at.
You can also reconcile by querying all fulfillments in Shopify, but this requires you to ultimately query and iterate through every Order object in Shopify (since a Fulfillment is a child resource). Thus, you will most likely want to time-bound this query (i.e. retrieve all orders from the last 14 days).
Thank you for the response.