Thanks, though I think I should have been clearer about what’s currently missing in the webhook system.
Right now, as a third-party app, we don’t receive any webhook update for publications when publishing changes are made to the online store. According to the webhook docs this is intended behavior, but since our customers need that functionality, we’re stuck building cumbersome workarounds.
If this could be included in the event system so that we’d receive these events, it would make a real difference for us. Hope I’m not coming across as pushy with all these requests, we’re just excited about what the new event system could bring and how much friction it could remove from our current integration.
Given Events is a net new system, I wouldn’t compare Webhooks to Events 1:1 (outside of parity / topic coverage) - though I totally hear you out on the issue and I’ve marked it for when we come around to doing Publication topic(s)
I hope this opens up a new path for other webhooks, such as inventory_levels, which have been ignored even though the data model has evolved a lot. I’d love to see new fields like incoming, committed, on_hand, etc. via Events.
While I can’t confirm on Harshdeeps/Shopify’s behalf, but now that Events allow you to specify a query, I imagine you will be able to retrieve those inventory level fields, see the example in the original post:
query = """
query priceSync($productId: ID!, $variantsId: ID!) {
productVariant(id: $variantsId) {
id
price
compareAtPrice
sku
}
product(id: $productId) {
id
title
status
}
}
@Luke is correct - when we come around to doing Inventory series of topics, you will be able to trigger on fields and craft your query to include incoming / committed / on_hand / etc fields in Event payloads.
The query you write in Event subscriptions is a regular Admin API GraphQL query and run by the same engine, so the behavior is consistent across the board^
I tested this on 29 July to receive an event on variant price change and it worked fine but today it isn’t sending any Product event anymore (confirmed in Partner dev dashboard). Something significantly changed?
[events]
api_version = "unstable"
[[events.subscription]]
handle = "myapp_variant_price_image1"
topic = "Product"
actions = ["update"]
triggers = ["product.variants.price", "product.variants.media"]
uri = "https://example.ngrok-free.app/api/v1/webhooks/nextgen-events"
query = """
query myapp_nge($productId: ID!, $variantsId: ID!) {
product(id: $productId) {
id
title
status
tags
productType
options { name position }
}
productVariant(id: $variantsId) {
id
title
sku
price
selectedOptions { name value }
media(first: 1) { nodes { id } }
resourcePublicationsV2(first: 50) { nodes { publication { id } isPublished } }
}
shop {
metafield(namespace: "myapp", key: "myapp") { value }
}
}
"""
I tried updating the handle → Nothing happened
I tried deleting the subscription block → restart dev server → add the subscription back → restart the server → It worked again.
but will there be added new triggers/fields changed to the current ones
Good question! Our current focus is expanding topic coverage with trigger lists that cover the cases we expect most developers to need most of the time, to ensure Events can be on a stable API version as soon as possible.
Once we have stronger coverage across topics, we’ll keep revisiting the trigger lists and expanding them based on developer feedback, real usage patterns, and how the GraphQL schema evolves