Skip to content
Knowledge ERP Docs

API Reference ↗
Integrations

WooCommerce

Connect a WooCommerce store for product and inventory sync, order import as sales orders, and fulfillment updates back to Woo.

Availability — Included with the Inventory or Sales module. Manage modules and your plan tier in Account & Billing.

The WooCommerce integration mirrors the Shopify flow for stores running on WooCommerce, keeping catalog, stock, and orders in sync.

Connecting #

From the WooCommerce settings page, provide your store URL and API consumer key / secret. Knowledge ERP uses those credentials to read and write to your store. Connecting also creates a webhook secret for the store, shown under Webhook Setup once it is connected — you need it to receive events from WooCommerce (see How it runs).

You also choose the store's Store Location: the Location it sells stock from and ships its orders from. A store connected before this setting existed shows a prompt to choose one; until you do, its stock levels are every Location's added together and its orders get your default Location, as before. You can change it on the settings page at any time. While Inventory Levels sync is on, changing it sends every synced product's stock level to WooCommerce again, for the new Location.

What syncs #

  • Products & inventory (ERP → Woo) — Product changes and stock level updates are pushed outbound to WooCommerce as they happen. The stock level sent is the Store Location's (every Location's, while none is chosen). Part-used units are added up by how full each is, and only whole units are sent. Saving a product turns on stock management for it in WooCommerce, and sends no stock level: with Inventory Levels sync on, one is sent when the product's stock changes in Knowledge ERP, and for every synced product when you change the Store Location.
  • Products (Woo → ERP) — when you connect your store with Sync products on, or turn Sync products on, the products already in it are imported into Knowledge ERP as new Products. The WooCommerce settings page shows how far the import has got, and how many products came in. After that, a product created or first edited in WooCommerce while it is connected with Sync products on is imported the same way, via webhook. One that Knowledge ERP pushed to WooCommerce is recognized as its own. A product is imported once. After that, a change to its name in WooCommerce is made to the Product in Knowledge ERP too, and so is a change to its price while your store sells in your account's home currency; the WooCommerce settings page says when it does not. A product with variations has no price of its own in WooCommerce, so only its name changes. A change brought in from WooCommerce is not sent back to it, and is sent on to a connected Shopify store, as an edit made in Knowledge ERP is. If Knowledge ERP could not send a change to a product's details to WooCommerce, changes made to that product in WooCommerce are not brought in until the product is next saved in Knowledge ERP and reaches WooCommerce, which then has its name and price as they are in Knowledge ERP. Inbound product sync honors the Sync products toggle. A product you delete in Knowledge ERP stays deleted: when WooCommerce sends it again, it is skipped, not created again.
  • Moving your store to a new address — when you connect a store at a new address and Knowledge ERP finds products it sent to your old address there, the settings page asks whether it is the same store before importing anything. Changes the store sends meanwhile, and changes Knowledge ERP would send it, are held until you answer. If it is a different store, the changes the store sent are brought in when you answer, and the changes Knowledge ERP held for it are sent once its products are imported; the settings page shows how many of those are waiting. Answer Same store: keep its links to keep its products and orders linked to the ones already in Knowledge ERP, or It's a different store to import its products as for a new store: the ones that came from Knowledge ERP are linked to theirs, and the rest are added as new. If you answered Same store by mistake, disconnect the store and contact support.
  • Orders → sales orders — WooCommerce orders import as sales orders, matched to existing customers by email or created automatically. Each ships from the Store Location (your default Location, while none is chosen). An order you delete in Knowledge ERP stays deleted in the same way.
  • Fulfillment → WooCommerce — each shipment of an order that came from WooCommerce is sent to WooCommerce as it goes. A shipment that does not finish the order adds a note to the order for the customer, saying what shipped and its tracking number if it has one; the one that finishes it sets the order to completed. A shipment made on the Ship screen is sent about five minutes after you ship it; one brought in from ShipStation is sent straight away. An order you set to Shipped by hand is set to completed, with no note, whether or not it has shipments.

How it runs #

Each sync type — products, inventory levels, orders, and fulfillments — can be turned on or off independently from the WooCommerce settings page: click a switch in the Sync Settings panel to toggle it at any time after connecting.

Observers watch Products and inventory movements to push changes outbound to WooCommerce automatically. Inbound events arrive in real time via webhooks — the Order created / Order updated and Product created / Product updated topics.

To receive them, add webhooks in WooCommerce → Settings → Advanced → Webhooks. A WooCommerce webhook has a single topic, so add one webhook per topic: Order created and Order updated to import orders, and, if you want products added in WooCommerce to flow in as well, Product created and Product updated. Give each webhook the same values: the URL shown under Webhook Setup on the settings page in its Delivery URL field, and the secret shown beneath it in its Secret field. WooCommerce signs each delivery with that secret, and a delivery that is not signed with it is refused. When you save a webhook, WooCommerce sends a short test request to the URL, and Knowledge ERP acknowledges it.

A store that has no secret yet shows a Generate a webhook secret button. Generate a new secret replaces the one you have: paste the new secret into the Secret field of each webhook you set up in WooCommerce. Any webhook you have not updated keeps being refused.