The Milk Problem: Understanding Modern Retail Inventory Management
Have you ever ordered milk online only to receive that dreaded out-of-stock notification after placing your order? You’re not alone. After years of ordering groceries online, I’ve learned a secret: ordering through a store’s app right after closing time often yields the best results. Why? I suspect it’s because my order gets fulfilled before in-store shoppers arrive the next morning. But this workaround hints at a deeper problem in retail inventory management—one that affects nearly half of consumers who rate out-of-stock items as their highest shopping frustration according to a survey by Dynata.
Modern retailers face unprecedented challenges in maintaining accurate inventory across multiple sales channels. This article explores why seemingly simple products like milk can show as available online but be out of stock in reality. I’ll examine the technical complexities behind inventory management and discuss proven solutions, from real-time message queuing to predictive analytics.
The Multi-channel challenge
Modern retail stores manage their inventory across multiple sales channels simultaneously:
- Physical store shelves for in-person shopping
- Website ordering systems
- Third-party platforms like Instacart
- Mobile apps for order pickup and delivery
- Cross-store inventory sharing systems
This creates a complex challenge where a single product needs to be tracked across multiple systems (with multiple backend data storage layers) simultaneously. The challenge becomes even more complex because stores need to balance storage capacity with potential sales. Order too much inventory, and it might spoil or go out of style before it sells. Order too little, and you risk disappointing customers and losing sales to competitors.
Integrating legacy systems
Many retail businesses have been around for decades, operating with legacy systems that work well for in-store operations. Pre-internet (at least after bar codes were invented and standardized), items were scanned in when they entered the store and scanned out via point-of-sale systems. These systems were built for a simpler time when inventory only needed to track what was on the shelf and in the stockroom. The weekly inventory count was a standard procedure.
As digital shopping emerged, these businesses faced a critical decision: replace their entire inventory system or add new digital layers on top. Most chose the latter, because replacing a functioning system that thousands of employees already knew how to use would be risky and expensive. Many stores added new systems – e-commerce platforms, integration with third-party delivery services, and mobile apps – rather than replacing their existing ones.
This creates a complex web of inventory management systems that need to stay synchronized. Each system might update at different intervals, handle outages differently, and even have slightly different ways of categorizing products.
Best Buy is perhaps the best-known case study of the problems caused by maintaining separate store and online inventories. Before omnichannel became an industry buzzword, they were forced to rethink their product availability across buyer locations. Tricia McKennon of the consulting firm Indigo9 Digital summarizes: “It would not be uncommon for a customer to try to order a product online, find that it was out of stock while there was more than enough stock in a store.” Sales were systematically reduced in this way, to the tune of billions of dollars lost.
The complexity of maintaining multiple channels grows when you consider that items might be removed from inventory outside of regular workflows. In the store, they might get damaged or moved to the wrong shelf. Online, full shopping carts might be abandoned, or an order might need to be cancelled. Items also might be in transit between stores.
Solutions and strategies
In an ideal world, you would always get the milk you order, and stores would always be able to deliver goods without expensive cross-store transfers or reserve stock. Retail stores employ a variety of strategies to get closer to this in reality.
Intelligent shrink management
When a customer knocks over a gallon of milk in aisle three, three different systems have to be updated: the in-store inventory system, the online ordering platform, and third-party delivery services. Otherwise, multiple customers could be left ordering milk that’s now puddling on the floor.
To protect against these incidents, stores may maintain extra safety stock in the back room that isn’t reflected in the online inventory. Although maintaining extra stock increases costs, Lisa Martensen of Milwaukee Tools describes how it can be an effective inventory strategy: “If you run out of an item in your inventory, then you can no longer sell that item to your customers, which means less–maybe even significantly less–money flowing into your business.”
Modern retail businesses have developed technical approaches to address this damage, as well as other kinds of loss such as theft. Many now use computer vision and AI-powered analytics to detect product movement and loss in real-time. As Hari Ramamurthy shares, Home Depot technology uses shelf imagery to bridge the “longstanding gap between what is listed “in stock” in retail systems and what is actually available on store shelves.” These systems can automatically adjust inventory counts across all sales channels when they detect discrepancies, helping prevent customers from ordering products that aren’t actually available.
Startups have proliferated in the space; Kurt Schlosser writes for GeekWire that Augmodo aims to “solve retail’s problems around inventory, keeping products in stock, and eliminating substitutions in e-commerce grocery orders” using employee badge cameras to get a constant feed of inventory count and location data. In a similar vein, Sam’s Club has deployed shelf scanning robots to create reports of current stock levels. If items are missing due to damage, theft, or misplacement, inventory counts can be updated accordingly. According to the company, the robots reduce “time consuming and manual processes, reducing waste and inventory loss.”
Real-Time Synchronization Through Message Queuing
The days of nightly batch updates are giving way to sophisticated real-time inventory systems. Using event-driven streaming technologies, when an item sells on one platform, the event triggers updates across all systems. Options for this message queueing include open-source and proprietary tools like Kafka, Pulsar, RabbitMQ, and Amazon SQS.
For example, Walmart has implemented Kafka to stream inventory change events that happen in any channel (online, in-store, third-party) to multiple channels as part of their real-time inventory system. In our example scenario, when a gallon of milk is scanned at checkout, the system would automatically send messages to update both the store’s website and Instacart. If 20 people buy milk within five minutes, each purchase triggers immediate updates across all platforms.
Similarly, Dick’s Sporting Goods implemented data streaming to synchronize their online and in-store inventory. Before updating their technology systems, a Dick’s customer could see that a product was available in the parking lot on their phones and then not find it in the store. Jay Piskorik shares that Dick’s “selected Confluent’s cloud-managed service to connect their previously siloed data feeds to bring real-time view of all their merchandise.”
Messages must be processed quickly to prevent overselling; it’s more critical to process the messages quickly when volume is high, and that volume is already causing load on the system. This requires robust message queuing systems to handle high volumes.
Predictive Inventory Management
Leading retailers now employ sophisticated prediction systems that take into account a wide range of factors. Historical sales patterns are combined with seasonal variations and local events to create dynamic forecasting models. Mobile app usage data and social media trends provide additional insight into consumer behavior and demand patterns. Almost every retail company is using this type of technology; for just two examples:
Target has developed a forecasting system to reduce what they call inventory not-found (INF) events, and they consider this a valuable part of their inventory management systems. As their data science team shares: “Working to improve the predictability of these INF rates can help Target trim our yearly shipping costs by decreasing overall INF rates.”
Albertsons recently announced a partnership with Afresh to get daily demand forecasts. Afresh has a focus on inventory management. Their newest technology offering takes into consideration “promotions, store displays, seasonal trends and holidays” to optimize ordering.
Some stores additionally use these predictive systems that track unusual patterns, like sudden spikes in bottled water purchases before a hurricane, to temporarily pause online ordering in order to avoid consumers stockpiling critical goods.
Distributed Database Architecture
Maintaining event queues between data sets may be a necessity to sync third-party data, but if all the data is internal, a more robust method can be deploying a distributed database across store regions. This placement facilitates low-latency reads, and ensures that data is always consistent. Multiple locations can share real-time inventory data, and changes in one location immediately reflect across the system. Adding geo-location data to the inventory tables allows for calculation of cost to ship between locations, or to offer to a user to pickup at a nearby location if their home store is out of the item.
Kroger understood the value of this architectural pattern, as shared in the YugabyteDB blog, “in a multi-region configuration with synchronous replication, achieving single digit millisecond latency.” When the milk inventory runs low at one store, the system could be used to immediately check nearby locations and redirect online orders to stores with available stock.
The Future of Inventory Management
The complexity of modern retail extends far beyond simply tracking items on shelves. Today’s inventory management systems must seamlessly orchestrate a symphony of real-time data streams, predictive algorithms, and intelligent automation. When a customer orders milk for delivery, they’re interacting with multiple layers of sophisticated technology: systems that track physical stock, monitor for losses, predict demand patterns, and coordinate fulfillment across channels.
While perfect inventory accuracy remains an aspiring goal, retailers who combine real-time monitoring, predictive analytics, and intelligent buffer management are dramatically reducing out-of-stock frustrations and reshaping the shopping experience. As artificial intelligence and IoT technologies continue to evolve, we’re moving closer to the dream of truly synchronized physical and digital inventory—where that gallon of milk you order online is always there when you need it.
The next time you successfully order milk online, remember the systems that made it possible—and if you’re still having trouble, try that after-hours ordering trick.
