What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Does inventory_behaviour: decrement_obeying_policy follow smart order routing?

Does inventory_behaviour: decrement_obeying_policy follow smart order routing?

ctsai
Shopify Partner
4 0 0

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?

Reply 1 (1)

Liam
Community Manager
3108 344 895

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.

  1. 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.

  2. 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.

  3. Routing Rules: Review your order routing rules in the Shopify admin panel to ensure they are set up correctly.

  4. 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.

  5. 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