I tried to replicate the same thing on the latest version of the API: I created an order with help of REST Order API, product stock in one place set to 1, in another place set to many. The order was not split, instead of one it became negative (-1).
Happy to look in to this with you. When you create the order in REST, what are you specifying for inventory behaviour? You’ll want to make sure you are specifying decrement_obeying_policyOrder - REST
I would also recommend checking any order routing rules that may be set on the shop to make sure splitting the order would be expected on that order.
From there, do you see the same when creating orders using graphql orderCreate mutation?
Do you know, order splitting should already work when using REST? We decided that it doesn’t work at all, but maybe it will work in the near future…
Thanks for that clarity. I’m going to set up and test to see what I find here.
Regarding using REST, these api’s are currently Legacy with all new features and enhancements being built specifically for Graphql. We have a great migration guide here to help make the change About REST to GraphQL migration
Hey! I did some testing here and I was able to get it working with REST create order.
I was running in to the same issue you were, but then I worked through this document here to make sure the settings were meeting all of the criteria. Once I did that, the orders started splitting as expected.
Split allocation in an order can occur under the following circumstances: A checkout is completed containing one of the above products or product variants with a quantity that is greater than can be fulfilled from a single location, but less than or equal to what is available in all locations. Since there is no actual checkout occurring here, the fulfilment is not split.