Webhooks & Data Sync
Learn how SortLab uses Shopify webhooks to keep your collection data accurate and up to date.
Webhooks & Data Sync
SortLab relies on real-time data to sort your collections effectively. To keep everything accurate and up to date, SortLab listens to Shopify webhooks -- automated notifications that Shopify sends whenever something changes in your store. This page explains what webhooks SortLab uses, why real-time data matters, and how your data is kept secure.
How SortLab keeps your data in sync
When you install SortLab, it registers a set of webhooks with Shopify. These webhooks act as a live connection between your store and SortLab. Whenever a relevant event occurs -- a product is added to a collection, inventory levels change, or an order is placed -- Shopify automatically notifies SortLab so it can update its data accordingly.
This means you never need to manually refresh or re-import your data. SortLab always works with the latest information from your store.
What webhooks SortLab listens to
SortLab subscribes to the following categories of Shopify webhooks:
Product updates
| Event | What it triggers |
|---|---|
| Product created | SortLab adds the new product to its dataset so it can be included in future sorts |
| Product updated | Changes to product details (title, price, images, tags, inventory) are reflected in SortLab's data |
| Product deleted | The product is removed from SortLab's dataset and excluded from future sorts |
Collection updates
| Event | What it triggers |
|---|---|
| Collection created | SortLab detects the new collection and makes it available for management |
| Collection updated | Changes to collection details (title, rules, product membership) are synced |
| Collection deleted | The collection is removed from SortLab and any associated strategy is deactivated |
| Product added to collection | SortLab includes the new product in the next sort run for that collection |
| Product removed from collection | The product is excluded from future sorts of that collection |
Order events
| Event | What it triggers |
|---|---|
| Order created | SortLab records the sale and updates revenue, order, and unit metrics for the relevant collections |
| Order updated | Changes to an order (edits, partial fulfillments) are reflected in SortLab's analytics |
| Order cancelled | Cancelled orders are excluded from revenue and sales calculations |
SortLab processes webhooks automatically in the background. You don't need to configure or manage webhooks yourself -- they're set up when you install the app and removed if you uninstall it.
Why real-time data matters
Sorting accuracy depends on having current data. Here's why each type of webhook matters:
- Product updates ensure that inventory levels are accurate. If a product goes out of stock, SortLab can push it down in the collection immediately on the next sort run instead of continuing to feature it.
- Collection updates ensure that newly added products are included in your sorting strategy right away, and removed products don't occupy sort positions.
- Order events keep revenue, order count, and units sold metrics current. Since most sorting strategies weigh sales data heavily, outdated order data would lead to suboptimal product rankings.
Without webhooks, SortLab would need to periodically poll your store for changes, which would result in delays and less accurate sorting. Real-time webhooks eliminate that lag.
Data privacy and security
SortLab takes your store data seriously. Here's how your information is handled:
SortLab only accesses the data it needs to sort your collections. It does not read or store sensitive customer information such as names, emails, addresses, or payment details.
- Minimal data access. SortLab only reads product data (titles, prices, images, tags, inventory levels), collection membership, and aggregate order data (revenue, units sold). It never accesses customer personal information.
- Write access is limited. The only write operation SortLab performs is reordering products within your collections. It never modifies product prices, descriptions, inventory, or any other store data.
- Data is encrypted. All communication between Shopify and SortLab is encrypted in transit using HTTPS/TLS.
- Webhook verification. SortLab verifies the authenticity of every incoming webhook using Shopify's HMAC signature to ensure that only legitimate Shopify notifications are processed.
- Data retention. Analytics data is retained for as long as your SortLab account is active. If you uninstall SortLab, your data is deleted in accordance with Shopify's app data handling requirements.
Troubleshooting data sync issues
In rare cases, you may notice that SortLab's data doesn't seem to match your store. Here are common causes and solutions:
Products or collections seem out of date
Cause: A webhook may have failed to deliver, or there may have been a temporary network issue between Shopify and SortLab.
Solution: Run a manual sort on the affected collection by clicking Sort Now. This triggers a fresh data fetch from Shopify and re-sorts the collection with the latest information.
New products aren't appearing in a collection
Cause: If you use Shopify's automated collections (based on product conditions), there can be a short delay before Shopify fires the webhook notifying SortLab that a product has been added to the collection.
Solution: Wait a few minutes and then check again. If the product still doesn't appear, running a manual sort will pick it up.
Analytics data doesn't match Shopify reports exactly
Cause: SortLab attributes revenue at the collection level based on product membership. If a product belongs to multiple collections, its revenue may be counted in each one. Additionally, SortLab tracks gross line item revenue and does not factor in shipping, taxes, or discounts.
Solution: This is expected behavior. Use SortLab analytics for relative performance comparisons between collections and sorting strategies, and use Shopify's built-in reports for precise financial accounting.
A collection shows as unmanaged after I set it up
Cause: The collection may have been deleted and recreated in Shopify, which generates a new collection ID.
Solution: Go to the Collections page in SortLab and set up the collection again. Your previous strategy configuration for the old collection will no longer apply.
If you continue to experience data sync issues after trying these steps, contact SortLab support through the Help section in the app. Include the name of the affected collection and a description of what seems out of sync.
Next steps
- Analytics Dashboard — See the data that webhooks help keep up to date
- Sorting Strategies — Learn how SortLab uses this data to rank your products
- Plans & Pricing — Explore plans with more frequent automated sorting