← Lessons

quiz vs the machine

Gold1480

System Design

Inventory Sync Across Channels

Keeping one stock count consistent across web, app, and stores.

5 min read · core · beat Gold to climb

The multi channel problem

The same product sells on your website, your app, a marketplace, and in physical stores. If each channel keeps its own count, you will oversell when channels disagree.

Approaches

  • Single source of truth: one inventory service owns counts and every channel reads and writes through it.
  • Event driven sync: each sale emits an event and other channels update from a shared stream.
  • Allocation per channel: reserve a slice of stock to each channel to bound overselling risk.

Latency and conflict

  • Marketplaces may only accept periodic feeds, so accept some lag and add a safety buffer.
  • Resolve conflicts with a clear authority and a reconciliation pass.
  • Prefer pushing updates promptly over slow polling to shrink the stale window.

Key idea

Avoid cross channel oversell by funneling every channel through one inventory source of truth, syncing changes promptly with events, and buffering for channels that only accept periodic feeds.

Check yourself

Answer to earn rating on the learn ladder.

1. What causes cross channel oversell?

2. Why add a safety buffer for marketplace feeds?