Covers all questions related to inventory management, order fulfillment, and shipping.
I am using the Order REST API to create new orders for my store with multiple warehouses.
I have set up order routing rules to ship from the closet location, but when I import the order through the API it is not selecting the correct warehouse for fulfillment.
I have inventory_behaviour set to 'decrement_obeying_policy'. Is there anything else that I need to include in order to get the order routing rules to take affect?
Hi Ctsai,
The order routing rules should automatically apply when you create an order through the API. However, there could be a few reasons why it's not selecting the correct warehouse for fulfillment.
Order Details: Ensure that the order details provided in the API call are correct, especially the shipping address. The routing rules heavily depend on the shipping address to decide the closest warehouse.
Inventory Levels: Check the inventory levels at your warehouses. If the closest warehouse does not have sufficient stock, the system might route the order to a different warehouse.
Routing Rules: Review your order routing rules in the Shopify admin panel to ensure they are set up correctly.
Asynchronous Processing: Keep in mind that order routing is an asynchronous process. It might take some time after the order is created for the system to assign a fulfillment location.
API Version: Make sure you're using a recent version of the API. Shopify has made significant changes to its API, especially related to fulfillment and inventory management.
Try these out and see if issue is resolved - hope this helps,
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog