Re: Generate an order with 2 fulfillment order

Generate an order with 2 fulfillment order

ChannelAdvisor1
Shopify Partner
7 0 0

Hi there. Is any way to generate an order using REST API with two different fulfillment orders? Let's say item1 is from location 1 and item2 is from location 2, so if I post an order creation the order should have one fulfillment order per location right?

Replies 4 (4)

Michael_AG
Shopify Staff
47 8 11

Hi,

 

Shopify generates fulfillment orders automatically based on inventory levels in different locations of the shop. You don't need (and cannot) create them manually. 

To learn more visit the Shopify Help Center or the Community Blog.

ChannelAdvisor1
Shopify Partner
7 0 0

Hi Michael.

I didn't meant to create fulfillment orders. My question is how can I create an order with two fulfillment orders. So far I managed to create an order with two items in the same location and then do a POST request to fulfillment_orders/{fulfillment_order_id}/move.json moving only one of the items to another location. But I wondered if there is a simpler method to do this.

Michael_AG
Shopify Staff
47 8 11

Could you please describe your use-case?

 

Why would one need to have 2 fulfillment orders in the same location? You are free to fulfill just a part of a fulfillment order with specifying a set of fulfillment order line items.

 

If I guess correctly, you have products A and B, say product A persists at locations L1 and L2, and product B persists only at the L1 location. They Shopify creates one fulfillment order with both products in the location L1. If I guess correctly, you have constrains/cost optimization leading you to move the product existing in the L2 location to the L2 location anyway?

To learn more visit the Shopify Help Center or the Community Blog.

ChannelAdvisor1
Shopify Partner
7 0 0

My use case: I want to create a Shopify test order with two items [A, B] one of them belonging to L1 and the other to L2:

L1 -> A

L2 -> B

What I'm doing right now is:

1. Using the fork support provided me (https://gist.github.com/youmikoh/362ee9e42ef136c855b4ab02f0cdb946) to create a test order with 2 items through Postman. The order gets created with both items in the same location (L1), so it will only have 1 fulfillment order.

2. I'm using the fulfillment_orders/{id}/move.json endpoint to move only one of them to a different location L2, so I end up having an order with two fulfillment orders:

ChannelAdvisor1_0-1681990027482.png

 

And I was wondering why it is not possible to create an order directly ('directly' meaning in one request) with one item in location 1 and the other in location 2. Somehow this is related to this other post:

https://community.shopify.com/c/shopify-apis-and-sdks/adding-a-fulfillmentorder-on-order-creation/td...