Skip to main content
The offer and offer condition workflows emit events after they write. Subscribe to them to reindex search, sync an external system, or start a follow-up workflow instead of polling.

Offer events

The offer workflows emit one event per affected offer. The names come from OfferWorkflowEvents.
upsertOfferPricesWorkflow emits no event of its own. When updateOffersWorkflow runs it, offer.updated covers the change. When you run it directly, use its offerPricesUpserted hook.

Offer condition events

The condition workflows emit one event per condition. The names come from OfferConditionWorkflowEvents.

Subscribe to an offer event

A subscriber receives the payload and the container. This one reads the new offer with its store.
src/subscribers/offer-created.ts
Payloads carry ids only, so query the offer for the fields you need. For an offer.deleted subscriber, read values from the offersDeleted hook instead, since the row is already soft-deleted.