Table of Contents

Order Allocation

Colin Updated by Colin

When you have inventory in multiple warehouses, ShipStream provides a very flexible system for automatically allocating each order to the optimal 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.

The order allocation process occurs automatically as long as the order is Ready to Ship, and will take into account the real-time multi-warehouse inventory availability, Packing Solutions and Rate Shopping as appropriate.

The first step is determining which warehouses are eligible for the given order. This is affected by:

  • The "Allowed Warehouses" configuration
  • The allowed_stock_ids value of the Allocation Options
  • The Order Allocation Algorithm
  • The Dynamic Allocation option (described below)
  • The amount of inventory that is "Available" for each order item

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

You can choose a Primary and Secondary Allocation Algorithm in the System > Configuration > General > Warehouses > Order Allocation configuration section.

In the case where the Primary option fails, the Secondary will be attempted. If the Secondary fails too, 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.

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 Individual Order Override section below).

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 Dynamic Allocation. The order would then remain backordered until it is in-stock at the optimal warehouse(also referred to as "Static Allocation" since the allocation does not change as inventory changes — it will remain static regardless of available inventory).

By System > Configuration

This configuration is located at System > Configuration > Catalog > Inventory > Product Inventory Options.

By Product

You can also override the configured default at the Product level so that specific products can be treated differently from the default:

By Order

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 plain text using valid JSON format and may be set via the UI, the API, or via a Before Create Order (BCO) 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:

{
"algorithms": ["specific-locked"],
"allowed_stock_ids": [2]
}

The codes for the allocation algorithms are as follows:

  • Simple Cheapest - cheapest
  • Simple Fastest - fastest
  • Least Packages - leastpackages
  • Default Warehouse - default
  • Specific Locked - specific-locked

The warehouse ids can be obtained through the API using the warehouse.list API method or from the System > Warehouses page.

How did we do?

Order Processing Loop

Contact