releases.shpreview

Metafield triggers and additional topics are now available for Events

Apps can now subscribe to events for Order, Collection, InventoryItem, InventoryShipment, Location, and can subscribe to metafield changes on Product, Order, Customer, Collection and Location. ProductVariant metafields are supported through the Product topic.

This gives apps a precise way to react to more objects and custom data changes. Apps can target the fields that matter in triggers, query the resource that changed, and avoid subscribing to every resource update just to diff payloads in their event handler.

Both $app metafields and regular metafields are supported. Access control still applies, so an app must have access to the metafield to subscribe to changes and receive the queried data. For example, an app can subscribe to two targeted product metafields in shopify.app.toml and use query_variables to fetch the metafield that actually changed:

[events]
api_version = "unstable"

[[events.subscription]]
handle = "product_material_sync"
topic = "Product"
actions = ["update"]
triggers = [
  "product.metafield(namespace: 'custom', key: 'material').value",
  "product.metafield(namespace: '$app', key: 'sourcing_status').value"
]

uri = "/events/product"

query = """
query ProductMetafieldSync(
  $productId: ID!
  $metafieldNamespace: String!
  $metafieldKey: String!
) {
  product(id: $productId) {
    id
    title
    metafield(namespace: $metafieldNamespace, key: $metafieldKey) {
      namespace
      key
      value
      type
    }
  }
}
"""

When one of those metafields changes, apps receive the payload they designed:

{
  "topic": "Product",
  "action": "update",
  "handle": "product_material_sync",
  "data": {
    "product": {
      "id": "gid://shopify/Product/1234567890",
      "title": "Canvas Tote",
      "metafield": {
        "namespace": "custom",
        "key": "material",
        "value": "Cotton",
        "type": "single_line_text_field"
      }
    }
  },
  "fields_changed": [
    "product.metafield(namespace: 'custom', key: 'material').value"
  ],
  "query_variables": {
    "productId": "gid://shopify/Product/1234567890",
    "metafieldNamespace": "custom",
    "metafieldKey": "material"
  }
}

If your subscription has no triggers, or subscribes to a parent trigger such as product, it can now receive events for metafield changes on supported resources too. To receive only specific metafield changes, add targeted metafield triggers for the namespace and key your app needs.

Events remain available in the unstable API version during developer preview. For topics that are not supported yet, continue using webhooks alongside Events in shopify.app.toml.

Learn more about

Fetched July 21, 2026