docs
  1. Architecture
  2. Webhooks
  3. Product Events

Product Events

SCAYLE can notify your systems through webhooks when a product changes. There are two sources of product events, and they answer different questions.

Admin API Product EventsStorefront Product Events
Tells youA product changed in the SCAYLE backend, the source of truth.A product change is now live and visible to shoppers through the Storefront API.
FiresWhen the change is made.After the change is indexed and visible in Storefront API responses.
ScopeGlobal. One subscription covers all shop countries.Per shop country. Each event carries its shopCountryId.
GranularityGranular. Separate events for master data, variants, prices, and availability.Coarse. Three lifecycle events that reflect the published product.
Eventsproduct-updated, product-master-updated, product-deleted, product-variant-deleted, product-variant-stock-updated, product-variant-prices-updated, product-variant-availability-updated.product-created, product-updated, product-deleted.

Two differences stand out. Admin API events are granular, so you get a separate event for a price change, an availability change, or a variant removal. Storefront events are coarse, so any of those changes arrives as a single product-updated. Admin API events also have no product-created, while Storefront events do, because a product first becomes visible to shoppers at index time.

Which one should you use

Pick the source that matches what your system needs to react to.

  • Use Admin API Product Events when you act on backend changes as soon as they happen, regardless of whether the change is live for shoppers yet. For example, syncing an internal system with the SCAYLE source data.
  • Use Storefront Product Events when you act on what shoppers can actually see. For example, refreshing an external search index, a product feed, or a cache that mirrors the storefront. These events fire once the change is indexed, which is the same moment it appears in Storefront API responses.

You can subscribe to both if your systems need each view.

Subscribing

Admin API and Storefront product events use different subscription mechanisms.

Admin API Product Events

Admin API Product Events use the standard webhook subscriptions. You create them through the Admin API:

Storefront Product Events

Storefront Product Events are delivered as webhooks under the producer storefront-api. Each subscription covers one event for one shop country. SCAYLE pre-creates these subscriptions, so you configure an existing one rather than creating it yourself. Subscribing through the SCAYLE Panel is not available yet.

First, list the subscriptions for the producer and find the id for the event and shop country you want:

Then, update that subscription with your endpoint URL and enable it:

FieldMeaning
eventNameThe event this subscription delivers: product-created, product-updated, or product-deleted.
urlYour endpoint that receives the webhook.
target.shopCountryIdThe shop country this subscription covers.
enabledSet to true to start receiving events.
rpmMaximum requests per minute SCAYLE sends to your endpoint.
emailContact address for the subscription.
isInternalfalse for external consumers.
authOptional basic auth credentials SCAYLE sends with each request.
customHeadersOptional headers SCAYLE adds to each request.

Repeat the update for each event and shop country you want to receive.

Pages