Start a project
INSIGHT
07 Oct, 2026 Ecommerce14 min read

WooCommerce ERP Integration: Products, Stock, Pricing and Orders

A WooCommerce-specific ERP integration guide covering products, variations, stock, pricing, customers, orders, webhooks, Action Scheduler, HPOS and recovery.

WooCommerce ERP integration architecture with product, stock, pricing and order data flows.

WooCommerce ERP integration becomes difficult when the store is no longer just a sales channel and starts acting as part of the company’s operating system. Products, stock, prices, customers and orders may all move between WooCommerce and ERP — but they do not all behave the same way, they do not need the same latency, and they should not all be editable in both systems.

The broad integration principles are universal: define the source of truth, design retries safely, reconcile systems and make failures visible. WooCommerce adds another layer of implementation detail: product and variation IDs, REST API resources, webhooks, order storage, Action Scheduler, extension compatibility and the risk of bypassing WooCommerce APIs with direct database access.

This guide focuses on those WooCommerce-specific decisions. It is the implementation companion to our broader ecommerce ERP integration architecture guide.

1. Start with a WooCommerce-to-ERP ownership matrix

Before building endpoints, decide which system owns each field and which direction it moves. A WooCommerce ERP integration should not be described simply as “two-way sync”.

Domain Typical owner WooCommerce responsibility
Product identity ERP / master data Store stable ERP ID and map to WooCommerce product/variation IDs
Product content PIM or WooCommerce Present channel-ready copy, attributes and media
Inventory ERP / WMS Expose sellable stock using agreed warehouse logic
Pricing ERP / pricing engine / WooCommerce Display and apply the approved commercial price
Customers CRM / ERP / WooCommerce Map customer/account identity and permissions
Orders WooCommerce at checkout; ERP after acceptance Capture transaction, export it reliably, receive downstream status
Invoices / fulfilment ERP / accounting / WMS Show relevant status back to the customer when required

The exact ownership varies. What matters is that it is explicit. If price can be changed manually in WooCommerce and independently in ERP, the integration is already ambiguous.

2. Use stable external IDs — not names or display values

WooCommerce has its own product, variation, customer and order IDs. ERP has another identity model. The integration needs a durable mapping between them.

Do not rely only on product titles, customer email addresses or other presentation fields. SKUs are useful but may still change during catalogue rationalisation, ERP migration or supplier change.

A robust mapping usually stores:

  • WooCommerce entity ID;
  • ERP entity ID;
  • SKU or customer number where relevant;
  • integration version or mapping timestamp;
  • the last successfully synchronised source state where useful.

This is especially important for variations. A WooCommerce parent product may represent one product family while each variation maps to a separate ERP SKU. The integration should know which level owns price, stock, dimensions and identifiers.

3. Map simple products and variations deliberately

WooCommerce products can be simple, variable or extended by other product types. ERP systems may represent the same catalogue differently.

The current WooCommerce Products REST API supports product resources, while variation data is handled as part of the product model. That gives an integration transport, but not the mapping strategy.

For every ERP product family, decide:

  • whether it becomes one simple product or a variable product;
  • which ERP attributes create WooCommerce variations;
  • which attributes are descriptive only;
  • which value is the stable ERP identifier;
  • whether pricing and stock live at parent or variation level;
  • how discontinued variants are handled;
  • what happens when the ERP adds or removes an option.

Do not let every ERP attribute automatically become a WooCommerce variation attribute. That can produce unnecessarily large variation combinations and a poor customer experience.

4. Separate product structure from product enrichment

In many businesses, ERP owns product identity and operational data while WooCommerce or PIM owns merchandising content.

That can be a healthy split. ERP can publish SKU, lifecycle, dimensions and stock. PIM can publish descriptions, localised attributes and media. WooCommerce can own storefront category merchandising and presentation.

The important implementation rule is that the ERP sync must not overwrite fields it does not own. If a scheduled ERP product job rewrites the full WooCommerce product object every hour, it can silently destroy content maintained by the ecommerce team.

Use a field-level contract. Update only the properties owned by that integration.

5. Inventory sync needs a sellable-stock definition

ERP inventory is not always the number WooCommerce should show as available.

The ERP may track physical stock, reserved stock, incoming stock, multiple warehouses, damaged stock and allocations for other channels. WooCommerce needs a commercial answer: how many units can this customer buy now?

Define the formula before implementation. For example:

  • sum all eligible warehouses;
  • exclude reserved stock;
  • apply a safety buffer;
  • exclude stock allocated to another channel;
  • respect market-specific warehouses;
  • round or convert pack quantities where necessary.

The integration should publish sellable stock, not simply copy the first ERP inventory field that looks plausible.

6. Decide how quickly stock actually needs to move

Inventory is often described as “real time” without defining what that means. One store may need second-level updates for scarce products. Another may operate safely with a five-minute cadence and a checkout-time validation for high-risk items.

Choose a measurable latency target and design for the business consequence of being stale. Faster is not automatically better if it creates unnecessary API load or couples storefront availability to a slow ERP.

A practical pattern can combine:

  • event-driven stock changes for important updates;
  • scheduled incremental sync as a safety net;
  • periodic full reconciliation;
  • checkout-time validation only where overselling risk justifies the dependency.

The customer experience should not fail simply because the ERP is temporarily slow unless the transaction genuinely cannot proceed safely without it.

7. Pricing integration needs precedence rules

WooCommerce can apply regular prices, sale prices, coupons and extension-driven pricing. ERP may also hold contract prices, customer groups, quantity tiers and date-based price lists.

If both systems can change the same final price, the integration needs an explicit precedence model.

For example:

Rule Example decision
Base price ERP is authoritative
Promotional price WooCommerce may override within approved boundaries
B2B contract price ERP or pricing engine always wins for the mapped account
Coupon Applied in WooCommerce only if contract rules permit it
Quantity tier Calculated in one defined system, not independently in both

The same customer and cart context should produce the same commercial result on product page, cart, checkout and ERP order.

8. Customer mapping is more than syncing email addresses

For consumer ecommerce, an email address may look like a convenient key. For B2B it is usually insufficient.

A WooCommerce user can represent one buyer while ERP may represent a company account with multiple contacts, locations, price lists and payment terms. The integration therefore needs to distinguish the person from the commercial account.

Useful mappings may include:

  • WooCommerce user ID;
  • ERP customer/account ID;
  • company ID and location ID;
  • sales representative;
  • tax classification;
  • price-list or contract ID;
  • credit/payment-term eligibility.

If company hierarchies and buyer roles are important, see our B2B ecommerce development guide. The integration must preserve the account model that the storefront uses.

9. Export orders after WooCommerce has a durable transaction

The order should be created reliably in WooCommerce before the integration attempts to hand it to ERP.

The current WooCommerce Orders REST API exposes order resources and statuses. For custom code inside WooCommerce, the same principle applies: work with WooCommerce order APIs rather than building a parallel order representation from raw database tables.

A typical export payload may include:

  • WooCommerce order ID and order number;
  • customer and company mapping;
  • billing and shipping addresses;
  • line items with ERP product IDs/SKUs;
  • quantities and unit prices;
  • tax values;
  • shipping method and cost;
  • discounts;
  • payment state and method;
  • purchase-order number or B2B metadata;
  • currency and market context.

The ERP should return a durable external order ID or acknowledgement that can be stored against the WooCommerce order.

10. Protect order export against duplicates

Order export is one of the highest-risk integration operations because retrying it can create a second fulfilment or invoice.

If WooCommerce sends an order and the ERP accepts it but the response is lost, the integration may see only a timeout. Retrying the same “create order” request without duplicate protection can create another ERP order.

Use an idempotency strategy such as:

  • a unique external order key based on the WooCommerce order;
  • an ERP endpoint that accepts a client-generated idempotency key;
  • a lookup-before-create contract that is actually atomic on the ERP side;
  • a middleware event ID with a unique constraint.

Do not mark a WooCommerce order as exported until the integration has a business acknowledgement it can safely reconcile later.

11. Use webhooks as event triggers, not as the entire integration

WooCommerce webhooks are useful for notifying an external service that products, customers or orders changed. The official WooCommerce webhook documentation supports topics such as order, customer and product events and signs payloads with HMAC-SHA256.

Webhooks solve event notification. They do not solve durable processing by themselves.

The receiver still needs to decide whether the event is new, whether it was already processed, what ERP action it should trigger, how failures are retried and what happens if the event is permanently invalid.

WooCommerce also documents delivery logging and disables a webhook after repeated failed deliveries. That is another reason not to assume “the webhook exists” means the ERP is continuously in sync.

12. Keep heavy work out of the customer request

Do not make checkout wait while WooCommerce performs a long chain of ERP writes unless the business process truly requires a synchronous result.

Order export, invoice fetches, catalogue updates and other non-immediate jobs are usually safer in background processing. WooCommerce includes Action Scheduler, a job-queue library used across its ecosystem.

Action Scheduler provides asynchronous and scheduled actions with logging and an administration interface. Its API also supports grouping actions, which is useful for keeping integration jobs distinct from unrelated background work.

A WooCommerce ERP extension can use background jobs for:

  • order exports;
  • ERP acknowledgement polling;
  • catalogue update batches;
  • stock updates;
  • price-list imports;
  • reconciliation jobs;
  • retrying transient failures.

For very large queues, Action Scheduler’s own documentation recommends considering WP-CLI processing rather than relying only on the default web-based runner.

13. Design retry behaviour per operation

Retries should depend on the failure type.

A timeout, 502 response or rate-limit response may be transient. An unknown ERP customer, invalid tax code or deleted SKU is usually a data or business-rule problem.

Useful retry policy should define:

  • which errors are retryable;
  • how many attempts are allowed;
  • how long to wait between attempts;
  • whether backoff is required;
  • which operations are safe to repeat;
  • when a job moves to manual exception handling.

Repeatedly retrying a permanently invalid order does not make the integration more reliable. It only hides the need for an operator to fix the underlying mapping.

14. Store integration state separately from the WooCommerce order status

WooCommerce order status describes the commerce order. Integration state describes the relationship with ERP. They are related but not identical.

An order can be “processing” in WooCommerce while its ERP export is queued, successfully accepted, failed, awaiting customer mapping or waiting for a downstream acknowledgement.

Keep enough integration metadata to answer:

  • Has this order been queued?
  • When was export last attempted?
  • How many attempts occurred?
  • What ERP order ID was assigned?
  • What was the latest error?
  • Is manual action required?
  • Can the job be replayed safely?

This is much easier to operate than encoding every technical state as a new WooCommerce order status.

15. Build for High-Performance Order Storage

Modern WooCommerce integrations should not assume orders live in WordPress posts and postmeta tables.

WooCommerce’s High-Performance Order Storage uses dedicated order tables and is enabled by default for new WooCommerce stores. WooCommerce’s developer guidance is explicit that extensions should use WooCommerce-specific order APIs instead of direct WordPress post APIs for order data.

The practical rule for ERP integration is simple: do not build order export or status updates by reading and writing wp_posts / wp_postmeta directly.

Use WooCommerce CRUD/order APIs so the integration remains compatible with HPOS and future platform changes.

16. Avoid direct database writes for products and orders

Direct SQL can look faster when building a large sync, but it bypasses business logic, caches, hooks and compatibility layers.

For orders, HPOS makes that risk especially clear. For products, direct database updates can also leave derived data, caches or extension behaviour inconsistent.

Use supported WooCommerce APIs whenever possible. If a performance-critical import needs lower-level operations, treat that as a deliberate architecture decision with tests and reconciliation rather than an optimisation shortcut.

17. Reconcile WooCommerce and ERP on a schedule

Even a well-designed event flow can drift. A webhook can fail, an ERP record can be edited manually, a deployment can interrupt a batch, or a legacy process can update one system outside the expected path.

Reconciliation compares systems after the fact and looks for differences that violate the data contract.

Useful WooCommerce ERP reconciliation checks include:

  • WooCommerce orders with no ERP order ID after the expected export window;
  • ERP orders whose external key does not map back to WooCommerce;
  • product or variation mappings that reference deleted entities;
  • stock differences above an agreed tolerance;
  • prices that differ from the authoritative ERP value;
  • customers with missing or duplicate ERP account IDs;
  • fulfilment states that stopped moving.

Not every discrepancy should be automatically overwritten. Some need manual review. The important point is that the integration detects the inconsistency before a customer or finance team discovers it.

18. Give operators an integration dashboard

Logs are necessary, but raw log files are not an operating interface.

A useful WooCommerce integration should expose enough state in the WordPress/WooCommerce administration area, middleware console or monitoring system for support staff to answer common questions without reading code.

At minimum, operators should be able to see:

  • pending jobs;
  • failed jobs;
  • last successful sync by domain;
  • queue age;
  • latest ERP error;
  • WooCommerce and ERP IDs;
  • retry or replay controls with appropriate permissions;
  • reconciliation warnings.

Action Scheduler already provides visibility into scheduled actions. For business-critical integration, add business context on top of that so an operator can understand which order, customer or product the action belongs to.

19. Keep credentials and permissions narrow

An ERP connector can access commercially sensitive data. Credentials should therefore have only the permissions the integration actually needs.

Use separate credentials for production and non-production environments, store secrets outside public code, rotate them when required, and avoid logging credentials or complete sensitive payloads.

For WooCommerce webhooks, verify the provided HMAC signature. For REST API access, use appropriate authentication and restrict keys to the required read/write capability.

The integration should also respect WordPress administrator permissions. Replaying failed orders or changing external mappings can be high-impact actions and should not be available to every backend user.

20. B2B WooCommerce ERP integration needs account context

B2B increases the number of fields that can be commercially significant. The ERP may own contract pricing, payment terms, credit limits, company hierarchy and location-specific availability.

When a buyer submits an order, the payload may need more than a WooCommerce user ID. It may require company ID, branch/location ID, ERP customer number, contract/price-list ID, purchase-order number and approval context.

That context should be resolved before export and stored so the order can be audited later. Do not depend on current account settings if the commercial terms need to represent what was true when the order was placed.

This is one reason B2B ecommerce architecture and ERP integration should be designed together.

21. Test failure scenarios, not only successful sync

A test environment that proves “product imported” and “order exported” is not enough.

Acceptance tests should include scenarios such as:

  • ERP API is unavailable when an order is placed;
  • ERP accepts the order but WooCommerce receives a timeout;
  • the same order-export job runs twice;
  • a product exists in WooCommerce but its ERP mapping is missing;
  • an ERP SKU is discontinued while a WooCommerce variation remains in a cart;
  • a stock event arrives out of order;
  • a price update arrives while checkout is open;
  • an ERP customer is merged or renumbered;
  • a webhook endpoint returns repeated failures;
  • Action Scheduler accumulates a large queue;
  • HPOS is enabled and the integration still reads/writes orders correctly.

These scenarios reveal whether the integration is operationally safe rather than merely technically connected.

22. A practical implementation sequence

  1. Map data ownership. Define the source of truth for products, variations, stock, prices, customers and orders.
  2. Define stable identifiers. Map WooCommerce IDs to ERP IDs and decide how variation identity works.
  3. Specify field-level contracts. Prevent one system from overwriting data it does not own.
  4. Choose latency per flow. Decide which updates are synchronous, event-driven, queued or scheduled.
  5. Build order export with duplicate protection. Solve idempotency before adding automatic retries.
  6. Use WooCommerce APIs and HPOS-compatible order access. Avoid direct table assumptions.
  7. Add background processing. Move heavy and retryable work out of customer requests.
  8. Expose operational state. Make queues, errors and external IDs visible.
  9. Add reconciliation. Compare systems on a schedule.
  10. Test failure and recovery. Validate outages, duplicates, invalid data and replay.

When a standard connector is enough

Not every WooCommerce ERP project requires custom development. A maintained connector can be the best option when the ERP is supported directly, the business uses standard product and order models, field ownership is simple and the connector exposes enough configuration and failure visibility.

Custom integration becomes more appropriate when the business needs:

  • multiple warehouses or custom sellable-stock logic;
  • customer-specific pricing or B2B account hierarchies;
  • non-standard product/variation mapping;
  • several systems participating in one workflow;
  • custom order approval or fulfilment states;
  • high-volume asynchronous processing;
  • strong reconciliation and monitoring requirements;
  • business logic that a generic connector cannot own cleanly.

The decision should be based on fit and operational risk, not on a preference for custom code. Our custom WooCommerce vs plugins framework explains the same principle at platform level.

What a production WooCommerce ERP integration should leave behind

A finished integration should leave more than working API calls. It should leave a documented ownership matrix, entity mappings, field contracts, queue and retry rules, duplicate protection, HPOS-compatible order handling, reconciliation, operational visibility, acceptance tests and a recovery process.

That is what turns an ERP connector into dependable ecommerce infrastructure.

NAIPEXO designs systems and API integrations together with custom WooCommerce development when the store depends on ERP data and workflows to operate reliably.

Technical references

KEEP EXPLORING

More thinking from NAIPEXO.

View all insights