Flow: Reviews and Moderation

This article outlines the flow for moderating site visitor reviews using the Reviews and Moderation Rules APIs. It covers creating reviews, setting up automated moderation, and handling flagged content.

Note: On Wix sites, you can manage and moderate reviews with the Wix Reviews app.

Before you begin

It's important to note the following points before starting to code:

  • Reviews are only integrated with Wix Stores. Wix Stores must be installed on a site.
  • Products must exist in the store. See the Products API for more information.
  • Each review requires a contact ID. See the Contacts API for more information.

Reviews and moderation flow

The following diagram shows the full reviews and moderation flow.

Reviews and Moderation Flow

Step-by-step implementation

The following steps describe the complete flow for creating reviews with automated moderation and handling reviews that require manual approval.

Step 1 | Set up moderation rules

Create moderation rules that define how reviews are evaluated after being submitted. Each rule pairs a trigger with an action. For example, to manually moderate reviews that include images, create a rule with trigger.contentFeaturesOptions.images set to true and action.type set to NEEDS_MANUAL_APPROVAL.

Action: Call Create Rule.

Result: Moderation rule created.

Step 2 | Create reviews

Reviews are created when site visitors submit them through a form, or when you programmatically create them via the Reviews API.

Action: Call Create Review. To import or migrate multiple reviews, call Bulk Create Review.

Result: Review created with a moderation status of SUBMITTED. Continue to Step 3.

Step 3 | Moderation evaluates review content

Action: The system automatically checks the submitted review against active moderation rules:

  • If no rule is triggered, the moderationStatus of the review is updated to APPROVED.
  • If action.type is REJECT, the moderationStatus of the review is updated to REJECTED.
  • If action.type is NEEDS_MANUAL_APPROVAL, the moderationStatus of the review is updated to IN_MODERATION.

Possible results:

  • Review is approved and published. Flow ends.
  • Review is rejected. Flow Ends.
  • Review requires manual evaluation. Continue to Step 4.

Step 4 | Query reviews pending manual moderation

Retrieve reviews that require manual moderation and evaluate their content.

Action: Call Query Reviews with a filter for moderation.moderationStatus equal to IN_MODERATION. Use the returned review content for evaluation.

Result: A list of reviews requiring manual evaluation.

Step 5 | Update the moderation status

For each review, evaluate its content, decide to approve or reject, and update its status accordingly.

Action: For each review, call Update Moderation Status with reviewId set to that review's ID. To process multiple reviews at once, call Bulk Update Moderation Status.

Possible Results:

  • The review is approved and published. Flow ends.
  • The review is rejected. Flow ends.

Results

After implementing this flow, you have a review moderation system that automatically evaluates reviews against moderation rules and provides a workflow for manually evaluating flagged content.

See also

Did this help?