Pushing merchant-specific 3rd party data to public app

Is there a way for our external 3rd party service to push merchant-specific data to each merchants install of our public app?

I’ve been reading the documentation and searching for days and I’m just not finding anything. Metafields with a “shop” scope? Is that the best or only way?

If more information about our use case would be helpful…

Essentially we have data that is defined by us, on our servers, that is different for each merchant. Any merchant could install our app but it would not do anything until we configured data for that merchant on our 3rd party servers. The data is not updated very frequently but we can change it at any time for any merchant and it is important that the app is always using the latest changes for that merchant. When we change data for a merchant on our servers we want to make an api call to push the data to that specific merchants Shopify store/app (and nobody else) and save it to some internal configuration for their store. Our Shopify app could then access this always-up-to-date merchant-specific data without needing to do any polling or constant querying to get the same data over and over.

Hi @DaisTechnical :waving_hand:

Rather than metafields on the shop object, I’d recommend leveraging app-owned metafields. These can only be accessed/modified by your app, and behaves similarly to private metafields. Many apps use this field to store a client ID or client secret facing the app.

Hope that helps!

Are app-owned metafields unique per merchant? The documentation does not state the scope of metafields anywhere. In our case every merchant has different data. If that is possible then the question is how does our 3rd party service populate this from outside of Shopify? Presumably we need an api key, but again, the documentation is not at all clear how a merchant would generate an api key for our public app that they could share with us so that we can call the Shopify apis and save this data.

I’m continuing to look at the documentation but it’s really not clear about this at all.