When you create an order the FulfillmentOrder is automatically created, how do you set the fulfillment location that is set when this is generated? I can change it after it is created, but how can I set it with the initial order creation?
That is interesting. As you know, when you create an order, Shopify creates the fulfillment order to go along with it, based on their internal algorithms. Since there is no real way to stipulate a location for a line item at order create time, it looks like for the time being anyway, we are stuck editing the fulfillment order, which you are doing.
Maybe in the near future this will change! Maybe we will be able to fully decide when creating orders where to fulfill from as well. I can see that logic being problematic though. For example, say you choose location ID 123 and it is empty. What would Shopify think of that? You’d be forcing them to either create a bad fulfillment order, or they would have to override your request.
Does anyone know how Shopify chooses the initial location when the fulfillment order is created?
Would it make sense to guess that they probably look at the default location first? If it has inventory use it. Or maybe look at the customer location. If there is more than one location with inventory, and all line items can be fulfilled from the location closest to the customer, use that one?
Do you see something different than that? You’d think the default location would be the winner almost every time. Doing zip code magic is secondary but might play a role.
Yes I have a default location set, But it sometimes randomly chooses another one. And the items in question do have inventory at the default location.
Interesting. When do you examine the fulfillment order created, and you notice the location is not the default, is there any obvious logic that would have selected that location? Like, it is in stock there, and there is closer to the customer? I am curious. Can you suss out the logic?