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. To receive these events, create a subscription through the Admin API. Subscribing through the SCAYLE Panel is not available yet. For the general producer webhook flow, see Manage Producer Webhooks in the Admin API.

First, list the events that the storefront-api producer offers. The name of each returned event is the value you pass as eventName when you create a subscription:

Then, create a subscription with the event, the shop country, and your endpoint URL:

The response returns the created subscription, including its id. Keep the id to update or delete the subscription later. To see the subscriptions you already created, list the subscriptions for the producer.

FieldMeaning
eventNameRequired. The event this subscription delivers: product-created, product-updated, or product-deleted.
urlRequired. Your endpoint that receives the webhook.
target.shopCountryIdRequired. The shop country this subscription covers. It is the only property target accepts for this producer.
enabledDefaults to true. Set to false to create the subscription without receiving events yet.
rpmMaximum requests per minute SCAYLE sends to your endpoint.
emailAddress SCAYLE notifies about the subscription, for example when it is suspended.
isInternalfalse for external consumers.
authOptional basic auth credentials SCAYLE sends with each request.
customHeadersOptional headers SCAYLE adds to each request.

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

Pages