When you have inventory in multiple warehouses, ShipStream provides a very flexible system for allocating each order to the proper warehouse according to your preferences. These options for controlling the allocation exist both in the configuration which can be set at the Default scope and the Merchant scope, and also on an individual order basis using the "allocation_options" field.
Allowed Warehouses and Default Warehouse
In the System > Configuration > General > Warehouses > General configuration section, the Allowed Warehouses configuration will determine which warehouses orders may or may not be assigned and allocated. When adding a new warehouse, be sure to add it to the Allowed Warehouses in the appropriate scopes so that it can be utilized.
Order Allocation Algorithm
The order allocation algorithms currently offered by ShipStream are:
- Simple Cheapest — Uses rate tables to estimate shipping costs based on the order's shipping method and chooses the cheapest warehouse to ship from accordingly.
- Simple Fastest — Uses Days In Transit tables to estimate delivery dates based on the order's shipping method and chooses the fastest warehouse to ship from.
- Least Packages — Chooses the warehouse allocation that would result in the least amount of packages being sent.
- Default Warehouse — Allocate as much to the Default Warehouse as possible and then the remaining items to the other warehouses.
- Specific Locked — All order items are locked to a specific warehouse regardless of availability or any other criteria. This algorithm may only be specified for individual orders (see the next section below).
You can choose a Primary and Secondary Allocation Algorithm in the System > Configuration > General > Warehouses > Order Allocation configuration section.
In the case the Primary option fails, the Secondary will be attempted. In the case the Secondary fails, the Default Warehouse option will be used. A note will be added to the order history explaining why any algorithms failed. Common reasons would be that not enough data was present to make a determination, or that the variables to determine the outcome were equal for all warehouses.
Static vs Dynamic Allocation
When using "Simple Cheapest" or "Simple Fastest" allocation algorithms ShipStream performs real-time Dynamic Allocation for merchants that have inventory in multiple warehouses. This takes into account which warehouses have inventory in stock to get the order completed as soon as possible using available inventory. However, if you'd rather your orders be allocated to the optimal warehouse ignoring real-time inventory you can disable this Dynamic Allocation so your order will remain backordered until it is in-stock at the optimal location (also referred to as "Static Allocation" since the allocation does not change as inventory changes - it will remain static regardless of available inventory). This configuration is located at System > Configuration > Catalog > Inventory > Product Inventory Options.
You can also override the configured default at the Product level so that specific products can be treated differently from the default:
And of course at the Order level as well, using the UI, scripts or the API:
Individual Order Override
The configuration determines the default behavior used for all orders, but in some cases you may wish to override the default behavior for individual orders. An order field called
allocation_options is available for this purpose. It is text in valid JSON format and may be set via the UI, the API or via an Order Script.
The format of the JSON object may contain three keys:
algorithms- An array of the allocation algorithms that may be used for this order.
allowed_stock_ids- An array of warehouse ids that may be used for this order.
single_warehouse- A boolean indicating if the entire order may or may not be split among multiple warehouses. (
true- allocate to only a single warehouse - do not split)
dynamic_allocation- A boolean indicating if dynamic allocation is overridden for this order (
true- use dynamic allocation,
false- use static allocation).
For example, to lock an order to a specific warehouse one could choose the
specific-locked algorithm and specify the id of the warehouse you want to use:
The codes for the allocation algorithms are as follows:
- Simple Cheapest -
- Simple Fastest -
- Least Packages -
- Default Warehouse -
- Specific Locked -
The warehouse ids can be obtained through the API using the
warehouse.list API method or from the System > Warehouses page.