Skip to main content

OnlineStoreTheme

Requires read_themes access scope.

Supported actions: create, update, delete

Subscribe to field-level changes on the OnlineStoreTheme 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.

shopify.app.toml

[events]
api_version = "unstable"

[[events.subscription]]
handle = "my_online-store-theme_event"

topic = "OnlineStoreTheme"
actions = ["update"]
triggers = ["onlineStoreTheme.name"]

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

query = """
query theme_event_payload($onlineStoreThemeId: ID!) {
theme(id: $onlineStoreThemeId) {
id
name
}
}
"""

Field-level triggers for OnlineStoreTheme subscriptions.

All triggers require the read_themes access scope. Those triggers that require additional scopes are documented where relevant. Deprecated triggers are listed last.

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

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

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

Fires when events involve the OnlineStoreTheme object.

The "create" and "delete" actions are only relevant within the context of this parent topic. Use fields_changed to follow or replicate impacted data after a delete event. Define a custom query to retrieve specific fields from create events.

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

Variables: onlineStoreThemeId

Anchor to list-of-topics-onlineStoreTheme.name
onlineStoreTheme.name

Fires when the name field on the OnlineStoreTheme 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.

The name field represents the name of the theme, set by the merchant.

Variables: onlineStoreThemeId

Anchor to list-of-topics-onlineStoreTheme.processing
onlineStoreTheme.processing

Fires when the processing field on the OnlineStoreTheme 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.

The processing field indicates whether the theme is processing.

Variables: onlineStoreThemeId

Anchor to list-of-topics-onlineStoreTheme.role
onlineStoreTheme.role

Fires when the role field on the OnlineStoreTheme 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.

The role field represents the role of the theme.

Variables: onlineStoreThemeId


Was this page helpful?