I want to add metafields to some products, the metafield is managed by my app using the admin graphql api, and I want to be able to use the metafield in the store’s theme.
I’m wondering which namespace I should use and how to make it so only my app can modify the metafield’s value ?
One format for themes, for non-reserved-prefixes, is simply theme for the namespace {resource}.theme.key.
So to namespace it {resource}.{appname-or-businessname}-theme.key
Though generally theme is a metafield definition that theme developers use for merchants to create and setup specific theme behaviors.
Beyond that namespace metafields(MFs) with the app name, or company name, or acronym/initialism.
and don’t use ambiguous stuff like “custom” because everything is custom that’s the point of a metafield.
And for goodness sakes document not just the string, but the why* in public support docs.
example yasa-banner.label.value is inscrutable meaninglessness if you don’t define that yasa means yet-another-shopify-app because that was the companies previous previous previous name.
There used to be an informal registrar in a partners subforum to avoid naming-conflicts but forums got changed so that’s lost to internet rot.
I don’t know if something like that exists in the partner slack channels but may be worth digging around for.