Skip to guide
Manamatha SarnakerOdoo ERP Consultant · Montreal

Commerce integrations

Diagnosing Shopify and Odoo stock mismatches

Before changing stock or replacing a connector, establish whether the two numbers describe the same thing. A useful diagnosis follows one product through its identifiers, locations, quantity rules and update history.

By Manamatha Sarnaker · Odoo, business systems and reporting

1. Capture one reproducible mismatch

Record the affected variant, the quantity on each side, the locations, timestamps and expected result. Save the Odoo version, connector release and configured Shopify API version. A screenshot taken after another sale can no longer be compared with an earlier export without understanding the intervening movement.

Begin with read-only inspection. Avoid sending a whole-catalogue stock update merely to see whether it fixes one mismatch. First identify the workflow owner and the effect that a correction would have on reservations, orders and other sales channels.

  • Which exact variant and inventory item are affected?
  • Which warehouse/location and quantity definition does each number use?
  • When was each number observed, and when did the connector last succeed?
  • Which system is intended to control the value in this workflow?

2. Match identity and location before comparing quantities

Shopify's InventoryLevel reference describes inventory for an inventory item at a specific location, with several quantity states. A product title or a parent product is too broad to establish that two inventory rows represent the same variant and location.

In the synthetic worksheet, variant V-101 maps to Odoo item DEMO-A at warehouse W-1 and Shopify location L-1. Another location, L-2, holds six units. The Odoo warehouse total of 18 therefore cannot be compared directly with the storefront's L-1 value of nine.

Synthetic location and quantity comparison for one variant
System / locationOn handReserved / committedComparable available
Odoo W-1 → Shopify L-11239
Odoo W-2 → Shopify L-2606
Odoo total across W-1 + W-218315
Shopify L-1 observation1239

3. Write down the quantity rule

For this teaching example only, comparable available units equal on-hand units minus reserved/committed units at the same location. The L-1 comparison is therefore nine versus nine: no discrepancy under that assumption. Comparing 18 with nine creates a false alarm by mixing both geography and quantity definitions.

Do not turn that simplified subtraction into a universal connector rule. Real setups can treat unavailability, incoming stock, fulfillment locations and sellable inventory differently. Shopify exposes named quantity states; inspect the definitions used by your configured connector and the relevant Odoo workflow. A SKU is useful for investigation but should not be assumed globally unique or sufficient as the integration key.

Synthetic check; no API calls or writes
W1 on hand = 12
W1 reserved = 3
Comparable W1 available = 12 - 3 = 9
Shopify L1 available = 9
Difference at matching location/state = 0
# Comparing Odoo total on hand (18) with L1 available (9) is invalid.

4. Follow the update history

Once identity, location and semantics agree, check the last successful synchronization and the intervening events. A queued update, failed request, new reservation or changed mapping can explain a real difference. Preserve the record IDs and timestamps needed to reproduce it, while excluding credentials and customer details from public examples.

Classify the failure before selecting a repair: wrong mapping, wrong quantity definition, delayed/failed delivery, or conflicting ownership. Test a bounded change with representative transactions, then re-read both systems after the expected synchronization interval. Also check whether a retry applies the same event twice or overwrites a later value; the implementation depends on the actual connector.

5. Leave a worksheet the next person can use

The downloadable CSV records the synthetic variant, location mapping, quantities, observation time and expected rule. Replace those values with an anonymized record from your own environment and include the connector/version details before asking for help.

A useful handover explains who owns the stock value, which identifiers and locations map together, how often synchronization runs, how failures are recognized and what evidence is needed before correcting stock. That is more actionable than simply reporting that the numbers matched once. Changes to live stock, returns or connector configuration should follow the team's normal review process.

Try the worked example.

Download the files below into one folder. Run python seo-worked-examples.py stock with Python 3.9 or newer. The script reads these local CSVs and prints its checks; it makes no network requests or system changes.

These small teaching datasets cannot validate a live ERP. Adapt the scope, controls and acceptance criteria to the actual records before relying on a report or migration decision.

How this connects to delivered work

The published Shopify case documents product/inventory mapping repairs, restored listings/stock/order flow and a handover explaining the integration logic. The connector name, exact offending mapping and transaction logs are not public. The example below is deliberately synthetic.

Technical references

Working through a similar question?

Describe your systems, the result you expect and what currently disagrees. Use anonymized examples and keep credentials and confidential exports out of the contact form.