Hi,
Our app depends on a shop-level metafield to store and read some of our app settings.
Shopify now allows merchants to view unstructured metafields, add them to the store, and also delete them.
The concern is that if a merchant deletes a metafield that was created and used by our app, our app stops working properly because it can no longer get the required data from that metafield.
Usually, merchants would not delete it, but we recently had one merchant who accidentally deleted the metafield. They then contacted us for support, and we identified that the metafield was missing.
Our app does recreate the metafield when the merchant saves the app settings again. However, in this case, the merchant did not go through that process, so the metafield remained deleted.
I’m not sure why Shopify gives merchants the ability to manage and delete metafields created by apps, especially when those metafields are required for the app to work.
I’m posting this to discuss with the Shopify team and other developers:
-
Is there a recommended way to prevent merchants from accidentally deleting app-required metafields?
-
Is there a better approach for handling this situation?
-
How are other apps handling app-created shop-level metafields that are required for the app to function?
Would love to hear how other developers are handling this.
