Which system owns each piece of data
The first decision is organizational, and it comes before any talk of connectors. For every type of data you need to settle which system creates it and which one receives it: catalog, prices and price lists, stock per warehouse, orders, customers and B2B companies, invoices. When two systems write the same data, the last write wins, and the mismatch usually shows up days later, when someone compares store stock with the warehouse.
This is a common split for stores that already run an ERP. The most frequent exceptions are a warehouse management system (WMS) or a third-party logistics provider separate from the ERP, which then owns stock, and data that only lives in Shopify.
- Base catalog, SKUs and product attributes: ERP to Shopify.
- Prices and price lists, including B2B customer pricing: ERP to Shopify.
- Stock per warehouse: ERP or WMS to Shopify.
- Orders, customers, cancellations and refunds: Shopify to ERP.
- Marketing copy, images, product metafields and collections: Shopify only.
Integration options and what decides between them
There are four ways to connect the two systems, and nearly all of them rely on the same Shopify building blocks: the GraphQL Admin API to read and write data, and webhooks to hear about changes.
What decides between them is how well each fits your data map. Ask any connector or vendor which data it syncs and in which direction, how often, what it does with a SKU that doesn't exist on the other side, where it logs errors, which API version it uses and who keeps it updated.
For a custom build, Shopify lets you create a custom app built exclusively for your store that accesses its data through the APIs. Every GraphQL Admin API request carries an access token, and the documentation asks you to request only the data access the app needs: a stock and orders integration has no reason to read the store's themes, for example.
- App Store connector: a ready-made app for a specific ERP. Quick to set up; its limit is what it knows how to map.
- Middleware or iPaaS: a service that translates between the two systems, with configurable flows and transformations.
- Shopify Flow: useful for alerts and one-off pushes to another system. It falls short for a full two-way sync, as our Shopify Flow guide explains.
- Custom development: a bespoke app that uses the Admin API and webhooks with your exact business logic.
Stock: Shopify's inventory quantity model
Shopify doesn't store a single stock number per variant. Each item has quantities in several states at each location. on_hand is what is physically stocked at a location and equals the sum of available, committed, reserved, damaged, safety_stock and quality_control. incoming is stock on its way, which Shopify doesn't count as on hand.
committed is managed by Shopify through actions such as creating and fulfilling orders, reserving inventory on draft orders, and marking transfers or shipments as ready to ship. The GraphQL Admin API can't adjust or move it. Here is what an integration can write: inventorySetQuantities sets the available or on_hand quantity; inventoryAdjustQuantities increments or decrements available, damaged, incoming, quality_control, reserved or safety_stock; inventoryMoveQuantities moves units between those states.
This is where many syncs break. If the ERP sends its available stock and the integration writes it to available, it can overwrite units Shopify already holds as committed for orders the ERP hasn't received yet, and the store offers units that are already sold. Agree on which ERP figure maps to which Shopify state: if the ERP sends physical units, that matches on_hand and Shopify keeps deducting what is committed; if it sends an available figure that already subtracts pending orders, check that those orders aren't deducted twice.
To avoid writing over a number that changed between the read and the write, the mutations accept changeFromQuantity, the last known quantity at that location. If it doesn't match the current one, the mutation fails with a CHANGE_FROM_QUANTITY_STALE error and the integration has to read again. Shopify recommends using this check and only suggests opting out, by passing null, when your system is the source of truth and Shopify's current quantity doesn't matter.
These mutations also take an idempotency key through the @idempotent directive, available as of API version 2026-01 and required as of 2026-04. It protects against duplicate adjustments caused by race conditions or network failures: if a request is retried, the adjustment isn't applied twice.
With several warehouses, stock is synced per location, not as a total: Shopify quantities always belong to an item at a specific location. Our guide to inventory across multiple locations explains how they are set up in the store.
- on_hand: physical units at the location.
- available: what is left to sell.
- committed: held by orders and reservations; only Shopify changes it.
- reserved: on hold for a customer.
- damaged: can't be sold due to damage.
- safety_stock: set aside to cover swings in demand.
- quality_control: under quality inspection.
- incoming: on its way; not counted as on hand.
Orders: webhooks and what Shopify doesn't guarantee
Webhooks are notifications Shopify sends to your system when something happens in the store, such as a new order, a cancellation or a refund, so you don't have to keep polling the API. They are the normal way to push orders to the ERP, but Shopify's documentation sets three limits to design for from the start: it doesn't guarantee ordering within a topic or across topics for the same resource, delivery isn't always guaranteed, and the same webhook can arrive more than once.
The timings are published too. Shopify expects a 200 OK, with a one-second connection timeout and five seconds for the whole request; otherwise the delivery fails. It retries up to eight times over four hours and, if failures persist, removes the subscription, which receives nothing until it is created again.
When to send the order to the ERP is a business decision: on creation, on payment or on fulfillment. Whichever you choose, cancellations and partial refunds need to arrive as their own transactions, not as a silent edit to the order, so invoicing and the warehouse match what the customer sees.
At Weblineo we have worked only with Shopify since 2016 and we are a Shopify Plus Partner; we build these integrations as part of our Shopify development service; if the store sells to businesses, our Shopify B2B service also covers catalogs and customer-specific pricing.
- Respond right away and process later: the documentation suggests a queue to stay within five seconds.
- Verify the signature: the X-Shopify-Hmac-SHA256 header carries a base64 HMAC-SHA256 of the raw body, computed with the app's client secret.
- Drop duplicates using X-Shopify-Webhook-Id. X-Shopify-Event-Id groups deliveries that come from the same action in the store.
- Don't trust arrival order: before overwriting, compare the resource's last update time with what the ERP already has, or re-read the order from the API.
- Make the ERP write idempotent: the same order must never be created twice, even if the notification repeats.
Initial load and periodic reconciliation
Because webhook delivery isn't guaranteed, the documentation itself recommends reconciliation jobs that periodically fetch changed data from Shopify. Many GraphQL queries support updated_at filters, so you only need to request what changed since the last run.
For large volumes, such as the initial catalog load or a full reconciliation, there are bulk operations. Shopify runs the query on its side and returns a JSONL file, with one JSON object per line and child nodes on separate lines linked by __parentId. Since API version 2026-01, an app can have up to five bulk queries running at once on the same store. The bulk query execution itself doesn't count toward rate limits; the requests you make to start it and check its status do. The result URL expires after one week.
Outside bulk operations, the GraphQL Admin API limits requests by the calculated cost of each query, counted in points, and Shopify states that the limit depends on the plan. Rather than assuming a number, the integration should read extensions.cost in every response, with requestedQueryCost, actualQueryCost and throttleStatus (maximumAvailable, currentlyAvailable and restoreRate), and slow down before it hits a THROTTLED error.
- Stock per SKU and location in both systems.
- Shopify orders missing from the ERP, and the other way around.
- Prices or price lists that differ between the ERP and the store.
- ERP products with no Shopify variant, and Shopify variants with no ERP match.
Errors, alerts and API versions
Every error needs to stay visible. Set up a queue that collects sync failures (references that exist on only one side, orders the ERP won't accept, middleware that stops responding), with a retry rule for each type and someone on the team who gets the alert. If the only symptom is someone spotting a mismatch at month end, the integration isn't finished.
The API changes too. Shopify releases a new version every three months, on the first day of each quarter, with date-based names such as 2026-04, and each stable version is supported for at least 12 months. If an integration requests a version that is no longer accessible, Shopify serves the request with the oldest stable version still available, and the X-Shopify-API-Version header shows which one was used. That jump can change behavior without anyone touching the code, so pin the version and review it every quarter.
Before connecting the live store, test on a development store: test orders, cancellations, partial refunds, an unknown SKU and a simulated ERP outage.
Checklist before choosing a connector or a custom build
It works the same for an App Store app, a middleware platform or a custom proposal. Wherever an answer is vague is exactly where the integration will fail. For B2B stores, also review companies, catalogs and customer pricing with our Shopify B2B guide.
If you need someone to build or audit it, Weblineo does this through our Shopify development and Shopify B2B services, always working from the platform's official documentation.
- A data map showing which system owns each piece of data and which way it flows, signed off by operations and by whoever runs the ERP.
- Unique, complete SKUs in both systems before the initial load.
- Which inventory state it writes (available or on_hand) and whether it uses changeFromQuantity.
- Idempotency keys on inventory adjustments and on order creation in the ERP.
- HMAC verification, deduplication by X-Shopify-Webhook-Id and handling of arrival order.
- Periodic reconciliation and bulk operations for large volumes.
- Error logging, retries and alerts to a person.
- Which API version it uses, who updates it and how often.
Frequently asked questions
Is stock sync between Shopify and the ERP real time?
It depends on how it is built. Webhooks report Shopify changes without polling the API, but they don't guarantee order or delivery, and stock coming from the ERP arrives as often as the connector sends it. That is why it is paired with periodic reconciliation.
What happens if the ERP misses a webhook?
Shopify allows five seconds to respond and retries up to eight times over four hours. If failures persist, it removes the subscription. A reconciliation job that reads what changed since the last run recovers anything that was missed.
Should I use an App Store app or a custom build?
If a connector covers your data map, handles errors and keeps its API version current, it is usually the most direct route. Custom development makes sense when your business logic doesn't fit what the connector can map.
Is stock synced per warehouse or as a total?
Per warehouse. In Shopify, inventory quantities belong to an item at a specific location, so each ERP warehouse needs to map to a location in the store.
