Skip to main content

Requests Events Reference

This documentation page includes the list of all events emitted by the Requests Module’s workflows.

Request Status Events

Summary

EventDescription
requests..Dynamic event emitted when a request’s status changes. The event name is composed of the request type and new status.
requests.product.acceptedEmitted when a product creation request is accepted.
requests.product.rejectedEmitted when a product creation request is rejected.
requests.product.pendingEmitted when a product creation request status is set to pending.
requests.product.draftEmitted when a product creation request status is set to draft.
requests.product_update.acceptedEmitted when a product update request is accepted.
requests.product_update.rejectedEmitted when a product update request is rejected.
requests.product_update.pendingEmitted when a product update request status is set to pending.
requests.product_update.draftEmitted when a product update request status is set to draft.
requests.product_category.acceptedEmitted when a product category creation request is accepted.
requests.product_category.rejectedEmitted when a product category creation request is rejected.
requests.product_category.pendingEmitted when a product category creation request status is set to pending.
requests.product_category.draftEmitted when a product category creation request status is set to draft.
requests.product_collection.acceptedEmitted when a product collection creation request is accepted.
requests.product_collection.rejectedEmitted when a product collection creation request is rejected.
requests.product_collection.pendingEmitted when a product collection creation request status is set to pending.
requests.product_collection.draftEmitted when a product collection creation request status is set to draft.
requests.product_type.acceptedEmitted when a product type creation request is accepted.
requests.product_type.rejectedEmitted when a product type creation request is rejected.
requests.product_type.pendingEmitted when a product type creation request status is set to pending.
requests.product_type.draftEmitted when a product type creation request status is set to draft.
requests.product_tag.acceptedEmitted when a product tag creation request is accepted.
requests.product_tag.rejectedEmitted when a product tag creation request is rejected.
requests.product_tag.pendingEmitted when a product tag creation request status is set to pending.
requests.product_tag.draftEmitted when a product tag creation request status is set to draft.
requests.seller.acceptedEmitted when a seller account creation request is accepted.
requests.seller.rejectedEmitted when a seller account creation request is rejected.
requests.seller.pendingEmitted when a seller account creation request status is set to pending.
requests.seller.draftEmitted when a seller account creation request status is set to draft.
requests.review_remove.acceptedEmitted when a review removal request is accepted.
requests.review_remove.rejectedEmitted when a review removal request is rejected.
requests.review_remove.pendingEmitted when a review removal request status is set to pending.
requests.review_remove.draftEmitted when a review removal request status is set to draft.

requests..

Dynamic event emitted when a request’s status changes. The event name is composed of the request type (e.g., product, product_update, product_category, seller) and the new status (e.g., accepted, rejected, pending, draft).

Payload

{
  id, // The ID of the request
  type, // The type of the request
  status, // The new status of the request
  data, // The request data
  submitter_id, // The ID of the submitter
  reviewer_id, // The ID of the reviewer (if applicable)
  reviewer_note, // The reviewer's note (if applicable)
  created_at, // The creation date
  updated_at, // The last update date
}

Workflows Emitting this Event

The following workflows emit this event when they’re executed. These workflows are executed by the application’s API routes.

Request Creation Events

Summary

EventDescription
requests.*.createdWildcard event emitted when any type of request is created.
requests.seller.createdEmitted when a seller account creation request is created.
requests.product.createdEmitted when a product creation request is created.
requests.product_update.createdEmitted when a product update request is created.

requests.*.created

Wildcard event emitted when any type of request is created. This event can be used to handle all request creations uniformly.

Payload

{
  type, // The type of request
  data, // The request data
  submitter_id, // The ID of the submitter
  status, // The initial status (typically "pending")
}

Workflows Emitting this Event

The following workflows emit this event when they’re executed. These workflows are executed by the application’s API routes.

requests.seller.created

Emitted when a seller account creation request is created.

Payload

{
  type, // The request type ("seller")
  data, // The seller data to be created upon approval
  submitter_id, // The ID of the submitter
  status, // The initial status
}

Workflows Emitting this Event

The following workflows emit this event when they’re executed. These workflows are executed by the application’s API routes.

requests.product.created

Emitted when a product creation request is created.

Payload

{
  id, // The ID of the request
}

Workflows Emitting this Event

The following workflows emit this event when they’re executed. These workflows are executed by the application’s API routes.

requests.product_update.created

Emitted when a product update request is created.

Payload

{
  id, // The ID of the request
}

Workflows Emitting this Event

The following workflows emit this event when they’re executed. These workflows are executed by the application’s API routes.

Review Events

Summary

EventDescription
requests.review.removedEmitted when a review removal request is accepted and the review should be removed.

requests.review.removed

Emitted when a review removal request is accepted and the review should be removed. This event triggers the actual review deletion in the review module.

Payload

{
  id, // The ID of the review to remove
}

Workflows Emitting this Event

The following workflows emit this event when they’re executed. These workflows are executed by the application’s API routes.

Notes

Dynamic Event Pattern

The Requests Module uses a dynamic event naming pattern for status updates: requests.{type}.{status}. This means that when a request’s status changes, an event is emitted with a name that includes both the request type and the new status. Request Types:
  • product - Product creation requests
  • product_update - Product update requests
  • product_category - Product category creation requests
  • product_collection - Product collection creation requests
  • product_type - Product type creation requests
  • product_tag - Product tag creation requests
  • seller - Seller account creation requests
  • review_remove - Review removal requests
Status Values:
  • accepted - Request has been approved
  • rejected - Request has been denied
  • pending - Request is awaiting review
  • draft - Request is in draft status
This allows subscribers to listen to specific combinations, such as:
  • requests.product.accepted - When a product request is accepted
  • requests.seller.rejected - When a seller registration is rejected
  • Or use wildcard patterns to handle multiple events