Stock · 8 min · 2026-11-07
Stock deducted twice between Shopify and the ERP: why it happens and how to fix it
Shopify deducts stock on sale and the ERP deducts again on invoice. The cause is an unwritten rule: which system owns stock and which quantity flows.
Summary
What matters before moving forward.
- Stock drops twice when both systems deduct the same sale: Shopify when the order is placed and the ERP when the invoice or delivery note is issued.
- The fix starts with a decision: only one system is the source of real stock. The other shows a copy and never deducts on its own.
- Shopify separates available stock, stock committed to unshipped orders and unavailable stock. Sending the ERP's physical stock as available puts already sold items back on sale.
- Returns, cancelled orders and transfers between warehouses are where integrations usually drift.
- A daily comparison of stock between the two systems shows the problem the same day, instead of at the year end count.
How the same item drops twice
The scenario is common. The customer buys on Shopify and stock drops by one. The order goes to the ERP, where it is invoiced or shipped, and the ERP also deducts one. On the next sync, the ERP sends its stock to Shopify with the sale already deducted, but Shopify still holds the order as committed. The item ends up one unit lower than what is on the shelf.
A merchant described exactly this worry in the Shopify community: marking the order fulfilled deducts in Shopify, invoicing deducts in the back office system, and the same sale is subtracted twice. The question went unanswered, which says a lot about how many stores solve this by trial and error.
Rule 1: one system owns stock
In companies with an ERP, the source of real stock is usually the ERP: purchases, transfers and counts go in there. Shopify receives a copy and shows it in the store.
If the ERP is the source, Shopify should not correct quantities on its own or send adjustments back. Shopify sales reach the ERP as orders, and the ERP deducts and returns the new value.
Stores without an ERP, or with Shopify as the main system, do the opposite. What does not work is both systems writing to the same number.
Rule 2: send the right quantity
Shopify distinguishes stock states. Available is what can be sold. Committed is what is part of placed but unshipped orders. Unavailable is what is at the location but cannot be sold. On hand is the sum of the three.
The classic mistake is sending physical stock from the ERP and writing it as available in Shopify. Units already sold and still on the shelf go back on sale.
The integration has to know what the ERP considers reserved and send Shopify only what is truly free to sell, or write on hand stock and let Shopify calculate available. The rule is chosen once and always applied.
Where the numbers drift
Cancelled orders. Shopify restocks on cancellation if that option is chosen. If the ERP already received the order, it has to cancel it too, otherwise stock is deducted on one side and restored on the other.
Returns. A returned item should only go back into stock after inspection, and in one system only. Restocking in Shopify and the ERP at the same time duplicates the item.
Multiple locations. A poorly configured integration can write all stock to Shopify's main location, leaving others out of date. Each ERP warehouse has to map to a Shopify location.
Orders pending payment. An unpaid Multibanco reference commits stock in Shopify. If the ERP does not know about that order, it counts the item as free.
Detecting before the annual count
A daily comparison of each item and location's stock in both systems shows differences on the day they appear. With that day's sales history, the cause is usually obvious.
Start with the best selling items and the biggest differences. You do not need to fix everything at once; you need to know where it is failing.
How Vokzar aligns stock between Shopify and the ERP
We agree with you which system owns stock and which quantity flows between them, including the mapping between warehouses and locations.
We adjust the integration so cancellations, returns and pending orders are handled on one side only, and stock is written to the right location.
We leave a daily comparison with an alert when the difference passes a threshold, so no drift lasts more than a day.
Related next steps
Next steps.
Proof and validation
- Shopify's stock states come from the official help on inventory states.
- The double deduction case was described by a merchant in the Shopify community in May 2024.
- Which quantity to sync depends on how your ERP handles reservations and should be confirmed in the ERP itself.
Official documentation
Validated sources.
Technical strategy should be auditable. These sources link directly to the official documentation behind this guide.
Frequently asked questions
Common questions about this topic.
Why does stock drop twice?
Because Shopify deducts on sale and the ERP deducts again on invoicing or shipping, and then the sync writes the ERP value without accounting for orders still committed in Shopify.
Which system should own stock?
Usually the ERP, when there is one, because purchases, transfers and counts go there. What matters is that it is only one.
Which quantity should I send from the ERP to Shopify?
What is truly free to sell, or on hand stock with Shopify calculating available. Never on hand stock written as available.
How do I catch drift early?
With a daily comparison of stock by item and location in both systems, starting with the best selling items.

