Skip to main content

MetaobjectDefinition

Requires read_metaobject_definitions access scope.

Subscribe to field-level changes on the MetaobjectDefinition GraphQL Admin API object. You can subscribe to create, delete, and update events, and to changes to specific fields.

Each topic corresponds to a commerce resource, such as a metaobject definition, 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.

You can't use calculated fields, derived fields, auto-updated timestamps, or cross-domain fields as triggers.

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

You can use custom queries to query the full GraphQL Admin API, not only MetaobjectDefinition.

shopify.app.toml

[events]
api_version = "unstable"

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

topic = "MetaobjectDefinition"
actions = ["update"]
triggers = [
"metaobjectDefinition.displayNameKey",
"metaobjectDefinition.name"
]

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

query = """
query metaobject_definition_details($metaobjectDefinitionType: String!) {
metaobjectDefinitionByType(type: $metaobjectDefinitionType) {
id
displayNameKey
name
}
}
"""

MetaobjectDefinition subscriptions support the following field-level triggers.

Anchor to list-of-topics-metaobjectDefinition
metaobjectDefinition

Fires when events involve the MetaobjectDefinition 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.

Collect details about changes to the object by subscribing to the trigger along with the "update" action, though it's recommended that you narrow your subscription to one of the other triggers below.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.access
metaobjectDefinition.access

Fires when the access field on the MetaobjectDefinition 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.

Access configuration for the metaobject definition.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.access.admin
metaobjectDefinition.access.admin

Fires when the admin field on the MetaobjectAccess 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 admin field represents the access permitted on the Admin API.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.access.customerAccount
metaobjectDefinition.access.customerAccount

Fires when the customerAccount field on the MetaobjectAccess 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 customerAccount field represents the access permitted on the Customer Account API.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.access.storefront
metaobjectDefinition.access.storefront

Fires when the storefront field on the MetaobjectAccess 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 storefront field represents the access permitted on the Storefront API.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities
metaobjectDefinition.capabilities

Fires when the capabilities field on the MetaobjectDefinition 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 capabilities field represents the capabilities of the metaobject definition.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.onlineStore
metaobjectDefinition.capabilities.onlineStore

Fires when the onlineStore field on the MetaobjectCapabilities 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.

Indicates whether a metaobject definition can be displayed as a page on the Online Store.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.onlineStore.data
metaobjectDefinition.capabilities.onlineStore.data

Fires when the data field on the MetaobjectCapabilitiesOnlineStore 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 data field represents the data associated with the Online Store capability.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.onlineStore.data.urlHandle
metaobjectDefinition.capabilities.onlineStore.data.urlHandle

Fires when the urlHandle field on the MetaobjectCapabilityDefinitionDataOnlineStore 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 urlHandle field represents the URL handle for accessing pages of this metaobject type in the Online Store.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.onlineStore.enabled
metaobjectDefinition.capabilities.onlineStore.enabled

Fires when the enabled field on the MetaobjectCapabilitiesOnlineStore 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.

Indicates if the capability is enabled.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.publishable
metaobjectDefinition.capabilities.publishable

Fires when the publishable field on the MetaobjectCapabilities 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.

Indicate whether a metaobject definition is publishable.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.publishable.enabled
metaobjectDefinition.capabilities.publishable.enabled

Fires when the enabled field on the MetaobjectCapabilitiesPublishable 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.

Indicates if the capability is enabled.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.renderable
metaobjectDefinition.capabilities.renderable

Fires when the renderable field on the MetaobjectCapabilities 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.

Indicate whether a metaobject definition is renderable and exposes SEO data.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.renderable.data
metaobjectDefinition.capabilities.renderable.data

Fires when the data field on the MetaobjectCapabilitiesRenderable 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 data field represents the data associated with the renderable capability.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.renderable.data.metaDescriptionKey
metaobjectDefinition.capabilities.renderable.data.metaDescriptionKey

Fires when the metaDescriptionKey field on the MetaobjectCapabilityDefinitionDataRenderable 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 metaDescriptionKey field represents the metaobject field used as an alias for the SEO page description.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.renderable.data.metaTitleKey
metaobjectDefinition.capabilities.renderable.data.metaTitleKey

Fires when the metaTitleKey field on the MetaobjectCapabilityDefinitionDataRenderable 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 metaTitleKey field represents the metaobject field used as an alias for the SEO page title.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.renderable.enabled
metaobjectDefinition.capabilities.renderable.enabled

Fires when the enabled field on the MetaobjectCapabilitiesRenderable 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.

Indicates if the capability is enabled.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.translatable
metaobjectDefinition.capabilities.translatable

Fires when the translatable field on the MetaobjectCapabilities 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.

Indicate whether a metaobject definition is translatable.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.capabilities.translatable.enabled
metaobjectDefinition.capabilities.translatable.enabled

Fires when the enabled field on the MetaobjectCapabilitiesTranslatable 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.

Indicates if the capability is enabled.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.description
metaobjectDefinition.description

Fires when the description field on the MetaobjectDefinition 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 description field represents the administrative description.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.displayNameKey
metaobjectDefinition.displayNameKey

Fires when the displayNameKey field on the MetaobjectDefinition 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 displayNameKey field represents the key of a field to reference as the display name for each object.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions
metaobjectDefinition.fieldDefinitions

Fires when the fieldDefinitions field on the MetaobjectDefinition 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 fieldDefinitions field represents the fields defined for this object type.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.capabilities
metaobjectDefinition.fieldDefinitions.capabilities

Fires when the capabilities field on the MetaobjectFieldDefinition 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.

Capabilities available for this metaobject field definition.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.capabilities.adminFilterable
metaobjectDefinition.fieldDefinitions.capabilities.adminFilterable

Fires when the adminFilterable field on the MetaobjectFieldDefinitionCapabilities 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.

Indicate whether a metaobject field definition is configured for filtering.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.capabilities.adminFilterable.enabled
metaobjectDefinition.fieldDefinitions.capabilities.adminFilterable.enabled

Fires when the enabled field on the MetaobjectFieldCapabilityAdminFilterable 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.

Indicates if the capability is enabled.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.description
metaobjectDefinition.fieldDefinitions.description

Fires when the description field on the MetaobjectFieldDefinition 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 description field represents the administrative description.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.name
metaobjectDefinition.fieldDefinitions.name

Fires when the name field on the MetaobjectFieldDefinition 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 human-readable name.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.required
metaobjectDefinition.fieldDefinitions.required

Fires when the required field on the MetaobjectFieldDefinition 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.

Required status of the field within the metaobject composition.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.validations
metaobjectDefinition.fieldDefinitions.validations

Fires when the validations field on the MetaobjectFieldDefinition 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 validations field contains a list of validation options for the field.

Variables: metaobjectDefinitionType

Anchor to list-of-topics-metaobjectDefinition.fieldDefinitions.visibleToStorefrontApi
metaobjectDefinition.fieldDefinitions.visibleToStorefrontApi

Fires when the visibleToStorefrontApi field on the MetaobjectFieldDefinition 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 visibleToStorefrontApi field indicates whether this field is visible within the Storefront API.

Variables: metaobjectDefinitionType

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

Fires when the name field on the MetaobjectDefinition 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 human-readable name.

Variables: metaobjectDefinitionType


Was this page helpful?