Skip to main content
This reference lists the workflows for the Review domain. Import them from @mercurjs/core/workflows and run them against the Medusa container.

Review workflows

Each workflow supports compensation: createReviewWorkflow deletes the review it created on failure, updateReviewWorkflow and respondReviewWorkflow restore the previous values, and deleteReviewWorkflow restores the soft-deleted row.
createReviewWorkflow validates that the order belongs to the customer and that the target hasn’t already been reviewed on that order. respondReviewWorkflow refuses to overwrite an existing response.
To work with records directly instead of through a workflow, see the Service reference. To run side effects when a review changes, see the Event reference.