Skip to main content
Mercur defines no review events of its own, and the review workflows don’t call emitEventStep. The Review module service emits Medusa’s standard mutation events instead, because every method MedusaService generates publishes an event when it changes a Review row. Subscribe to these to notify a store, refresh a search index, or recompute a cached rating.

Event list

Event names follow Medusa’s <module>.<model>.<action> pattern, with the module and the model both named review: The payload holds only the review id. Load the review in the subscriber when you need its fields or links.
review.review.updated doesn’t say which field changed. A moderation, a customer edit, and a store answer all emit the same event, so compare against your own state when you need to tell them apart.

Subscribe to an event

Create a subscriber that loads the review and its links:
src/subscribers/review-created.ts
This logs each new review. Replace the log with your side effect, such as a notification to review.seller.email for a store review.

Emit a named event

To give a moderation step its own event, wrap updateReviewWorkflow in your own workflow and add Medusa’s emitEventStep:
src/workflows/publish-review.ts
review.published is a name you define, so subscribe to the same string.