Skip to main content

BulkOperation

Supported actions: create, update

Subscribe to field-level changes on the BulkOperation GraphQL Admin API object.

Each topic corresponds to a commerce resource that can exist independently within its domain. Child entities that depend on a parent within the same domain don't have their own topic. Instead, changes to child entities trigger a delivery on the parent topic. Calculated fields, derived fields, auto-updated timestamps, and cross-domain fields aren't available as triggers.

Your app receives BulkOperation events only for bulk operations that it starts on the store. Shopify doesn't deliver events for operations that your app starts with an online access token.

shopify.app.toml

[events]
api_version = "unstable"

[[events.subscription]]
handle = "my_bulk_operation_event"

topic = "BulkOperation"
actions = ["update"]
triggers = ["bulkOperation.status"]

uri = "https://your-app.com/events"

query = """
query bulkOperation_event_payload($bulkOperationId: ID!) {
bulkOperation(id: $bulkOperationId) {
id
status
}
}
"""

Field-level triggers for BulkOperation subscriptions.

Subscriptions can include multiple triggers. Use the shopify-webhook-id header for deduplication when handling duplicate deliveries.

Custom queries aren't limited to BulkOperation. They can query the full GraphQL Admin API.

Anchor to list-of-topics-bulkOperation.*
bulkOperation.*

Fires when events involve the BulkOperation object.

The "create" action is only relevant within the context of this parent topic. Define a custom query to retrieve specific fields from create events.

bulkOperation.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under bulkOperation, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Variables: bulkOperationId

Anchor to list-of-topics-bulkOperation.status
bulkOperation.status

Fires when the status field on the BulkOperation object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

Status of the bulk operation.

Variables: bulkOperationId


Was this page helpful?