Business

10 min read

The Omnichannel Inventory Test: What Happens When Two Channels Want the Last Unit

Chris Kittrell

Written by Chris Kittrell

Published on Nov 17, 2026

omnichannel test

A customer taps "Buy" on the last unit online. In the same second, a store associate scans that same unit at the register. If the website and the store each work from their own count, both sales go through, and now there's an order with nothing behind it.

That moment only happens when the website and the store aren't reading from the same row, and no amount of sync frequency fixes it. Sync narrows the race condition. It doesn't close it. This isn't a hypothetical edge case. Limited-quantity drops, flash sales, and last-unit-in-store moments are exactly when two purchases land in the same second, and exactly when a sync-based system is most likely to sell the same unit twice.

TL;DR

  • Every location in one inventory picture: Warehouses, stores, and pickup points are all represented as inventory locations in one centralized model, each flagged for shipping, pickup, or in-store shopping. That makes it straightforward to check availability and manage reservations across the whole network instead of reconciling separate systems.
  • Concurrent orders don't race: Broadleaf's inventory services lock the SkuInventory row while a reservation updates it, so two simultaneous orders for the last unit are processed one after the other. The first gets the unit; the second is told it's gone.
  • Inventory tracked from cart to fulfillment: Stock moves from soft reserved to hard reserved to fulfilled (or cancelled), and each step is recorded as an InventoryTransaction. Holds from incomplete checkouts are released automatically after a configurable timeframe.
  • Sourcing rules that fit your business: Centralized inventory and locking are built in. Which location fulfills a shipped order is a pluggable strategy: you hook in your own rules for distance, shipping cost, store capacity, or carrier contracts instead of inheriting a one-size-fits-all default.

IHL Group puts the global cost of inventory distortion, stockouts and overstocks combined, at more than $1.7 trillion a year, roughly 5% of global retail revenue, stockouts alone accounting for two-thirds (IHL Group, March 2026).

Many platforms claiming omnichannel support actually run multi-channel inventory: a storefront, a POS system, and fulfillment syncing on a schedule instead of sharing one source of truth. That gap is a concurrency problem before it's a data problem, and the useful question to ask any platform is what actually happens when two channels reach for the same unit at the same moment.

1. Every Location in One Inventory Picture

The first question worth asking any platform is where inventory actually lives. If each channel keeps its own count, every other answer depends on how well those counts stay in sync.

Broadleaf represents every place a company holds stock, whether a distribution center, a store, or a pickup point, as an inventory location in one centralized model. Each location is flagged for what it can do: ship orders, serve in-store pickup, sell to walk-in shoppers, or any combination. Stock for each SKU is tracked per location as quantity on hand, quantity reserved, and safety stock, and the quantity available is calculated from those numbers.

Here's an example of one SKU across three locations:

LocationShipsPickupIn-store shoppingOn handReservedSafety stockAvailable
Dallas Distribution CenterYesNoNo120141096
Austin South Congress StoreYesYesYes6213
Houston StoreNoYesYes4301

Each location also carries its own address with coordinates and a location number, which can match the store number already used in other systems like the POS or ERP.

A product page asking "can I ship this?" and a pickup flow asking "is it at the South Congress store?" are reading the same records. Any channel that checks and reserves stock through these inventory services, including in-store systems like a POS, sees the same numbers in real time.

2. Concurrent Orders Don't Race

A shared count solves half the problem. Two requests can still both read "1 available" at the same moment and both try to sell it. So the next question is what happens when two reservations reach the same inventory record at once.

In Broadleaf, the inventory services lock the SkuInventory row while a reservation updates it. The second request waits for the first to finish, then sees the updated quantity. If the first order took the last unit, the second is told it's unavailable instead of being accepted and oversold.

Here's how that plays out. The Houston store has one pair of boots left. A store associate rings them up, and the POS places a hard reservation. A split second later, an online pickup order requests the same pair:

POST /api/inventory/shop-sku-inventory/reservation

{

  "requestId": "web-order-1042",

  "reservationRequestType": "SOFT",

  "skuReferenceFieldType": "SKU_CODE",

  "reservationRequestGroups": [{

    "fulfillmentType": "PICKUP",

    "requestedInventoryLocationId": "houston-store",

    "requestedItems": [{ "skuReferenceValue": "BOOT-CHELSEA-10", "quantity": 1 }]

  }]

}

It waits for the POS reservation to release the lock, sees that the last unit is gone, and gets:

HTTP/1.1 409 Conflict

{

  "type": "INVENTORY_UNAVAILABLE",

  "title": "Inventory was unavailable for inventory item with quantity, id: (…) quantityRequested: (1)",

  "statusCode": 409,

  "skuReferences": [{ "skuCode": "BOOT-CHELSEA-10" }]

}

Because the lock lives inside the inventory services rather than in each application that calls them, every channel gets the same protection automatically. A storefront, a POS integration, and a back-office adjustment can't bypass it or forget to apply it.

3. Inventory Tracked From Cart to Fulfillment

In Broadleaf, every change to a SKU's inventory is recorded as an InventoryTransaction, so it's always possible to see what is holding stock and why.

A typical order moves through these stages:

  • Checked: availability is confirmed as items are added to the cart, without holding stock yet.
  • Soft reserved: stock is held temporarily while the customer checks out (or when an item is added to the cart, for products configured that way). If the customer walks away, the hold is released automatically after a configurable timeframe, so abandoned checkouts don't keep sellable stock off the shelf.
  • Hard reserved: the order is placed successfully and the hold becomes firm.
  • Fulfilled: the item ships or is picked up, and quantity on hand is reduced.

A reservation can also be cancelled before fulfillment, which returns the stock. Changes outside an order, such as stock received, returned, or written off as damaged, are recorded as InventoryTransactions too, so every change to a SKU's available quantity can be traced.

4. One Order, More Than One Way to Fulfill It

Picture a shopper buying a denim jacket and a pair of boots. The boots are on the shelf at the Houston store, so they'd like to pick those up this afternoon. Their jacket size is only in stock at the Dallas distribution center, so that ships home. It's one purchase, and it should stay one order, with one checkout, one payment, and one confirmation.

In Broadleaf, an order can hold several fulfillment groups, each with its own method (ship, pickup, same-day delivery, and others) and, for pickup, its own store. The shopper's order simply has two groups: the boots waiting at the Houston store and the jacket shipping from Dallas. Quantities of a single item can be divided across groups too, for a customer who wants some units now and the rest delivered.

In the cart, the shopper's boots-and-jacket order looks like this:

{

  "cartItems": [

    { "id": "item-boots",  "name": "Chelsea Boot, Size 10", "quantity": 1 },

    { "id": "item-jacket", "name": "Denim Jacket, Size M",  "quantity": 1 }

  ],

  "fulfillmentGroups": [

    {

      "type": "PICKUP",

      "inventoryLocationReference": "houston-store",

      "fulfillmentItems": [{ "cartItemId": "item-boots", "quantity": 1 }]

    },

    {

      "type": "SHIP",

      "inventoryLocationReference": "dallas-dc",

      "address": {

        "fullName": "Dusty McCoy",

        "addressLine1": "123 Main St",

        "city": "Austin",

        "stateProvinceRegion": "TX",

        "postalCode": "78704"

      },

      "fulfillmentItems": [{ "cartItemId": "item-jacket", "quantity": 1 }]

    }

  ]

}

Pickup orders can also be offered as in-store or curbside, so both options fit into the same order flow.

5. Sourcing Rules That Fit Your Business

Which location should fulfill a shipped order? The nearest store isn't always right. A store may need its last few units for walk-in shoppers, a distribution center may have better carrier rates, or shipping everything from one place may beat splitting across two.

Broadleaf treats that decision as a pluggable strategy. The default makes no assumptions about how you prioritize. Your implementation receives the customer's shipping address, so you can apply rules for distance, shipping cost, store capacity, carrier contracts, or whatever else your operation optimizes for.

Here's an example implementation: ship from the nearest location that can fill the whole order, and when no single location can, hand off to Broadleaf's standard logic, which fills it from any shipping locations that have stock.

/**

 * Example sourcing strategy: ships an order from the nearest location

 * that has every item in stock.

 */

public class ExampleNearestLocationStrategy

        extends DefaultSkuInventoryAvailabilityStrategy<SkuInventory> {

    @Override

    protected List<SkuInventory> resolveInventoryFromAddress(String skuRefFieldType,

            Map<String, Integer> skuReferenceQuantities,

            Address shipTo,

            ContextInfo contextInfo) {

        SkuReferenceFieldType fieldType = getSkuFieldReferenceTypeUtility()

                .determineSkuFieldReferenceType(skuRefFieldType, contextInfo);

        // One query across all shipping locations: only returns SKUs with enough quantity available.

        Map<String, List<SkuInventory>> inventoryByLocation = getSkuInventoryRepository()

                .findAvailableBySkuReferenceForQuantity(skuReferenceQuantities, fieldType,

                        Optional.of(true), Optional.empty(), Optional.empty(), contextInfo)

                .stream()

                .map(r -> (SkuInventory) getHelper().convertFromPersistentDomain(r, contextInfo))

                .collect(Collectors.groupingBy(SkuInventory::getInventoryLocationContextId));

        List<InventoryLocation> nearestFirst = getInventoryLocationService()

                .readByShippingLocationTrue(contextInfo).stream()

                .sorted(Comparator.comparingDouble(loc -> milesBetween(shipTo, loc.getAddress())))

                .toList();

        for (InventoryLocation location : nearestFirst) {

            List<SkuInventory> inventoryAtLocation =

                    inventoryByLocation.getOrDefault(location.getId(), List.of());

            if (skusInStock(inventoryAtLocation, fieldType, contextInfo)

                    .containsAll(skuReferenceQuantities.keySet())) {

                return inventoryAtLocation; // everything is here: one shipment, shortest distance

            }

        }

        // No single location has everything: returning nothing lets the parent

        // strategy fill the order from any shipping locations that have stock.

        return List.of();

    }

    /**

     * Returns the SKU references (e.g. SKU codes) in the given inventory records.

     */

    private Set<String> skusInStock(List<SkuInventory> inventory,

            SkuReferenceFieldType fieldType,

            ContextInfo contextInfo) {

        return inventory.stream()

                .map(inv -> getSkuFieldReferenceTypeUtility()

                        .determineSkuRefValue(fieldType, inv.getSkuRef(), contextInfo))

                .collect(Collectors.toSet());

    }

}

Register it as a Spring bean and it replaces the built-in strategy, which is only created when no other one is defined. (milesBetween is a simple distance helper, left out for brevity.)

That's deliberate. Centralized inventory and safe reservations are infrastructure every retailer needs in the same form. Sourcing is where retailers differ, and it's where a platform should give you control rather than a fixed rule you have to work around.

Omnichannel Inventory Evaluation Checklist

Every vendor says yes to "do you support omnichannel." Use these questions to find out how well any platform, including Broadleaf, actually handles omnichannel inventory.

What to askWhy it mattersHow Broadleaf answers it
Is inventory centralized, or counted separately per channel?Separate counts need a sync job, introducing a window where both sides can be wrongEvery location in one centralized model
What stops two simultaneous orders for the last unit from both succeeding?A shared count without protection at the record is still a raceThe inventory record is locked during each reservation update
Can you see every change to inventory, from cart to fulfillment?Untracked holds and adjustments quietly make sellable stock look sold outEvery change is a recorded transaction; holds from incomplete checkouts release after a configurable timeframe
Can one order use more than one fulfillment method?Each part can be fulfilled and tracked on its own while the order stays wholeOne order can hold several fulfillment groups, each with its own method and location
How do you decide which location fulfills a shipped order?The right rule depends on your costs, labor, and carriersYou define the sourcing rules; Broadleaf provides the extension point to plug them in

The Bottom Line

Most platforms list BOPIS, curbside, and ship-from-store on a feature page. The difference between omnichannel and multi-channel is what sits underneath. Multi-channel connects a storefront, a POS, and fulfillment through sync jobs that narrow the gap between their counts but never close it. Omnichannel means every channel works from the same centralized inventory, with reservations protected at the record and tracked from cart to fulfillment.

For a closer look at how inventory, reservations, and orders work together, see A Developer's Guide to Broadleaf Inventory and Order Services.

Related Resources