Solved

Moving items between locations

ChannelAdvisor1
Shopify Partner
7 0 0

Hi Shopify support, 

 

I'm working with the fulfillment orders API endpoints and I have the following use case:

1. FULFILLMENT_ORDER1 on LOCATION1 has the following items:

  • FO1Item1
  • FO1Item2
  • FO1Item3

2. FULFILLMENT_ORDER2 on LOCATION2 has the following items:

  • FO2Item1

The use case is the following:

  1. I do a first fulfillment fulfilling only FO1Item1 and everything goes ok. 
  2. Then I want to do a second fulfillment with the same tracking nb and the following items taken from LOCATION2
    1. FO1Item2
    2. FO1item3
    3. FO2item1

But to do this I will first need to move FO1Item2 and FO1Item3 to LOCATION2 with the move.json endpoint in fulfillment orders. When I do that according to the API this will happen:

 

Second scenario: Re-assign a subset of the line items belonging to a fulfillment order to a new location. You can specify a subset of line items using the fulfillment_order_line_items field under the FulfillmentOrder parameter (available as of the2023-04 API version), or specify that the original fulfillment order contains line items which have already been fulfilled.

If the new location is already assigned to another active fulfillment order, on the same order, then the line items are moved to the existing fulfillment order. Otherwise, a new fulfillment order is created

 

So according to the API doc the expected result should be:

FULFILLMENT_ORDER2:

  1. FO1Item2
  2. FO1item3
  3. FO2item1

But what is happening in fact is that a new Fulfillment order is created containing the items I wanted PLUS the one remaining in FULFILLMENT_ORDER2, and that FULFILLMENT_ORDER2 is closed:

FULFILLMENT_ORDER3:

  1. FO1Item2
  2. FO1item3
  3. FO2item1

 

That is different from what the API doc is saying. I wanted to confirm what is the expected behavior or what should be the expected behavior

Accepted Solution (1)

Liam
Shopify Staff
2731 297 768

This is an accepted solution.

Hi ChannelAdvisor1,

 

Thanks for flagging this - it does seem that our docs in this case might be a bit misleading. It is expected behaviour that a new Fulfillment order is created when you edit the Fulfilment order via the move.json endpoint. 

 

I'll connect with our internal team to ensure this is documented more clearly. 

 

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

View solution in original post

Replies 2 (2)

Liam
Shopify Staff
2731 297 768

This is an accepted solution.

Hi ChannelAdvisor1,

 

Thanks for flagging this - it does seem that our docs in this case might be a bit misleading. It is expected behaviour that a new Fulfillment order is created when you edit the Fulfilment order via the move.json endpoint. 

 

I'll connect with our internal team to ensure this is documented more clearly. 

 

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

ChannelAdvisor1
Shopify Partner
7 0 0

Thanks for your response Liam. I'll take it into account, Also will accept as solution this response