> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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/account-level/enterprise/cms-compliance/compliance-review-request-v1/sample-flows.md

## Article Content:

# CMS Compliance: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

## Review CMS content changes for compliance

When a user changes content, you can review the change before deciding whether it should stand. The review request gives you both the live version and the proposed version, so you can see exactly what is changing.

To review a content change:

1. Subscribe to the [Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-review-requested.md) webhook.
1. When a user submits a publishing or unpublishing workflow, the CMS host calls [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md), and you receive a Review Requested event.
1. Read the `action` to see what the user did.
1. Compare `currentDataItem`, the live version, with `proposedDataItem`, the version submitted for approval. For `PUBLISH_DRAFT`, only `proposedDataItem` is present. For `UNPUBLISH_PUBLISHED`, only `currentDataItem` is present.
1. For `UNPUBLISH_CHANGED`, read `versionOnUnpublish` to determine whether the user chose to preserve the latest draft edits or the live published version. It's always present for this action.
1. Apply your review decision in your own system, using `submittedByUserId` and `submittedAt` to record who submitted the change and when. The submission events also carry `submittedByEmail` where the address could be resolved; it's omitted otherwise, and it isn't repeated on the approval or rejection events, so capture it when the review is submitted and keep `submittedByUserId` as the identifier you store.

## Review a batch of CMS content changes in one call

When a user submits several items from the same collection at once, the whole selection arrives as one event instead of one event per item. This keeps a multi-item submission together, so you can review it as the single unit of work the user intended.

To review a batch of content changes:

1. Subscribe to the [Bulk Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-requested.md) webhook. Subscribing to [Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-review-requested.md) doesn't deliver batches.
1. When a user submits a selection of items, the CMS host calls [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md) with the shared `collectionId` and one entry per item, and you receive a single Bulk Review Requested event.
1. Read `bulkComplianceReviewRequest.complianceReviewRequests` to get every review request in the batch, in the order the items were submitted.
1. Iterate over the list and read each request's `action`, because a single batch can combine actions. Compare `currentDataItem` and `proposedDataItem` per request exactly as you would for a single review.
1. Apply your review decision in your own system. Because the call is all-or-nothing, receiving the event means every item in the batch was fetched successfully, so you never need to reconcile a partially delivered batch.

## Approve a content change and publish it

Once a reviewer accepts a change, the content still has to go live. Approving a review request applies the action the user originally requested, so you don't have to work out which CMS call each item needs.

To approve a content change and publish it:

1. Receive a [Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-review-requested.md) or [Bulk Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-requested.md) event and present the change to your reviewer.
1. Collect the compliance review requests the reviewer accepted. Group them by collection, because a single call settles items from one collection.
1. For each `UNPUBLISH_CHANGED` request, send back the `versionOnUnpublish` the submitter chose, or override it with `KEEP_LATEST_DRAFT_VERSION` or `KEEP_LIVE_PUBLISHED_VERSION` if the reviewer wants a different version preserved as the saved draft.
1. Call [Bulk Approve Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-approve-request-review.md) with the collection's published ID as `prodCollectionId` and the accepted requests as `items`. Each item's action is applied: publish items go live, and unpublish items are retracted.
1. Read `publishResult` and `unpublishResult` to confirm the content change for each item, matching entries to your request through `itemMetadata.originalIndex`.
1. Read `statusUpdateResults` to confirm each item's `requestReviewStatus` is now `APPROVED`. Read it here rather than from the returned review requests, whose data items are read before the status is written. Don't treat the status as proof the content changed: a `PUBLISH_*` item's status is set before it's published, so it can be `APPROVED` with its publish still having failed. Retry any item that `publishResult` or `unpublishResult` reports as failed.

## Reject a content change

When a reviewer turns a change down, the content must stay as it is while the decision is still recorded. Rejecting a review request writes the decision to the data item without touching its content.

To reject a content change:

1. Receive a [Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-review-requested.md) or [Bulk Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-requested.md) event and present the change to your reviewer.
1. Collect the compliance review requests the reviewer turned down, grouped by collection.
1. Call [Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md) with the collection's published ID as `prodCollectionId` and the rejected requests as `items`. Nothing is published or unpublished, so each item's content is left exactly as it was.
1. Read `statusUpdateResults` to confirm each item's `requestReviewStatus` is now `REJECTED`, matching entries to your request through `itemMetadata.originalIndex`. As with approving, read the status here rather than from the returned review requests.
1. Subscribe to the [Bulk Review Rejected](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-rejected.md) webhook to notify your other systems of the decision. The event fires once per call and carries the same results the call returns.

## Forward content changes to an external compliance system

If you maintain an external audit or compliance system, you can keep it in sync with every reviewable content change on the site.

To forward content changes to an external system:

1. Subscribe to the [Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-review-requested.md) and [Bulk Review Requested](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-requested.md) webhooks, so that both single submissions and batches reach your system.
1. On each event, extract the `complianceReviewRequest` object, or for a batch, each object in `bulkComplianceReviewRequest.complianceReviewRequests`. Include the `action`, `currentDataItem`, `proposedDataItem`, `versionOnUnpublish` for `UNPUBLISH_CHANGED` items, `submittedByUserId`, and `submittedByEmail` when it's present.
1. Transform the data into your external system's format.
1. Send the transformed records to your external system.