> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Review

> Collect, moderate, and surface customer ratings for products and sellers.

Use Mercur to let customers rate the products they bought and the stores they
bought from.

The Review domain captures a single rating model that points at either a product
or a seller. It ties each review back to the order that earned it, and it moves
through a moderation lifecycle before it goes public. Stores can respond to their
reviews, and aggregate ratings roll up onto public seller and product pages. All
of it is exposed directly through the Admin, Vendor, and Store APIs.

<Note>
  **One model, two targets.** A single `Review` entity (id prefix `rev`) covers
  both product and seller reviews. A `reference` discriminator decides which one
  a given review is about. There is no separate product-review or seller-review
  table.
</Note>

## Key features

* **Product & seller reviews:** one rating model, discriminated by a `reference` field.
* **Order-backed:** every review is linked to the order that earned it, with one review per target per order.
* **Moderation lifecycle:** reviews start `pending` and are moderated to `published` or `rejected`.
* **Store responses:** a store can attach a single public response to each of its reviews.
* **Aggregate ratings:** average ratings computed per product and per seller for storefront display.
* **Customer notes:** an optional free-text note alongside the numeric rating.

## Get started

Learn how the domain fits together.

<CardGroup cols={2}>
  <Card title="The review model" icon="star" href="/platform/review/concepts/the-review-model">
    The single review entity, its rating, notes, and status.
  </Card>

  <Card title="Product vs seller reviews" icon="tags" href="/platform/review/concepts/product-vs-seller-reviews">
    The reference discriminator and the links that anchor each review.
  </Card>

  <Card title="Ratings & moderation" icon="gauge" href="/platform/review/concepts/ratings-and-moderation">
    The status lifecycle, store responses, and aggregate ratings.
  </Card>
</CardGroup>

## Examples

Build against the Review domain in your own code.

<CardGroup cols={2}>
  <Card title="Create a review" icon="plus" href="/platform/review/guides/create-a-review">
    Run `createReviewWorkflow` from a route or script.
  </Card>

  <Card title="Moderate a review" icon="gavel" href="/platform/review/guides/moderate-a-review">
    Publish, reject, and delete reviews in code.
  </Card>

  <Card title="Respond to a review" icon="reply" href="/platform/review/guides/respond-to-a-review">
    Attach a store's response with `respondReviewWorkflow`.
  </Card>

  <Card title="Aggregate ratings" icon="calculator" href="/platform/review/guides/compute-aggregate-ratings">
    Compute average ratings for products and sellers.
  </Card>
</CardGroup>

## Resources

Data models, links, workflows, service methods, and events for the Review domain.

<CardGroup cols={2}>
  <Card title="Data models" icon="table" href="/platform/review/reference/data-models">
    The `Review` entity and its fields.
  </Card>

  <Card title="Links" icon="link" href="/platform/review/reference/links">
    How reviews link to products, sellers, orders, and customers.
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/platform/review/reference/workflows">
    Create, update, respond, and delete workflows.
  </Card>

  <Card title="Service" icon="gear" href="/platform/review/reference/service">
    Module service methods, including aggregate-rating helpers.
  </Card>

  <Card title="Events" icon="bell" href="/platform/review/reference/events">
    Running side effects as reviews change.
  </Card>
</CardGroup>
