SortLab
API & Integrations

Webhooks & Data Sync

Learn which Shopify webhooks, scopes, and pixel events SortLab uses to keep product sorting and analytics current.

SortLab keeps a local product and order dataset so sorting does not have to fetch every product live during each run. Shopify webhooks, bulk sync, and the SortLab Web Pixel keep that dataset current.

Install-Time Scopes

SortLab's Shopify app configuration requests these scopes:

ScopeUsed for
read_productsProduct catalog, variants, images, tags, vendors, types, and collection membership.
write_productsReordering products in Shopify collections.
write_publicationsPublishing app-managed collections when needed.
read_inventoryInventory and stock-aware sorting.
read_ordersRevenue, order, units sold, sales velocity, and A/B test metrics.
write_pixelsInstalling and maintaining the SortLab Shopify Web Pixel.
read_customer_eventsReading storefront behavioral events collected through Shopify's customer events system.

Shopify Webhooks

SortLab's current Shopify app config subscribes to these Pub/Sub-delivered topics:

TopicWhat SortLab does
products/createAdds the product to SortLab's synced product dataset.
products/updateUpdates product metadata, price, image, tag, vendor, type, and related fields.
products/deleteRemoves the product from SortLab's active product dataset.
inventory_levels/updateUpdates inventory state and can trigger stock-sensitive sorting behavior.
orders/createRecords order line items for revenue, orders, units sold, and strategy scoring.
orders/updatedUpdates order-derived metrics when Shopify order state changes.
app_subscriptions/updateSyncs Shopify Billing subscription state and plan access.
app/scopes_updateDetects app scope changes.
app/uninstalledHandles uninstall cleanup and app state changes.

Shopify compliance topics are also registered:

TopicPurpose
customers/data_requestPrepares the store/customer data export required by Shopify privacy rules.
customers/redactRedacts customer-related stored data when Shopify requires it.
shop/redactRemoves shop data when Shopify requires it after uninstall.

Merchants do not need to configure these webhooks manually. They are part of the Shopify app configuration and SortLab backend deployment.

Bulk Product Sync

On install and during backfill work, SortLab uses Shopify product sync paths to populate its local product table. Product webhooks then keep the dataset current incrementally.

This is why newly installed stores may need a short sync period before every collection preview and analytics view is fully populated.

Web Pixel Events

The SortLab Web Pixel records collection and product engagement signals used in analytics and sorting:

  • Collection impressions.
  • Product clicks.
  • Product page views.
  • Add-to-cart events.
  • CTR and add-to-cart rate.
  • Behavioral signals used by Advanced sorting parameters.

Pixel data improves as real shoppers browse the storefront after installation.

Security and Verification

  • Shopify webhook requests are verified with Shopify HMAC signatures when delivered directly.
  • Pub/Sub-delivered webhooks are accepted only through the configured trusted Google Pub/Sub delivery path.
  • Data is transmitted over HTTPS/TLS.
  • SortLab stores operational data needed for sorting, analytics, billing state, and Shopify compliance.

Data SortLab Does Not Change

SortLab does not edit:

  • Product titles.
  • Product descriptions.
  • Product prices.
  • Inventory quantities.
  • Customer payment details.
  • Shopify order financial records.

The core write operation is changing product order within managed collections.

Troubleshooting Sync Issues

A collection or product looks stale

Run Sort Now on the collection. A manual sort forces SortLab through the latest available product and strategy data.

Analytics is empty

Analytics appears after collections are managed, sorts have run, orders are attributed, and pixel events have accumulated. New installs commonly show empty states first.

A/B preview is unavailable

Preview can be unavailable while sync is pending or when a collection is too large for preview. The test can still be configured when the collection is otherwise eligible.

Revenue differs from Shopify reports

SortLab attributes line-item revenue to managed collections for merchandising analysis. Shopify remains the source of truth for accounting, taxes, discounts, shipping, and full financial reports.

Next Steps

On this page