Cannot subscribe to the new metafield definition webhooks using config file

Hi there!

I’m using the .toml file to set the webhook subscriptions. I’m using the 2024-10 version and I want to add the metafield_definitions/update webhook subscription.
When I try to deploy the app, I get this error: The following topic is invalid: metafield_definitions/update

I’ve checked on the config topics list and the metafield definition webhooks are not present. Does this mean that I can subscribe to it only manually (through api)?

It means that there are no webhooks for this topic. Only the topics listed are available. The list is valid for both .toml and API subscription.

Hi Alberto,

On this list there is the metafield definition update webhook, while on this one there isn’t

Hi @baggio_giacomo,

It looks like the metafield_definitions/* webhooks were just added in the latest API version, 2024-10. Can you confirm that that’s the webhook version you’re using in your TOML file?

client_id = ...
...

[webhooks]
api_version = "2024-10"

Best,
Daniel

Hi @Daniel_Ablestar,

Yes, I confirm that I’m using the 2024-10 version. Here’s the .toml file:

[webhooks]
api_version = "2024-10"

  [[webhooks.subscriptions]]
  topics = [
  "app/uninstalled",
  "bulk_operations/finish",
  "customers/create",
  "customers/update",
  "metafield_definitions/update",
  "shop/update"
]
  uri = "/api/webhooks"
  compliance_topics = [ "customers/data_request", "customers/redact", "shop/redact" ]

Event version on the partner dashboard:

Ah, that’s odd. I tried via the REST API as well and it doesn’t seem to be working either. It might be something that got documented before it was actually released? I’d be really helpful to have these topics though.

@Daniel_Ablestar where do you see that it was released as part of the 2024-10 version? Do you have a link?

Hey folks, this was indeed included in the 2024-10 API (release note here). It looks like it was tagged to hide from our documentation still which is why it’s not showing up on the webhook topics list. Furthermore it looks like that is also blocking it from being subscribed to via the TOML file. We’ll look at getting a fix out for this and will provide an update once it’s available.

I did try subscribing to these topics via GraphQL and was able to successfully. Note you will need to ensure you have access scopes for either read_content or write_content defined to use these topics.

2 Likes

That’s great, thanks @Dave-Shopify !

Hi @Dave-Shopify!

Thanks for your answer. Isn’t the read_content enough? Do we need the write_content too?
So, is the GraphQL API the only way to subscribe to the metafield_definitions/* webhook topics for now?

Yes read_content is enough. Currently this will only work in GraphQL until we get a fix out to allow the subscription in the TOML. I’m hopeful it will be resolved in the next couple of weeks and will update once the change has been made.

1 Like