Articles

Automation 8 min read

Shopify ERP integration: what to sync, which way, and how to build it

What to sync in a Shopify ERP integration and which way, the mistakes behind overselling and duplicate orders, and when to use an app, an iPaaS or custom code.

André Valle Ortega Founder, Flouvia

A Shopify ERP integration isn’t just connecting two systems: it’s deciding which one owns each piece of data, which way it moves and what happens when something breaks. This guide covers what gets synced and in which direction, the Shopify API rules that shape the design, the most common mistakes, and when an app, an integration platform or custom code is the right call.

Before you connect anything: who owns each piece of data

The root problem is rarely technical: if two systems can edit the same field, sooner or later they disagree. Every piece of data needs an owner:

  • The ERP owns the books: stock, costs, price lists, credit and invoicing.
  • Shopify owns what the customer sees: photos, descriptions, collections and the order at the moment it’s paid.
  • Shared records are split by field. A product can keep its SKU and price in the ERP and its description in Shopify; each system writes only its own fields.

That ownership map is the first deliverable of an integration done right.

Who owns each piece of data, and which way it moves

ERP Owns the books Stock · Costs · Price lists · Credit · Invoicing
Shopify Owns what the customer sees Photos · Descriptions · Collections · The order at payment
  1. Products and variants ERP Shopify SKU, unit, weight and base price; content stays in Shopify
  2. Inventory ERP Shopify Per location
  3. B2B price lists ERP Shopify Catalogs per company
  4. Orders, cancellations and refunds ERP Shopify By webhook
  5. Customers ERP Shopify Retail into the ERP; B2B companies into Shopify
  6. Shipments and tracking ERP Shopify From the ERP or WMS, on fulfillment
  7. Invoices and CFDI ERP Outside Shopify
Each piece of data leaves its owner and travels one way. Customers depend on the type of customer, and invoices never go through Shopify.

What a Shopify ERP integration syncs, and which way

These flows show up in almost every project, with their usual direction; if you flip one, do it on purpose.

DataDirectionCadence
Products and variantsERP → Shopify; content stays in ShopifyBatched
InventoryERP → Shopify, per locationNear real time
B2B price listsERP → ShopifyBatched
Orders, cancellations and refundsShopify → ERPReal time
CustomersRetail: Shopify → ERP. B2B companies: ERP → ShopifyOn create or change
Shipments and trackingERP or WMS → ShopifyOn fulfillment
Invoices and CFDIOutside Shopify: ERP or invoicing systemPer order, or in Mexico’s global CFDI

Products

The ERP owns SKU, unit, weight and base price; Shopify owns the content. The Admin API offers productSet, a mutation built to sync a product and its variants from an external source in a single call. Store the ERP’s ID in a metafield so you can reconcile even if a SKU changes.

Inventory

Shopify splits stock into states: on_hand (what’s physically at the location), available (what can be sold) and committed (units held by orders that haven’t shipped), which Shopify manages itself. The rule: the ERP’s physical count goes to on_hand and its available figure to available. Send an available number that already nets out store orders as if it were on hand, and Shopify subtracts committed units again—you count them twice. We go deeper in how to automate your inventory.

B2B pricing

In Shopify, your ERP’s per-customer or per-segment price lists become catalogs for your companies and their locations, with price lists that support fixed prices or percentage adjustments, quantity rules and volume pricing. On Basic, Grow and Advanced you get up to three active catalogs across your B2B markets; on Shopify Plus there’s no cap, and catalogs can be assigned directly to each company or location. If your ERP keeps a list per customer, that weighs on your plan.

Orders

This is the flow that hurts most when it breaks. Orders, cancellations and refunds reach the ERP by webhook (orders/create or orders/paid, depending on when you want them). The non-negotiable part: the ERP stores the Shopify order ID and refuses a second order with the same one; otherwise every retry is a duplicate.

Invoices and Mexico’s CFDI

If you sell in Mexico, the CFDI for a Shopify sale is issued by your ERP, your invoicing system or an app, and a SAT-authorized provider certifies it. There are two paths: an invoice in the customer’s name, and the global CFDI, which groups sales to the general public and, per the SAT’s filling guide, is due no later than 24 hours after the close of the operations it covers.

Real time or batch: each type of data has its own pace

“Everything in real time” is rarely right; each type of data should move at the pace its risk calls for:

  • Event-driven: orders, cancellations, refunds and inventory for low-stock items. Shopify announces them through webhooks to an HTTPS endpoint, Google Cloud Pub/Sub or Amazon EventBridge.
  • Batched: catalog and price lists, which change because someone decided so, not because of a sale.

And always, reconciliation: Shopify’s documentation warns that webhook delivery isn’t guaranteed and recommends periodic jobs that fetch whatever changed. A lost webhook with no reconciliation is an order that never reached your warehouse.

A day of syncing · illustrative

00:0006:0012:0018:0024:00

Event-driven

Orders Webhook, real time

Lost webhook · 13:42

Cancellations and refunds Webhook, real time

Inventory Near real time

Batched

Catalog and pricing When someone decides

Reconciliation Periodic job

Reconciliation picks it up · 15:00

An illustrative day: what’s urgent travels by event, and what someone decides travels in batches. The webhook lost at 13:42 is picked up by the 15:00 reconciliation.

The Shopify API rules that shape the design

Shopify’s documentation sets these conditions:

  • GraphQL is the way forward. The REST Admin API has been legacy since October 1, 2024, and since April 1, 2025 every new public app must use only the GraphQL Admin API.
  • Limits are measured in cost. Each query costs points based on the fields it requests, and each app gets a budget per store: 100 points per second on standard plans, 200 on Advanced and 1,000 on Shopify Plus. A sync that ignores this stalls right at peak sales.
  • Bulk operations for volume. Initial loads and reconciliation runs go through bulkOperationRunQuery and bulkOperationRunMutation, which run in the background, return a JSONL file and report back through the bulk_operations/finish webhook. Since API version 2026-01, each app can run up to five bulk queries per store at once.
  • Inventory with concurrency control. inventorySetQuantities takes the quantity you last read in changeFromQuantity and fails if someone changed it meanwhile. Since 2026-04 it also requires an idempotency key (@idempotent), so a retry can’t apply the same change twice.
  • Webhooks with strict rules. Your endpoint has five seconds to respond; on failure, Shopify retries up to eight times over four hours and, if failures continue, removes the subscription. X-Shopify-Webhook-Id lets you drop duplicates, X-Shopify-Triggered-At lets you order events and X-Shopify-Hmac-SHA256 lets you verify the signature.
  • Quarterly versions. Each API version is supported for at least twelve months, so any integration, bought or built, needs an update at least once a year.
ERP SalesPurchasingInventoryAccounting
Items · TAL-4120

Description

Hammer drill 1/2 in 850 W

Code

TAL-4120

Unit

PC

Weight

2.1 kg

Base price

$2,349.00

Stock by warehouse

WarehousePhysicalReservedAvailable
Guadalajara Centro48642
Monterrey Norte20020
M Search AR

Hammer drill 1/2 in 850 W

Inventory SKU TAL-4120

Managed by the ERP: read-only

LocationCommittedAvailableOn hand
Guadalajara Centro64248
Monterrey Norte02020
Integration log TAL-4120
12:04:31 orders/paid Order #1047 · 2 × TAL-4120 · Webhook-Id 7f3c…a91 Received
12:04:31 ERP Order 1047 created with its Shopify ID Recorded
12:04:36 orders/paid Order #1047 · same Webhook-Id 7f3c…a91 Duplicate
12:10:00 ERP Counter sale · 4 × TAL-4120 · physical 52 → 48 Read
12:10:02 inventorySetQuantities on_hand 48 · changeFromQuantity 52 · @idempotent inv-4120-0c8e Applied
12:10:09 inventorySetQuantities Retry · same key inv-4120-0c8e No change
The same SKU in the ERP and in Shopify, with the same numbers. The log drops the duplicate webhook, and the retry with the same key doesn’t apply the adjustment twice.

The mistakes that keep showing up

  • Two sources of truth. Someone fixes a price in Shopify “just for now,” and the next sync overwrites it. Whatever belongs to the ERP is read-only in Shopify.
  • Overselling. It comes from the lag between a sale on another channel and the store, from mixing up on-hand and available, or from items down to one or two units at a sales peak. For those, the safety_stock state holds units back from available without removing them from on hand.
  • Duplicate orders. A webhook delivered twice, or a timeout after the ERP recorded the order, creates a second one if the ERP doesn’t recognize the Shopify ID.
  • Retries without idempotency. A +10 adjustment applied three times adds thirty. Inventory travels as absolute quantities with concurrency control, or as adjustments with an idempotency key.
  • Out-of-order events and silent failures. A cancellation processed before its order leaves a live order in the ERP that was already cancelled. Sort by event timestamp and send every failure to a queue someone reviews.
An integration proves itself the day something fails, not the day everything works.

Store first, notify second, and give every step a stable key: it’s the pattern behind our own contact flow, written up in why we took Make out of our own site.

App, iPaaS or custom integration: when each one makes sense

None is better in the abstract; each one buys you something different.

An App Store connector

An app that already talks to your ERP. Some ERP vendors publish their own: Microsoft for Dynamics 365 Business Central, and Oracle NetSuite, whose NetSuite ERP Connector syncs products, pricing, inventory, orders and fulfillment. It fits if your operation fits its model: whatever it can’t be configured to do, it won’t do.

An integration platform (iPaaS)

A middle layer with prebuilt flows, an editor, monitoring and retries; Celigo, for instance, offers a ready-made Shopify–NetSuite integration. It fits if you connect several systems and have someone to run it. The price: the subscription, and your logic living on someone else’s platform.

A custom integration

A service of your own, with your ownership map, rules and exceptions in code, plus tests, a log of every message and alerts. It fits if the rules are yours: per-customer price lists, several warehouses, B2B on credit, an on-premise ERP with no modern API, or a volume where every retry counts.

ConnectoriPaaSCustom
Control over the rulesWhatever its settings allowHigh, within the platformFull
Maintenance costLow: the subscriptionMedium: the subscription plus someone to run the flowsThe team that maintains the code
LatencyThe connector’sEvent-driven or batchedWhatever you design for each type of data
Main riskYour operation doesn’t fit its modelCritical logic outside your repositoryBuilding it without tests or monitoring

What changes with your ERP

  • Microsoft Dynamics 365 Business Central: ships with Microsoft’s own Shopify connector, preinstalled on new sign-ups: products, inventory across locations, customers, B2B companies and orders.
  • NetSuite: Oracle NetSuite’s connector, integrations such as Celigo’s and, for the rest, SuiteTalk, its REST and SOAP web services.
  • SAP Business One: the Service Layer, a REST API over HTTP and OData that speaks JSON, is the natural base for a custom integration.
  • Odoo: since version 19, the external API is JSON-2; XML-RPC and JSON-RPC are deprecated and go away in Odoo 22 (fall 2028), and earlier on Odoo Online, where external API access is limited to the Custom plan.
  • Aspel and CONTPAQi: check with your reseller which version you run, where it’s installed and what interface it offers to other systems. That decides whether an existing tool is enough or you need a bridge service.

At Flouvia we design and build custom integrations on these principles: an ownership map, idempotency, reconciliation and alerts. If your ERP has a good connector and your operation fits it, that’s what we’ll recommend. For a second look at your integration map, get in touch.

Frequently asked questions

  • Do I need Shopify Plus to integrate my ERP?
    No. Plus gives you more headroom on the Admin API (1,000 points per second versus 100 on standard plans) and, for B2B, unlimited catalogs per company. Also check the plan requirements of the connector you choose.
  • Can Shopify be the source of truth for inventory?
    If it’s your only channel, yes. If you also sell in stores, to distributors or from a warehouse that serves several channels, the source of truth is usually the ERP or the WMS.
  • Can I connect Aspel, CONTPAQi or another on-premise ERP to Shopify?
    It depends on your version and how it’s installed. When no connector covers your case, the path is a bridge service that talks to the ERP through your version’s interface and to Shopify through its Admin API.
  • How is Mexico’s CFDI issued for a Shopify sale?
    Through your ERP, your invoicing system or an app, and a SAT-authorized provider certifies it.

Written by

André Valle Ortega

Founder, Flouvia

André Valle Ortega is the founder of Flouvia, the design and engineering studio that builds made-to-measure websites, stores, portals, apps, platforms and automation.

LinkedIn