Configurations, webhooks and Mappings
Lesson 4 of 12 8 min read
Tell the Integration which Documents to send and receive, turn on webhooks, and route data to your other systems.
A connected Integration does nothing until you tell it what to handle. In this lesson you'll add a configuration for each Document type, set up webhooks, and create the Mappings that carry each Document on to its destination.
Choose your Document types
A WooCommerce Integration can handle these Document types:
- Orders
- Shipments (fulfilments)
- Products
- Inventory
- Credits (refunds)
The settings guide also describes a Customer Update type, which writes customer records into WooCommerce. You'll meet it in the customer updates lesson.
Only add the types you'll actually use. If your inventory system is the master for products and you never want product changes sent to the store, don't add a product configuration that sends.
Send or receive?
Each configuration has a direction: Send, Receive or both. Directions are always from Supply Lens's point of view, not WooCommerce's. So an order coming out of your store is received by Supply Lens, and stock going into your store is sent by Supply Lens.
| Document type | Typical direction for WooCommerce |
|---|---|
| Orders | Receive (from the store) |
| Credits | Receive (from the store) |
| Inventory | Send (to the store) |
| Shipments | Send (tracking to the store) |
| Products | Receive, Send, or both, depending on which system owns product data |
- Go to Settings → Integration setup → Integrations and click your WooCommerce Integration to expand it.
- Click Configurations to open the list of configurations.
- Click + Add in the top-right to open the Add configuration window.
- Pick a Document type from the drop-down.
- Click Send, Receive, or both.
- Click Create Default JSON to fill in the configuration with its default settings.
- Click Save.
- Repeat for each Document type you need.
Create Default JSON fills in the settings you'll study in the next two modules. JSON is simply a structured text format: a list of setting names and their values. You can come back and change them at any time.
Check statusesToImport before you go live
On the order configuration, the statusesToImport list decides which WooCommerce order
statuses are imported, and when it's empty, no orders are imported at all. Check it
before you enable the Integration. The next module covers it in detail.
Turn on webhooks
Webhooks make WooCommerce tell Supply Lens about new orders and refunds instantly, instead of waiting for the next scheduled run. They're recommended for every store.
On the Integrations page, expand the WooCommerce tile and click Setup in the Webhooks section.
Still set a schedule
Webhooks deliver orders and refunds. Use the Schedule card to choose how often the Integration also runs on its own, so the other flows keep moving. You can always use Manual Operation to run it now.
Route the data with Mappings
A Mapping says: when a Document of this type arrives from this Integration, send it as this to that Integration. Create one for each flow.
- Go to Settings → Integration setup → Mappings.
- Click + ADD in the top-right.
- Set Map, From, As and To, then click SAVE.
For finer control, a Mapping can also match on a specific Customer, Ship to
party or Location, or Tags on the source Document, and can add Target tags to what
it creates. Mappings have an Automatic switch: when it's off, Documents stop at Ready
so someone can review them before sending.
Fernbrook's configuration plan
Priya adds four configurations to the WooCommerce Integration: Orders (Receive), Credits (Receive), Inventory (Send) and Shipments (Send). Unleashed is the master for products, and she doesn't want product changes made in the store pushed anywhere, so she leaves out a Products configuration for now. She clicks Setup under Webhooks, sets a one-hour schedule, and creates four Mappings between WooCommerce and Unleashed. While testing, she turns Automatic off on the order Mapping so she can check each order before it reaches Unleashed.
Recap
- Add one configuration per Document type you need: Orders, Shipments, Products, Inventory, Credits.
- Send and Receive are from Supply Lens's point of view: orders are received, stock is sent.
- Create Default JSON fills in the settings; an empty
statusesToImportmeans no orders. - Set up webhooks from the tile's Webhooks section so orders and refunds arrive instantly.
- Create a Mapping for each flow; turn Automatic off if you want to review Documents first.
Quick guides for this topic
Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.