Reconciling Inventory Systems with Cart Transactions
Let's go deeper into meeting customer expectations. Generally, online shoppers are incredibly demanding. If they have even one bad experience, they're often willing to leave a negative review or even defect to another site.
A common risk occurs when multiple customers try to access the same goods on the same site at the same time. Discovering at checkout that items are out of stock can be jarring and frustrating.
So, we need to outline strategies for handling contention among concurrent shoppers.
To begin, companies often rely on a single system as the source of truth for inventory, whether it's the Enterprise Resource Planning (ERP), inventory management system, or even the e-commerce platform itself.
With our inventory, let's explore a plain-vanilla setup with multiple shopping carts. We'll have two customers trying to add the same item to their carts, as shown in the diagram below:

Product pages typically warn customers when inventory is low. However, customers can usually still add the item to their cart.
One way to prevent a bad experience is to warn them in the cart interface that other shoppers have added the item. If another shopper buys the item, they will already have received fair warning.

Be careful with this. Send too many alerts, and you'll quickly annoy your customers. They're already buried in streams of offers, discount codes, mailing lists, and advertisements.
More importantly, respecting their privacy is essential. Even if you're not subject to specific privacy laws, merchants should never violate the privacy of their shoppers – even if they haven't checked out yet.
In any event, if we're careful about alerting, we've vastly improved our user experience.
Let's shake things up by adding another sales channel – an external online marketplace. Among the many things we need, we must synchronize inventory across both channels.

E-commerce integration is inherently complex, and we'll explore it later. For now, what matters is that we have one physical item available for purchase across two different channels.
Let's try adding the same item to two different carts, each on a different channel:

Cart A2 adds the item. Then Cart A1 also adds the item – along with plenty of other products. Meanwhile, on our new sales channel, both Cart B1 and Cart B2 add the item, as well.
Cart A2 completes the transaction and wins the race. If we're doing it right, our alerting system will notify Cart A1 that the item is no longer available for sale.

Meanwhile, the external marketplace has carts with an item that simply does not exist in reality.

The obvious risk now with our Online Marketplace is overselling – allowing users to place orders that cannot be fulfilled. There are several textbook strategies for managing cross-channel inventory:
- Faster/more frequent synchronization with inventory system
- Marketplace-specific allocations
- Inventory buffers ("sell 95 of 100")
The challenge, however, is that online marketplaces are usually walled gardens. Cart B1 and B2 are effectively invisible to us. Our system-to-system exchanges are mostly via API calls, flat files, and inventory feeds.
Inventory counts are synced with the online marketplace based on the single source of truth. However, the marketplace controls our cart behavior.
So, for the fine-tuned control we want over our reservation policies and alerting, our strongest point of control is our e-commerce platform.
Here, we fully own the storefront experience. Whether delivered through SaaS, headless, or a custom platform, this option offers the most control.