> 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

# Package: cmsCompliance

# Namespace: complianceReviewRequestV1

# Webhook link: https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-requested.md

# Webhook Permissions Scopes IDs:
Enterprise CMS compliance flow : SCOPE.ENTERPRISE.CMS-COMPLIANCE-MANAGE

## Introduction

Triggered when a user submits multiple CMS compliance actions for review in a single call.
Fires once per call, not once per data item.

---

## REST API

### Schema

```
Webhook: Compliance Review Request Bulk Review Requested
Description: Triggered when a user submits multiple CMS compliance actions for review in a single call. Fires once per call, not once per data item.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
 - name: actionEvent | type: object | description: Custom action event details.
    - name: body | type: BulkReviewRequested | description: The event body.
        - name: bulkComplianceReviewRequest | type: BulkComplianceReviewRequest | description: Submitted batch of compliance review requests.
           - name: complianceReviewRequests | type: array<ComplianceReviewRequest> | description: Submitted compliance review requests, in the same order as the items in the call that created them.
              - name: id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item.
              - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.
                   - enum:
                   -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
                   -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
                   -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
                   -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
                   -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
              - name: currentDataItem | type: DataItem | description: Published (live) version of the data item. Returned for every action except `PUBLISH_DRAFT`.
                 - name: id | type: string | description: Data item GUID.  When an item is inserted into a collection, the item's GUID is automatically assigned a random value. You can optionally provide a custom GUID in `dataItem.id` when inserting the item. If you specify an GUID that already exists in the collection, the insertion will fail.
                 - name: dataCollectionId | type: string | description: GUID of the collection this item belongs to.  This is the user-defined collection identifier set when the collection is created (for example, `EvalCustomers`), not a GUID.
                 - name: data | type: object | description: Data item contents.  Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:  + `_id`: Item GUID. + `_createdDate`: Date and time the item was added to the collection. + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. + `_ownerId`: GUID of the user who created the item. Can be modified with site owner permissions.
              - name: proposedDataItem | type: DataItem | description: Version of the data item proposed by the request. For `PUBLISH_PUBLISHED`, this is the same published item as `current_data_item`. Absent only for `UNPUBLISH_PUBLISHED`.
              - name: submittedAt | type: string | description: Date and time the action was submitted.
              - name: submittedByUserId | type: string | description: GUID of the user who submitted the action.
              - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under.
              - name: versionOnUnpublish | type: VersionOnUnpublish | description: Version to preserve as a draft after a changed item is unpublished. Returned only for `UNPUBLISH_CHANGED` when the caller provides a meaningful value.
                   - enum:
                   -     KEEP_LATEST_DRAFT_VERSION: Preserve the item's latest draft edits.
                   -     KEEP_LIVE_PUBLISHED_VERSION: Preserve the item's current live version.

```

---

## JavaScript SDK

### Schema

```
Webhook: onComplianceReviewRequestBulkReviewRequested
Description: Triggered when a user submits multiple CMS compliance actions for review in a single call. Fires once per call, not once per data item.
Payload: ComplianceReviewRequestBulkReviewRequestedEnvelope
  - name: data | type: BulkReviewRequested | description: none
     - name: bulkComplianceReviewRequest | type: BulkComplianceReviewRequest | description: Submitted batch of compliance review requests.
        - name: complianceReviewRequests | type: array<ComplianceReviewRequest> | description: Submitted compliance review requests, in the same order as the items in the call that created them.
           - name: _id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item.
           - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.
                 - enum:
                 -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
                 -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
                 -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
                 -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
                 -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
           - name: currentDataItem | type: DataItem | description: Published (live) version of the data item. Returned for every action except `PUBLISH_DRAFT`.
              - name: _id | type: string | description: Data item GUID.  When an item is inserted into a collection, the item's GUID is automatically assigned a random value. You can optionally provide a custom GUID in `dataItem.id` when inserting the item. If you specify an GUID that already exists in the collection, the insertion will fail.
              - name: dataCollectionId | type: string | description: GUID of the collection this item belongs to.  This is the user-defined collection identifier set when the collection is created (for example, `EvalCustomers`), not a GUID.
              - name: data | type: object | description: Data item contents.  Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:  + `_id`: Item GUID. + `_createdDate`: Date and time the item was added to the collection. + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. + `_ownerId`: GUID of the user who created the item. Can be modified with site owner permissions.
           - name: proposedDataItem | type: DataItem | description: Version of the data item proposed by the request. For `PUBLISH_PUBLISHED`, this is the same published item as `current_data_item`. Absent only for `UNPUBLISH_PUBLISHED`.
           - name: submittedAt | type: Date | description: Date and time the action was submitted.
           - name: submittedByUserId | type: string | description: GUID of the user who submitted the action.
           - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under.
           - name: versionOnUnpublish | type: VersionOnUnpublish | description: Version to preserve as a draft after a changed item is unpublished. Returned only for `UNPUBLISH_CHANGED` when the caller provides a meaningful value.
                 - enum:
                 -     KEEP_LATEST_DRAFT_VERSION: Preserve the item's latest draft edits.
                 -     KEEP_LIVE_PUBLISHED_VERSION: Preserve the item's current live version.
  - name: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
     - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.

```

### Examples


```javascript
import { enterpriseCmsCompliance } from '@wix/enterprise-cms-compliance';

enterpriseCmsCompliance.onComplianceReviewRequestBulkReviewRequested((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { enterpriseCmsCompliance } from '@wix/enterprise-cms-compliance';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      enterpriseCmsCompliance,
    },
});

wixClient.enterpriseCmsCompliance.onComplianceReviewRequestBulkReviewRequested((event) => {
    // handle your event here
});
```

---