Is there a way to use $app in filter?

I’ve created a metaobject definition with a type using the app-owned namespace, like this: $app:something.

Now, I want to use the metaobjects/update topic on a webhook. It seems that a filter is required, but setting the value to type:$app:something doesn’t work. When I deploy the app on Shopify, I get the following error:

Invalid value: "type:$app:something" for: "filter"

Is there a way to use $app in the filter, or should I use the app ID instead?

Hey! The webhooks filter doesn’t support the $app:something syntax yet: so you’ll have to define the filter with the app’s API client ID: e.g. app--123456--something.

2 Likes

@Cedric-Shopify What’s the best way to get the app API client ID? Seems like it ought to be available in the remix template on the shopifyApp instantiation but I don’t see it there. We can query the graphql api for it, but since it’s fixed seems like we ought to just have it in the environment.

I think the best way fro now is to get it from the API: App - Partner API !

1 Like