Integrate WooCommerce with an ERP, No Lost Orders

·

A WooCommerce–ERP integration is reliable when every piece of data has a single master source, events can be replayed without creating duplicates, errors land in a queue, and daily reconciliation is in place. Connecting the API isn't enough: you must define when an order is born, who reserves stock, how payments, returns, taxes and invoices are handled, and what happens if one of the systems goes down.

Define Master Systems

DataTypical Recommended Master
Product/SKUERP or PIM
PriceERP, PIM or pricing engine
Available stockERP/WMS
Web orderWooCommerce, at creation
InvoiceERP
PaymentGateway with ERP reconciliation
CustomerRule defined per B2C/B2B
ShipmentERP/WMS or logistics platform

No two systems should be authorised to change the same data without a rule that resolves the conflict.

Identifiers

Use stable keys:

Names are not identifiers. A description change must not create a new product.

API and Webhooks

WooCommerce provides a REST API to read and write products, orders and other resources. Webhooks notify events to a URL.

Recommended pattern:

  1. The webhook reports the event.
  2. The receiver validates the signature and logs the event.
  3. A queue decouples processing.
  4. A worker fetches the detail via the API.
  5. The data is transformed and sent to the ERP.
  6. The result is confirmed.
  7. Reconciliation catches anything missing.

Don't rely on the webhook alone: it can fail or be disabled after repeated errors. Periodic reconciliation is mandatory.

Security

The official documentation shows keys with read and write permissions; grant them only if the flow requires it.

Orders and Statuses

Map each status:

WooCommerceERPAction
pendingpendingdo not reserve, or a specific rule
processingconfirmedreserve/prepare
completedshipped/closedclose per process
cancelledcancelledrelease
refundedreturn/credit notefinancial flow
failedfaileddo not prepare

The mapping is adapted to the gateway and logistics. Never invoice on an ambiguous status.

Idempotency

Each event has a composite key — store, order, type and version. If it arrives twice, the second operation updates or is ignored; it never creates another order.

Retries after a timeout first check whether the operation already exists.

Stock

Define:

The store should receive the available figure, not necessarily the physical one. Frequency depends on turnover and the risk of overselling.

Reconcile by SKU and alert on discrepancies.

Pricing and Promotions

Decide where prices, coupons, taxes and rounding live. The ERP receives enough of a breakdown to reproduce the total.

Complex promotions can be logged as a traceable discount. Don't recalculate in the ERP in a way that changes what was charged.

Taxes

Test B2C/B2B, territories, exemptions, rates, shipping costs and discounts. Tax localisation and invoicing obligations must be validated.

WooCommerce calculates the sale; the ERP must accept or validate it per the design, without creating silent discrepancies.

Customers and Privacy

For guest checkout, avoid creating duplicates for every variant of an email address. Define a matching rule and when to update the data.

The integration minimises data, controls roles and contracts, and applies retention limits. Marketing isn't triggered automatically by a purchase.

Invoices

The ERP usually numbers and issues invoices. The link returns the number, PDF or status to WooCommerce or the customer area. Credit notes and returns are linked to the original.

An issued invoice is never edited for an order change; the correct tax procedure applies instead.

Payments

The order, the transaction and the settlement are distinct objects. Reconcile:

An order webhook doesn't prove the money has settled.

Shipping and Returns

The ERP/WMS sends carrier, tracking, parcels and status. Returns generate authorisation, receipt, inspection, credit and restocking depending on condition.

Stock isn't restocked when a return is requested; it's restocked once received and validated.

Error Handling

The error queue shows:

Permanent errors — for example, a non-existent SKU — are not retried indefinitely. Fix the data and reprocess.

Observability

Metrics:

Alerts must be actionable.

Testing

Rollout Plan

Days 1–30

Masters, statuses, taxes, architecture and security.

Days 31–60

API, webhooks, queues, idempotency and testing.

Days 61–90

Pilot, reconciliation, alerts and production.

Common Mistakes

  1. No master source.
  2. Using names as keys.
  3. Relying only on webhooks.
  4. Retrying without idempotency.
  5. No error queue.
  6. Updating physical stock.
  7. Recalculating promotions.
  8. Invoicing before a valid payment.
  9. Restocking before the return is received.
  10. No daily reconciliation.

Checklist

Frequently Asked Questions

API or Plugin?

It depends on the scope. A plugin can speed things up, but it must demonstrate security, maintenance, idempotency and support.

Are Webhooks Enough?

No. They must be complemented with polling and reconciliation.

Who Should Control Stock?

Usually the ERP/WMS. WooCommerce receives the calculated availability.

Official Sources Consulted

Summum Sistemas can design the integration, the queues, the reconciliation and the monitoring.