Solved

Switch location for Order line Items through Admin API

KevinSchade
Shopify Partner
8 0 0

Hello,

 

we do use Amazon MCF and a manual fulfillment location and want to switch between those based on some predefined rules.
Is there any option to achieve this using the Admin API or do we need to wait for Shopify Functions Order Routing? 

Best workflow for us would be the following: Use a webhook on a new order -> Check our own conditions -> Switch the assigned location for each line item based on these conditions.

Thanks in advance!

Accepted Solution (1)

Shayne
Shopify Staff
253 20 64

This is an accepted solution.

Hi Kevin,

You should be able to move FulfillmentOrders using the fulfillmentOrderMove mutation. If you have the appropriate access scopes, you can move the fulfillments around so that whichever location you want is fulfilling to orders. 

Thanks for the question, and happy building!

Shayne | 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

View solution in original post

Replies 2 (2)

Shayne
Shopify Staff
253 20 64

This is an accepted solution.

Hi Kevin,

You should be able to move FulfillmentOrders using the fulfillmentOrderMove mutation. If you have the appropriate access scopes, you can move the fulfillments around so that whichever location you want is fulfilling to orders. 

Thanks for the question, and happy building!

Shayne | 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

KevinSchade
Shopify Partner
8 0 0

Thanks for your reply! Unfortunately, I get the error "The new location's fulfillment service must be opted into permits_sku_sharing". Do you know if I can add this to the Amazon MCF location?