No split
How the default inventory strategy works
Problem
You have an order containing several SKUs, whose stock is available in a single location and — possibly — belongs to multiple shipping categories. You want to (always) create a unique shipment from that single stock location to fulfill the order line items.
![](https://docs.commercelayer.io/~gitbook/image?url=https%3A%2F%2F2610849379-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lk-ezuDClaMavTqnRi0%252Fuploads%252FB1g2wZij07rf1ELXT3gz%252Fno-split.jpg%3Falt%3Dmedia%26token%3D7cc65573-cd26-42d2-bc3d-ae4e7006e0da&width=768&dpr=4&quality=100&sign=73676086&sv=1)
Solution
You need to use the no split strategy, which is the default one. To do that, check the related option in the admin UI or send a PATCH
request to the inventory_models/:id
endpoint, setting the strategy
attribute accordingly.
Example
The following request explicitly updates the strategy for the inventory model identified by the "BwAezhyOQw" ID:
How it works
This inventory strategy affects the creation of the resources involved in the process by the following logic.
Shipments
Just one stock location is checked — the primary one or the one specified in the scope. The selected stock location will fulfill all the SKUs associated with the order, thus just one shipment is created, no matter the SKUs shipping categories.
Stock line items
Each SKU associated with the order generates a stock line item that is also linked to the single stock location from which its quantity will be fulfilled.
Shipping categories
In case the order contains SKUs belonging to different shipping categories, they are ignored: just one shipment is created with no specific category (the number of available shipping methods for this shipment will increase accordingly since they won't be filtered by shipping category).
Additional notes
Do not ship SKU
If an SKU is marked with the do_not_ship
flag, no shipment is generated for it. The necessary stock line items are created anyway.
This option still tracks inventory.
Do not track SKU
If an SKU is marked with the do_not_track
flag, stock line items are still created but they aren't associated with any stock item so that the stock isn't decremented/incremented on order placement/cancellation.
This option still generates shipments.
More to read
See our documentation if you need more information on how to update an inventory model or if you want more information about SKUs, shipments, stock transfers, and stock line items.
Last updated