How do I add WooCommerce?
Add WooCommerce
Connect your WooCommerce store with a Read/Write API key, switch on orders, stock and tracking, set up webhooks and Mappings, and prove it with a test order.
About 7 min
By the end of this guide your WooCommerce store will be connected to Supply Lens, with orders and refunds flowing in, stock and tracking flowing back, and a test order to prove it.
Before you start
- Admin access to WooCommerce.
- A Supply Lens user in WooCommerce with the
Shop Managerrole. This is a separate login in your store that Supply Lens uses. WooCommerce's guide Roles and Capabilities explains how to assign roles. - An API key for that user with
Read/Writepermissions, and the Client Key and Client Secret WooCommerce shows when you generate it. - Your store's address, starting with
https. - The WooCommerce Shipment Tracking extension, if you want tracking numbers on orders.
- An Integration for the system orders go to, such as your ERP.
- SKUs that match, with a unique SKU for every variation. See Align your SKUs.
Steps
Create and connect the Integration
- Go to Settings → Integration setup → Integrations and click + Add Integration.
- Find WooCommerce and click Add.
- Fill in Site Address (using
https), Client Key and Client Secret. - Click Connect. A tile for your store appears in the list. Leave Activation off for now.
Add Configurations and webhooks
- Expand the WooCommerce tile and click Configurations, then + Add.
- Choose a document type and click Send, Receive or both. These are from Supply Lens's point of view.
- Click Create Default JSON, then Save.
- Repeat for each type you need (see the table below).
- Back on the tile, click Setup in the Webhooks section so new orders and refunds arrive instantly.
| Document type | Usual direction |
|---|---|
| Orders | Receive |
| Credits (refunds) | Receive |
| Inventory | Send |
| Shipments (fulfilments and tracking) | Send |
| Products | Receive, Send or both, depending on which system owns product data |
Check statusesToImport
On the order Configuration, statusesToImport decides which WooCommerce order statuses are imported. When it's empty, no orders are imported at all. See WooCommerce settings.
Add Mappings
- Go to Settings → Integration setup → Mappings and click + ADD.
- Create Order from WooCommerce, as Target Data, to your back-office Integration, and click SAVE.
- Add Credit from WooCommerce to the back office, and Inventory and Shipment from the back office to WooCommerce.
- Optionally turn Automatic off on the order Mapping while testing, so orders wait at
Readyfor review.
Test
- On the WooCommerce tile, toggle Activation to Enabled. The first sync starts immediately.
- Create a test order in WooCommerce.
- Wait a few minutes.
Check it worked
- Your test order appears in Sales → Orders in Supply Lens. Open it to check the customer, lines and total.
- The order reaches your back-office system.
- Despatch it there: the tracking number should appear on the WooCommerce order (with Shipment Tracking enabled).
- Set a Schedule on the tile, or use Manual Operation to run it on demand.
If something goes wrong
- No orders arrive. Check Activation, that
statusesToImportincludes the order's status, and that webhooks are set up. - It won't connect. Check the site address uses
https, the key hasRead/Writepermissions and the Supply Lens user still has theShop Managerrole. See Update integration credentials. - An order is held with a product error. A variation's SKU doesn't match. See Fix "product does not exist".