> 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 # BulkReportEvent # Package: triggers # Namespace: EsbConfigResolver # Method link: https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/bulk-report-event.md ## Permission Scopes: Set Up Automations: SCOPE.CRM.SETUP-AUTOMATIONS ## Introduction Bulk reports events and activates site automations with the specified trigger key. --- ## REST API ### Schema ``` Method: bulkReportEvent Description: Bulk reports events and activates site automations with the specified trigger key. URL: https://www.wixapis.com/automations/v1/events/bulk-report Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: triggerKey, eventsInfo Method parameters: param name: eventsInfo | type: array | description: Repeated list of event details for bulk reporting. | required: true - name: payload | type: object | description: Event payload, formatted as key:value pairs. Must comply with the payload schema if you provided one when configuring your trigger. - name: externalEntityId | type: string | description: GUID of the related resource in GUGUID format. - name: idempotency | type: Idempotency | description: Idempotency information for the event. - name: key | type: string | description: A unique identifier for the event. If you send the same idempotency key in multiple report event requests, for the same trigger key and app id, consecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires. - name: ttlInMilliseconds | type: string | description: Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week. param name: triggerKey | type: triggerKey | description: Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`. | required: true Return type: BulkReportEventResponse - name: triggerKey | type: string | description: Trigger key associated with the event. - name: results | type: array | description: List of results for each item in the bulk report event request. - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual item in the request. - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: eventInfo | type: EventInfo | description: Event details for the item in the request. - name: payload | type: object | description: Event payload, formatted as key:value pairs. Must comply with the payload schema if you provided one when configuring your trigger. - name: externalEntityId | type: string | description: GUID of the related resource in GUGUID format. - name: idempotency | type: Idempotency | description: Idempotency information for the event. - name: key | type: string | description: A unique identifier for the event. If you send the same idempotency key in multiple report event requests, for the same trigger key and app id, consecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires. - name: ttlInMilliseconds | type: string | description: Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the overall bulk action, including success and failure counts. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.triggers.EsbConfigResolver.bulkReportEvent(triggerKey, eventsInfo) Description: Bulk reports events and activates site automations with the specified trigger key. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: triggerKey, eventsInfo Method parameters: param name: eventsInfo | type: array | description: Repeated list of event details for bulk reporting. | required: true - name: payload | type: object | description: Event payload, formatted as key:value pairs. Must comply with the payload schema if you provided one when configuring your trigger. - name: externalEntityId | type: string | description: GUID of the related resource in GUGUID format. - name: idempotency | type: Idempotency | description: Idempotency information for the event. - name: key | type: string | description: A unique identifier for the event. If you send the same idempotency key in multiple report event requests, for the same trigger key and app id, consecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires. - name: ttlInMilliseconds | type: string | description: Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week. param name: triggerKey | type: string | description: Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`. | required: true Return type: PROMISE - name: triggerKey | type: string | description: Trigger key associated with the event. - name: results | type: array | description: List of results for each item in the bulk report event request. - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual item in the request. - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: eventInfo | type: EventInfo | description: Event details for the item in the request. - name: payload | type: object | description: Event payload, formatted as key:value pairs. Must comply with the payload schema if you provided one when configuring your trigger. - name: externalEntityId | type: string | description: GUID of the related resource in GUGUID format. - name: idempotency | type: Idempotency | description: Idempotency information for the event. - name: key | type: string | description: A unique identifier for the event. If you send the same idempotency key in multiple report event requests, for the same trigger key and app id, consecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires. - name: ttlInMilliseconds | type: string | description: Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the overall bulk action, including success and failure counts. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkReportEvent ```javascript import { activations } from '@wix/automations'; async function bulkReportEvent(triggerKey,eventsInfo) { const response = await activations.bulkReportEvent(triggerKey,eventsInfo); }; ``` ### bulkReportEvent (with elevated permissions) ```javascript import { activations } from '@wix/automations'; import { auth } from '@wix/essentials'; async function myBulkReportEventMethod(triggerKey,eventsInfo) { const elevatedBulkReportEvent = auth.elevate(activations.bulkReportEvent); const response = await elevatedBulkReportEvent(triggerKey,eventsInfo); } ``` ### bulkReportEvent (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { activations } from '@wix/automations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { activations }, // Include the auth strategy and host as relevant }); async function bulkReportEvent(triggerKey,eventsInfo) { const response = await myWixClient.activations.bulkReportEvent(triggerKey,eventsInfo); }; ``` ---