Add Configurations and webhooks
Lesson 4 of 18 7 min read
Switch on each Shopify document type with a Configuration, then set up webhooks so changes arrive straight away.
A connected store does nothing until you tell Supply Lens what to exchange with it. In this lesson you'll add a Configuration for each document type you need, choose the right direction for each, and set up webhooks.
The document types
A Shopify Integration can work with five document types:
- Orders
- Shipments (Shopify calls these fulfilments)
- Products (the Configuration is called Product Updates)
- Inventory (shown as Inventories)
- Credits (refunds)
Add a Configuration only for the ones you need. Hilltop Coffee, for example, doesn't need Credits on day one.
Send or receive?
Each Configuration has a Receive box and a Send box. These are always from Supply Lens's point of view:
- Receive means Supply Lens takes data in from Shopify. Orders, Credits and imported Product Updates are received.
- Send means Supply Lens pushes data out to Shopify. Inventory is sent.
- Shipments can be either, or both: send to create fulfilments in Shopify, receive to bring in fulfilments made in Shopify.
Add a Configuration
- Go to Settings → Integration setup → Integrations and click your Shopify Integration to expand it.
- Click Configurations to open the list.
- Click + ADD in the top-right of the window to open Add configuration.
- Choose a document type from the drop-down.
- Tick Send, Receive or both.
- Click Create Default JSON to fill in the settings with their defaults.
- Click Save.
Repeat for each document type. To change settings later, click the edit button on that row.
The settings are JSON
Create Default JSON fills the Configuration with settings in JSON, a simple text format of names and values. For example, part of a default order Configuration looks like this:
{
"financialStatuses": ["paid", "partially_refunded", "refunded"],
"fulfillmentStatuses": ["unfulfilled"],
"includePos": false
}
You change a setting by editing its value. Values in square brackets are lists; true
and false switch things on and off. The rest of this course explains each setting and
when to change it.
Leave the system-managed dates alone
lastImportDate is updated by Supply Lens after every import, so the next run only
fetches newer changes. Don't edit it by hand during normal running. setupDate is set
when the Configuration is created and normally isn't changed afterwards. The one
exception is a product import, covered in the Products module.
Set up webhooks
Webhooks make Shopify tell Supply Lens about changes the moment they happen, so you don't wait for the next scheduled run.
- On the Integrations page, expand your Shopify tile.
- In the Webhooks section, click Setup.
The rest of the tile
While the tile is open, it's worth knowing the other cards:
| Activation | Whether the Integration can run. When disabled, nothing is sent or received. |
|---|---|
| State | Live or Test. This mainly matters for EDI Integrations and can usually be left unset for Shopify. |
| Configurations | What this Integration sends and receives. |
| Schedule | When the Integration runs. If you disable the schedule, you have to run it manually. |
| Default Unit of Measure | Forces every quantity to one Unit of Measure. Leave unset to use each Product’s default. |
| Manual Operation | Run the Integration by hand, for example Run receive. |
| Remove | Permanently removes the Integration and its saved credentials. Documents already received are kept. |
Good to know
The key and id shown on the tile are set by the system. Quote the Integration ID when
you contact Support.
Hilltop Coffee's Configurations
Priya adds three Configurations: Orders with Receive ticked, Inventories with Send ticked, and Shipments with Send ticked so Unleashed despatches become Shopify fulfilments. She clicks Create Default JSON on each and saves them unchanged for now. Then she clicks Setup under Webhooks.
Recap
- Add one Configuration per document type: Orders, Shipments, Product Updates, Inventories and Credits.
- Send and Receive are from Supply Lens's point of view: orders are received, inventory is sent.
- Create Default JSON fills in the settings; you edit values to change behaviour.
- Don't edit
lastImportDate; it's managed by the system. - Click Setup under Webhooks so changes arrive straight away.
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.