Architecture Blueprint & Reference Implementation
Multi-channel inventory synchronisation
Retail / wholesale operations
Overview
A technical reference architecture from Palmate Solutions detailing how to approach inventory synchronisation when a storefront, a warehouse tool, and a marketplace all need a shareable, reliable stock ledger.
Business problem
Stock was updated in three places: the website admin, a warehouse spreadsheet, and a marketplace seller central. Oversells appeared during promotions. Refunds and support load followed, but nobody could point to a single stock ledger.
Technical challenge
Each channel has a different idea of ‘available’: website available-to-sell, warehouse physical count, marketplace fulfilment lag. A naive two-way sync creates loops. Partial failures (marketplace rate limits, webhook retries) can resurrect old quantities.
Requirements
- One system is the stock authority for on-hand quantity
- Storefront and marketplace receive reserved/available figures, not a blind copy of warehouse count
- Order events decrement reservations immediately; receipts increment only after confirmation
- Operators can see sync lag and poisoned messages
- Idempotent webhooks so duplicate order events do not double-decrement
Solution
Introduce a small integration service that owns mappings and reservations. WooCommerce and the marketplace are clients of that service. The warehouse system remains the authority for physical stock. The service exposes an internal API for available-to-promise and consumes order/refund webhooks.
Architecture
01
Stock authority
Warehouse receipts and adjustments write to the inventory service. The website never writes on-hand quantity directly except through that API.
02
Reservation layer
When a checkout starts or a marketplace order is acknowledged, a reservation is held. Expiry and payment-failure paths release it.
03
Outbound adapters
Channel-specific workers push available quantities. They honour rate limits and store last-successful timestamps.
04
Observability
A queue lag gauge and a dead-letter table. Operators replay a message after fixing mapping errors — they do not ‘run the spreadsheet again’.
Technology stack
- Node.js integration service
- PostgreSQL
- Redis or equivalent for short-lived reservations
- WooCommerce REST + webhooks
- Marketplace official APIs
- Docker Compose
Implementation approach
- Map SKUs and packs (1 box = 6 units) before writing any sync code
- Implement inbound order webhooks with idempotency keys
- Ship a read-only available-to-promise endpoint and verify it against a week of historical orders
- Turn on outbound marketplace updates for a subset of SKUs
- Add alerting on lag and on persistent 4xx mapping errors
Outcome
In production, success looks like eliminating oversells, measurable sub-second sync lag, and an operator who can verify status without opening disparate vendor panels.
Related articles
Related tools
Related services
Next step
Discuss a similar architecture
If this pattern matches a system you run, bring your current tools and operational bottlenecks. We will evaluate how to design, deliver, and operate a tailored architecture for your team.
