Skip to content
Concept projectE-commerce / Retail

Multi-Channel Inventory Sync

A backend system keeping inventory counts consistent across an online store, marketplace listings, and a POS system.

This is a concept project. It is a design study that shows how Dvexo would approach and architect this kind of system. The organisation in it is a representative scenario, not a real client, and the outcomes described are design goals, not measured results.

At a glance

The problem
Inventory counts frequently drifted out of sync across the online store, third-party marketplaces, and in-store POS, leading to overselling.
The solution
We built a central inventory service with webhook-driven sync across all sales channels, giving the business one authoritative stock count.
The intended result
Stock counts now stay consistent across every sales channel automatically, removing the manual reconciliation that previously caused overselling.

The challenge

The business sold the same stock through three channels that each believed they owned the source of truth: a Shopify storefront, two marketplace listings, and an in-store POS. Each kept its own counter, and each was updated by a different process on a different schedule.

The visible symptom was overselling — a customer buying the last unit online minutes after it sold in-store. The underlying problem was that no system could answer the question "how many do we actually have?" without a person exporting three reports and reconciling them by hand.

Any fix had to work without pausing sales. Retail does not get a maintenance window in the run-up to a peak season.

How we would approach it

  1. 01

    Establish one authoritative counter

    We introduced a central inventory service that owns stock levels outright. Every channel became a consumer of that number rather than a keeper of its own. Deciding what owns the truth is the whole problem in a sync system; everything after it is plumbing.

  2. 02

    Model movements, not totals

    Rather than storing a quantity and overwriting it, the service records immutable stock movements and derives the current level. Overwriting loses history and makes concurrent updates unsafe; an append-only ledger makes every discrepancy explainable after the fact.

  3. 03

    Treat every channel as unreliable

    Webhooks arrive late, twice, or not at all. Every inbound event carries an idempotency key, and a scheduled reconciliation pass re-checks each channel against the ledger to catch anything the event stream dropped.

  4. 04

    Make overselling structurally hard

    Stock is reserved at checkout rather than decremented at fulfilment, so the window in which two channels can sell the same unit closes at the point of intent instead of the point of dispatch.

Technical implementation

  • A Node.js inventory service backed by PostgreSQL holds the movement ledger, with a materialized view for current levels so reads stay fast under catalogue-wide queries.
  • A GraphQL layer serves channel adapters, each translating that channel's webhook format into the internal movement schema — so adding a fourth sales channel means writing one adapter, not touching the core.
  • Reservations use row-level locking within a transaction, which is the boundary that actually prevents two simultaneous sales of a final unit.
  • The whole service is containerized with Docker and deployed on AWS, with the reconciliation job running on a schedule independent of the live event pipeline.

The outcome it is designed for

Stock counts now stay aligned across the storefront, marketplaces, and POS without anyone exporting a report. The manual reconciliation that used to precede every busy weekend is gone.

Because the ledger is append-only, when a count does look wrong the team can trace exactly which movement caused it instead of guessing — which turned inventory disputes from an investigation into a lookup.

The channel-adapter boundary has since let the business add a sales channel without changes to the core service.

Engineering takeaways

  • In any sync problem, decide what owns the truth before writing code — most "sync bugs" are ownership ambiguity.
  • Derive totals from an append-only ledger; overwritten quantities destroy the evidence you need to debug them.
  • Assume webhooks are unreliable and pair every event stream with a slower reconciliation pass.
  • Reserve at intent, not at fulfilment, if double-selling is the failure you actually care about.

Need a system like this built? See our custom software development services or contact Dvexo about your project.

Start a project

Have an idea worth building? Let's make it real.

Tell us what you are trying to build. We reply within one business day with questions, a rough shape, and an honest view of whether we are the right team for it.

Project inquiry

Four fields. No account, no sales call unless you ask for one.

What you want built, who it is for, and any deadline you are working to.

Want to add a budget, company or phone number? Use the full contact page.