Mon – Sat: 9:00 AM – 7:00 PM IST
Integrations

ERP and WooCommerce integration explained

What changes when the storefront is WooCommerce rather than a hosted platform — and what that means for the integration.

In short

A WooCommerce integration connects a WordPress storefront to the ERP through the WooCommerce REST API, so orders flow in and stock, pricing and fulfilment flow out. The mechanics resemble a Shopify integration. What differs is that WooCommerce is self-hosted and plugin-driven, so the environment it runs in is yours to manage and yours to break.

Why It Matters

Why this matters in practice

Self-hosting is the whole difference. On a hosted platform the API behaves predictably because the vendor controls the stack. On WooCommerce, a plugin update, a PHP version change or a caching layer can alter behaviour between one week and the next. The integration therefore has to be defensive in ways a hosted-platform integration does not.

Full control of the storefront, including the API environment
No per-transaction platform fee on the store itself
Plugin ecosystem can alter order structure unexpectedly
Integration must tolerate environment changes it does not control
How It Works

How it works in practice

1

Authenticate to the REST API

Consumer key and secret over HTTPS. Credentials are scoped, so grant only what the integration needs.

2

Pull orders

Polling on a schedule or webhook-driven. Webhooks are faster; polling is more resilient when the site is under load.

3

Map products and variations

WooCommerce variations must map to distinct ERP items. This is the most common source of mapping errors.

4

Push stock and price

From the ERP outward, on schedule or on change, with the ERP as system of record.

5

Write back fulfilment

Order status and tracking written back so the customer notification fires from the store.

Worked example

A worked example: the SKU that did not match

An integration maps WooCommerce products to ERP items by SKU. Testing passes. Within a fortnight, roughly four percent of orders fail to import.

The failures share a cause. WooCommerce SKUs were maintained by the marketing team, who added suffixes for bundles and seasonal variants, used lowercase inconsistently, and in a few cases left variations without a SKU at all. The ERP item codes never changed. The mapping worked for every product that existed at build time and broke for everything created afterwards, because nobody owned the rule.

The fix has two parts and the second is the one that lasts. Technically, normalise on both sides and hold an explicit mapping table for the exceptions rather than relying on string equality. Procedurally, decide who owns product creation and require the ERP item to exist first, so a product cannot be published without a mapping. Integrations do not usually break because of code; they break because somebody creates data on one side that the other side has never heard of.

Key terms

The vocabulary, briefly

Term What it means
REST API WooCommerce's interface for reading and writing orders, products and stock.
Webhook A callback fired on an event, used to push orders to the ERP as they are placed.
SKU The field that normally maps a WooCommerce product to an ERP item. It must be unique and must match.
Order status WooCommerce's lifecycle states — processing, completed, cancelled — which the ERP writes back.
Variable product A product with variations, each of which maps to its own ERP item.
What Goes Wrong

Common mistakes worth avoiding

Plugin updates changing payloads

A tax or shipping plugin update can alter the order structure. Validate incoming payloads rather than assuming shape.

Caching serving stale stock

Aggressive page caching can display stock levels the API has already changed. Exclude the relevant endpoints.

Variations mapped loosely

A variation that does not map to a distinct ERP item produces wrong stock and wrong fulfilment.

No webhook retry

WooCommerce webhooks can fail silently under load. Reconcile periodically against order IDs rather than trusting delivery.

What to measure

Numbers worth tracking

Metric What it tells you What distorts it
Order import failure rate The headline health check, and it should be near zero after the first fortnight.
Unmapped SKUs Products on the storefront with no ERP item. A leading indicator of failures to come.
Stock sync lag Minutes between an ERP change and the storefront reflecting it.
Orders in WooCommerce vs ERP The daily reconciliation that catches anything the error log missed.
FAQ

Questions we are asked about this

Not fundamentally, but it is less predictable, because you own the hosting and the plugin set. Budget for environment-related issues that a hosted platform would absorb.
The ERP, as with any channel. WooCommerce sees only its own sales; the ERP sees purchasing, production and every other channel.
The concepts are the same — orders in, stock and prices out, status written back — but the practicalities differ. WooCommerce is self-hosted WordPress, so performance, plugin conflicts and hosting are yours to manage, and the API's behaviour can be affected by other plugins. That flexibility is the attraction and the complication: you can change anything, including things the integration depended on.
Assume they will happen and build for it. Test the integration after every plugin update in a staging environment, because another plugin can change order data, add fields or intercept the same hooks. Pin plugin versions in production rather than auto-updating. Most WooCommerce integration failures that look like API problems are a third plugin behaving unexpectedly, and the diagnosis is much faster when staging exists.
Push on change for low-stock and fast-moving items, scheduled batches for the rest. Real-time for everything generates far more API traffic than a self-hosted WooCommerce installation typically handles comfortably, and the performance cost shows up as slow page loads for customers. The hybrid gives you protection against overselling where it matters without loading the site for items with deep stock.
Let the ERP own both and push them to the storefront, so a customer and an invoice never disagree. Where WooCommerce calculates tax independently — which it will by default — you get rounding differences and, with GST, potentially wrong rates when HSN-driven logic lives only in the ERP. Reconciling those differences after the fact is far more work than configuring the storefront to accept what it is given.
Related

Where to read next

Shopify and WooCommerce integration

Read more

ERP Shopify integration

Read more

Our eCommerce integration services

Read more

Need this applied to your own systems?

We build and support the systems this page describes. Start with a free working proof of concept — no cost, no commitment.