> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flows ## Article: Sample Flows ## Article Link: https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/reviews/reviews/sample-flows.md ## Article Content: # Reviews: Sample Use Cases and Flows This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation. ## Real-time 2-way sync with an external eCommerce solution Wix users can keep reviews from an external eCommerce solution up to date with their reviews on Wix with a 2-way sync. Synchronize Wix and the eCommerce solution with these flows: - Initial setup - Synchronize to the eCommerce solution - Synchronize to Wix ### Initial setup Create mappings for the following from the Wix site to the eCommerce solution using common fields so the reviews can sync: - Wix site entities to entities in the eCommerce solution. - Wix site Contact IDs to author IDs in the eCommerce solution, for example using email addresses. - Wix review fields to the review fields in the eCommerce solution for example, title, body, author. Store the mappings on your server. Then follow these flows to create the 2-way sync. ### Synchronize to the eCommerce solution Listen for a change in Wix reviews with the following: - [Review Created](https://dev.wix.com/docs/rest/crm/community/reviews/reviews/review-created.md) - [Review Updated](https://dev.wix.com/docs/rest/crm/community/reviews/reviews/review-updated.md) - [Review Moderation Status Changed](https://dev.wix.com/docs/rest/crm/community/reviews/reviews/review-moderation-status-changed.md) - [Review Deleted](https://dev.wix.com/docs/rest/crm/community/reviews/reviews/review-deleted.md) When one of the events is triggered, you receive the review in the response. You can send those changes to the eCommerce solution with a flow like this: 1. Get the `slug` which tells you what the event was, `entityId`, and other relevant information from the response. 2. Use the mappings from the [initial setup](#initial-setup) to send the relevant information to the eCommerce solution. 3. Ignore the resulting event from the eCommerce solution so you don't create an endless loop of updates. ### Synchronize to Wix Listen for review events from the eCommerce solution. When you receive a change it needs to synchronize, follow this basic flow: 1. Use the [Contacts API](https://dev.wix.com/api/rest/contacts) to check if the review author has a contact ID on the Wix site. 2. The Reviews API allows only 1 review for each entity per contact. Use the mappings from the [initial setup](#initial-setup) to filter out imported reviews if there is already a Wix site review from the contact for the entity. 3. Use the mappings from the [initial setup](#initial-setup) and call [Create Review](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/reviews/reviews/create-review.md) if the author is a contact. 4. Ignore the resulting event from Wix so you don't create an endless loop of updates. ## Display review media in a widget > **Note:** This flow requires [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks.md). To create a media gallery of photos from reviews, retrieve images from reviews, and then display them in media layout: 1. Use [Query Reviews](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/reviews/reviews/query-reviews.md) to retrieve reviews that have media. 2. Extract the `image.url` from the response and use the [Media API](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files.md) to retrieve the media. 3. Display the retrieved media items in gallery layout in a widget using Wix Blocks. Learn more about [Wix Blocks design](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/widget-design/blocks-widget-design-guidelines.md). ## Get immediate updates of negative customer feedback To receive timely customer feedback, gain insights into product satisfaction, and identify areas for improvement: 1. Listen for new reviews with [Review Created](https://dev.wix.com/docs/rest/crm/community/reviews/reviews/review-created.md). 2. Get the `entityId`, `content`, and any other relevant information from the response. 3. Extract reviews from the response that have a `content.rating` less than 3. 4. Provide the extracted review IDs to the Wix user so they can reply in the dashboard. ## Display the most helpful product reviews in a widget > **Note:** This flow requires [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks.md). To display the most helpful reviews to promote products: 1. Use [Query Reviews](https://dev.wix.com/docs/rest/crm/community/reviews/reviews/query-reviews.md) to get a list of the 10 most helpful reviews, sorted by most to least helpful. 2. Display the retrieved reviews in a widget using Wix Blocks. Learn more about [Wix Blocks design](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/widget-design/blocks-widget-design-guidelines.md).