> 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: feedbackModeration # Namespace: reportsV2 # Webhook link: https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/reports-v2/report-updated.md ## Introduction Triggered when a report is updated. --- ## REST API ### Schema ``` Webhook: Report Updated Description: Triggered when a report is updated. 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: updatedEvent | type: object | description: Updated event details. - name: currentEntity | type: Report | description: The entity after the update. - name: id | type: string | description: Report GUID. - name: entityName | type: string | description: Reported entity name, such as `comment`. - name: entityId | type: string | description: Reported entity GUID. - name: identity | type: IdentificationData | description: Identity of who created a report. - 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: identityType | type: IdentityType | description: Identity type - enum: - ANONYMOUS_VISITOR: A site visitor who has not logged in. - MEMBER: A logged-in site member. - name: reason | type: Reason | description: Reason for the report. - name: reasonType | type: Type | description: Report reason type. - enum: - UNKNOWN_TYPE: Unknown type. This value is not used. - OTHER: Entity is reported for other reasons. Specify in `details`. - SPAM: Entity is reported for spam. - NUDITY_OR_SEXUAL_HARASSMENT: Entity is reported for nudity or sexual harassment. - HATE_SPEECH_OR_SYMBOLS: Entity is reported for hate speech. - FALSE_INFORMATION: Entity is reported for false information. - COMMUNITY_GUIDELINES_VIOLATION: Entity is reported for a community guideline violation. - VIOLENCE: Entity is reported for violence. - SUICIDE_OR_SELF_INJURY: Entity is reported for mentioning suicide. - UNAUTHORIZED_SALES: Entity is reported for unuathorized sales. - EATING_DISORDER: Entity is reported for mentioning an eating disorder. - INVOLVES_A_CHILD: Entity is reported for involving a minor. - TERRORISM: Entity is reported for mentioning terrorism. - DRUGS: Entity is reported for mentioning drugs. - UNLAWFUL: Entity is reported for unlawful actions. - EXPOSING_IDENTIFYING_INFO: Entity is reported for exposing identifying details. - name: details | type: string | description: Why the entity is reported. - name: revision | type: string | description: Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule. - name: createdDate | type: string | description: Date and time when the report created. - name: updatedDate | type: string | description: Date and time when the report updated. - name: extendedFields | type: ExtendedFields | description: Custom field data for the report object. **Note:** You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). ``` ### Examples ```curl { "id": "87c0d894-4ed1-4c75-b167-27b7622558d2", "entityFqdn": "wix.reports.v2.report", "slug": "updated", "entityId": "89f3da66-abcb-4b0f-bb1d-68ce0faaaa12", "updatedEvent": { "currentEntity": { "id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9", "entityName": "comment", "entityId": "50353fbc-b265-4f03-888f-a53aa272758d", "identity": { "identityType": "MEMBER", "memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897" }, "reason": { "reasonType": "DRUGS", "description": "This person promotes drug usage." }, "revision": "1", "createdDate": "2021-10-26T17:22:10.299Z", "updatedDate": "2021-10-26T17:22:10.299Z" } }, "eventTime": "2021-01-27T11:23:43.804694Z", "triggeredByAnonymizeRequest": false } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onReportUpdated Description: Triggered when a report is updated. Payload: ReportUpdatedEnvelope - name: entity | type: Report | description: none - name: _id | type: string | description: Report GUID. - name: entityName | type: string | description: Reported entity name, such as `comment`. - name: entityId | type: string | description: Reported entity GUID. - name: identity | type: IdentificationData | description: Identity of who created a report. - 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: identityType | type: IdentityType | description: Identity type - enum: - ANONYMOUS_VISITOR: A site visitor who has not logged in. - MEMBER: A logged-in site member. - name: reason | type: Reason | description: Reason for the report. - name: reasonType | type: Type | description: Report reason type. - enum: - UNKNOWN_TYPE: Unknown type. This value is not used. - OTHER: Entity is reported for other reasons. Specify in `details`. - SPAM: Entity is reported for spam. - NUDITY_OR_SEXUAL_HARASSMENT: Entity is reported for nudity or sexual harassment. - HATE_SPEECH_OR_SYMBOLS: Entity is reported for hate speech. - FALSE_INFORMATION: Entity is reported for false information. - COMMUNITY_GUIDELINES_VIOLATION: Entity is reported for a community guideline violation. - VIOLENCE: Entity is reported for violence. - SUICIDE_OR_SELF_INJURY: Entity is reported for mentioning suicide. - UNAUTHORIZED_SALES: Entity is reported for unuathorized sales. - EATING_DISORDER: Entity is reported for mentioning an eating disorder. - INVOLVES_A_CHILD: Entity is reported for involving a minor. - TERRORISM: Entity is reported for mentioning terrorism. - DRUGS: Entity is reported for mentioning drugs. - UNLAWFUL: Entity is reported for unlawful actions. - EXPOSING_IDENTIFYING_INFO: Entity is reported for exposing identifying details. - name: details | type: string | description: Why the entity is reported. - name: revision | type: string | description: Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule. - name: _createdDate | type: Date | description: Date and time when the report created. - name: _updatedDate | type: Date | description: Date and time when the report updated. - name: extendedFields | type: ExtendedFields | description: Custom field data for the report object. **Note:** You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - 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 { reports } from '@wix/reports'; reports.onReportUpdated((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { reports } from '@wix/reports'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { reports, }, }); wixClient.reports.onReportUpdated((event) => { // handle your event here }); ``` ---