Supply Lens

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 Manager role. 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/Write permissions, 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

  1. Go to Settings → Integration setup → Integrations and click + Add Integration.
  2. Find WooCommerce and click Add.
  3. Fill in Site Address (using https), Client Key and Client Secret.
  4. Click Connect. A tile for your store appears in the list. Leave Activation off for now.

Add Configurations and webhooks

  1. Expand the WooCommerce tile and click Configurations, then + Add.
  2. Choose a document type and click Send, Receive or both. These are from Supply Lens's point of view.
  3. Click Create Default JSON, then Save.
  4. Repeat for each type you need (see the table below).
  5. Back on the tile, click Setup in the Webhooks section so new orders and refunds arrive instantly.
Document typeUsual direction
OrdersReceive
Credits (refunds)Receive
InventorySend
Shipments (fulfilments and tracking)Send
ProductsReceive, 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

  1. Go to Settings → Integration setup → Mappings and click + ADD.
  2. Create Order from WooCommerce, as Target Data, to your back-office Integration, and click SAVE.
  3. Add Credit from WooCommerce to the back office, and Inventory and Shipment from the back office to WooCommerce.
  4. Optionally turn Automatic off on the order Mapping while testing, so orders wait at Ready for review.

Test

  1. On the WooCommerce tile, toggle Activation to Enabled. The first sync starts immediately.
  2. Create a test order in WooCommerce.
  3. 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 statusesToImport includes the order's status, and that webhooks are set up.
  • It won't connect. Check the site address uses https, the key has Read/Write permissions and the Supply Lens user still has the Shop Manager role. 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".