Skip to content
Integrations October 20, 2026 · 6 min read

How to Prevent Inventory Sync Errors Between Shopify and Your ERP

Overselling and phantom stock almost always come from the same seven causes. What each looks like, and how to design it out of your integration.

Ezra Adler, Managing Director of ECommerce Partners

By Ezra Adler

Managing Director, ECommerce Partners

In brief

Shopify inventory goes out of sync with an ERP for seven reasons: batch windows, two systems writing the same figure, adjustments applied twice on retry, missed or out-of-order events, warehouses mapped to the wrong locations, mismatched units, and products sold by weight or length. The fix is the same shape for all of them: sync the right figure in real time with one system in charge, make every update safe to repeat, and reconcile daily so you find drift before a customer does. For KOL Foods, logging every stock change with its before and after value did more than any code fix.

For KOL Foods, whose AS400 system feeds their online store through our middleware, stock figures once started rising with no sale or adjustment to explain them. Tracing it took weeks, and the most useful change was not a code fix: we began logging every stock update with its before and after value. One mystery turned out to be a line in an adjustment file uploaded on the client's side. For another, the platform's own support team pointed to checkouts that were started but never finished.

Inventory errors between Shopify and an ERP almost always come from a short list of causes. This guide goes through each one, what it looks like, and how to design it out.

First, Know Which Number You Are Syncing

Shopify does not keep one stock number. It tracks several inventory states per location, including:

  • On hand: everything physically at the location.
  • Committed: units already allocated to orders that have not shipped.
  • Available: what can still be sold.
  • Unavailable states such as reserved, damaged, safety stock and quality control.
  • Incoming: stock on its way from a transfer.

ERPs have their own versions of these figures, and they rarely line up one to one. A common source of sync errors is sending the ERP's figure into the wrong Shopify state. The classic case: the ERP subtracts open orders to give its "available" number, the integration sends that as Shopify's available, and Shopify subtracts the same open orders again. The site then shows less stock than exists, and every order makes it worse until the next full sync. The same thing happens when a warehouse system sends its reduced figure back to Shopify before the order has shipped.

Agree the mapping explicitly. Usually the ERP or warehouse owns on hand, and Shopify works out available from its own committed orders.

The Seven Causes, and How to Prevent Each

1. Batch windows

What happens: Stock syncs every hour or overnight. A fast-selling item sells out in the warehouse between syncs and keeps selling online.

Prevention: Send changes as they happen, triggered by the stock movement, rather than on a timer. Keep a periodic full sync as a safety net, not as the main mechanism.

2. Two systems writing the same number

What happens: The ERP sets stock to 40. A moment later a warehouse app sets it to 38 based on an older reading. The last write wins, and it is wrong.

Prevention: One system owns stock, as set out in our data ownership map. Where updates can collide, use Shopify's compare-and-swap option: when setting a quantity, the integration states the quantity it expects to find, and Shopify rejects the change if another process got there first.

3. The same adjustment applied twice

What happens: The integration sends "reduce by 5", the response times out, and it retries. Both requests succeed, and stock drops by 10.

Prevention: Make every adjustment safe to repeat. Shopify now requires an idempotency key, a unique token per request, on inventory adjustments from API version 2026-04, so a retried request is recognised and applied only once. Integrations built before that change should be checked.

4. Missed or out-of-order events

What happens: Shopify's notifications of orders and changes can arrive twice, late, or out of order, and occasionally not at all. Shopify's own guidance is not to rely on them alone.

Prevention: Handle duplicates, use each event's timestamp rather than its arrival order, and run a reconciliation job that compares the two systems on a schedule and corrects drift.

5. Locations that do not match

What happens: The ERP has five warehouses, Shopify has three locations, and stock from a warehouse that does not ship online is being counted as sellable.

Prevention: Map every ERP warehouse to a Shopify location, or explicitly to none. Decide how stock at locations that do not ship online is handled.

6. Units that do not match

What happens: The ERP counts cases of 12, the website sells single units, or the reverse. Common in B2B, where the same product is sold by the each, the case and the pallet.

Prevention: Convert units in one place, in the integration, with the conversion defined per product. Kits and bundles need the same treatment: decide whether the kit or its components carry the stock. Give kits and bundles a test order of their own before launch: they are among the problems most likely to surface only once real orders arrive.

7. Products that are not counted in units at all

What happens: Some products are sold by weight or length, and the ERP's figure does not translate directly into sellable units. For KOL Foods, where products are priced by the pound, this needed a custom app and real-time pricing from their AS400 system through our ECX middleware.

Prevention: Design these products specifically. They do not fit a standard connector, and forcing them to is a reliable source of errors.

Buffers Are a Symptom, Not a Fix

A safety buffer hides a sync problem rather than fixing it, and the bigger the buffer you need, the bigger the problem underneath.

Many businesses hold back a few units per product so the site shows slightly less than the warehouse has. It reduces overselling, and it also hides stock you could sell. Shopify has a dedicated safety stock state for this if you need it. But if you need a large buffer to stay safe, the sync itself is the problem, and fixing the causes above is worth more than a bigger buffer.

Monitoring: Find Drift Before Customers Do

Drift will happen; the question is whether you find it or a customer does, and that comes down to five habits.

  • Reconcile daily at minimum. Compare stock per SKU and location between the systems, and correct or flag differences. KOL Foods gets a report every morning listing each SKU where the website and the warehouse disagree.
  • Alert on failures, not just log them. A failed update that nobody sees is how drift goes unnoticed for weeks. Platforms give up on failing webhooks too, so alert when an expected one stops arriving.
  • Keep logs long enough to investigate. Two weeks of history was not enough to trace a discrepancy the client noticed a month later. Keep stock change logs for at least a quarter.
  • Track overselling. Count orders that could not be fulfilled because stock was not there. It is the clearest measure of sync health.
  • Watch sync delay. If updates normally land in seconds and start taking minutes, find out why before it becomes hours.

This is part of the wider design covered in our Shopify ERP integration guide, and our comparison of connectors, integration platforms and custom middleware covers which approaches handle these cases well.

Stock That Does Not Add Up?

Tell us your ERP, your warehouses and where the numbers go wrong. We will find which of these causes you have and how to design them out. Talk to us directly.

Frequently Asked Questions

Why is my Shopify inventory out of sync with my ERP?

The usual causes are batch syncs that leave gaps, two systems writing the same stock figure, adjustments applied twice on retry, missed or out-of-order events, ERP warehouses mapped wrongly to Shopify locations, mismatched units of measure, and syncing the wrong inventory state, such as sending a figure that already subtracts open orders.

How do I stop overselling on Shopify?

Sync stock changes in real time rather than in batches, let one system own the on-hand figure, protect adjustments against being applied twice, and reconcile the systems daily. A small safety stock buffer can help, but a large one usually means the sync itself needs fixing.

What is the difference between on hand and available in Shopify?

On hand is all stock physically at a location. Available is what can still be sold: on hand minus stock committed to unfulfilled orders and stock held in unavailable states such as reserved, damaged or safety stock.

How often should Shopify inventory sync with an ERP?

Stock changes should be sent as they happen, triggered by the movement itself. A scheduled full reconciliation, at least daily, should run alongside it to catch anything missed.

How do I prevent duplicate inventory adjustments?

Make adjustments safe to repeat. Shopify requires an idempotency key on inventory adjustments from API version 2026-04, so a retried request is applied only once. Where two processes might update the same item, use Shopify's compare-and-swap option so a stale update is rejected.

Free Consultation

Stock that does not add up?

Tell us your ERP, your warehouses and where the numbers go wrong. We will find which causes you have and how to design them out.

Talk to Us