By Hextara team · Published · Last reviewed
An online store rarely stands alone. Orders flow to accounting and fulfilment, stock levels come from a warehouse or ERP, and customer data goes to marketing tools. When these systems disagree, customers see the result as overselling or late shipments.
Name the source of truth
For each type of data decide which system owns it. Usually the warehouse or ERP owns stock, the store owns orders at the moment of purchase, and accounting owns invoices. Syncs then copy data one way from its owner.
Choose how fresh stock must be
- Real time or near real time for fast-moving or limited items.
- Every few minutes for typical catalogs.
- Daily only for slow-moving stock, accepting a risk of overselling.
Plan for the awkward cases
- Partial shipments and backorders.
- Cancellations and returns, which should add stock back only when physically received.
- Bundles and kits, whose availability depends on components.
- Multiple warehouses or channels sharing one pool of stock.
Build in safety
- Keep a small buffer for items that sell on several channels.
- Make updates idempotent so a repeated message does not double-adjust stock.
- Log every stock movement with its reason.
- Run a daily reconciliation that compares the systems and reports differences.
Mind the limits
Platforms and ERPs limit how many API calls you can make and how fast. Batch updates and use change feeds or webhooks where available, instead of polling everything.
Order of operations for a new order
- The store records the order and reserves the stock.
- Payment is confirmed by the provider and the order moves to paid.
- The order is sent to fulfilment and accounting with a reference that identifies it.
- Fulfilment reports the shipment, and the store notifies the customer.
- Accounting receives the invoice and the payment record.
What to monitor
- Orders that are paid but not yet sent to fulfilment after a set time.
- Stock counts that differ between systems beyond a small tolerance.
- API errors and rate-limit responses by system.
- The age of the oldest failed message waiting to be retried.
Plan the peak
Sales events multiply order volume and API calls at once. Test integrations with realistic volumes before a peak, check provider rate limits, and have a manual fallback for the minutes when a system is slow.
Start by mapping the order and stock flow on paper. Most integration problems become visible before any code is written.
