Assign a source for every field
Decide where prices, descriptions, photographs and stock are edited. Inventory may own available quantity while the storefront owns presentation, but this is not a universal rule. Agree product and variant identifiers, units, multiple locations and reservations. Define whether “in stock” means physical stock or quantity after reservations.
Design for retries and delays
Networks and external systems can fail temporarily. Exchanges need logs, retry handling and stable operation identifiers so a repeated request does not create a second document. Full exports support reconciliation; changes support faster updates. Choose frequency according to load and overselling risk rather than an unsupported “real-time” claim.
Test conflicting operations
Exercise simultaneous purchases of the last item, cancellation, returns and manual inventory adjustments. Provide alerts for prolonged failures and a clear reconciliation procedure. Do not present stale stock as guaranteed current when exchange stops; agree the store’s fallback behaviour beforehand.
- Each field has an identified owner.
- Reservations and available quantity are defined.
- Retries do not duplicate documents.
- Logs, alerts and reconciliation are available.
Project questions
Does inventory need to synchronise every second?
Not for every store. Frequency depends on turnover, API limits and acceptable delay. Predictable failure handling and correct reconciliation matter more.