I have created a very simple Cart Transform app using the latest Shopify CLI. This transform is dependent on specific product and variant metafields that I am creating in my app by defining them in my shopify.app.toml. This works perfectly however the created metafields are not and cannot be pinned which is super annoying since these fields are ones I want my store admins to be able easily adjust the values.
Below is an example of how I am defining the metafields
[product.metafields.app.product_builder_default_products]
name = āDefault Products/Variantsā
type = ālist.variant_referenceā
access = { admin = āmerchant_read_writeā, storefront = āpublic_readā }
This app will just be used on a handful of stores I control so Iām trying to avoid building an app that I need to host anywhere and up to this point, what Iāve built will run natively on Shopify. I believe I can create these using graphQL commands I can run manually on each store which, if it works, is fine however I feel like this is something I should be able to do in my app. I know I can do this if I refactor my app to use the remix template but since all Iām doing with the app is creating these metafields and running a cart transform, Iād really like to avoid having to host the app which I believe would then be required.
Open to any feedback or ideas.
Hey Jeff,
We donāt currently support pinning while using declarative definitions in the app TOML.
I like that youāre using our Admin UI for merchants to enter metafield data and thatās a pattern we want to be good at. However, weāve been discussing internally how much control apps should have over the merchantās admin pages. Especially in cases where apps are fighting over who gets to pin their metafields and the merchant is already at the limit of 20. The merchant may want an entirely different set of metafields pinned, as well.
Weāre trying to brainstorm ways we can accommodate your use case but also give control to the merchants. Some thoughts weāve had so far:
- Increase pinned limits to a very high number
- One idea was the ability to request an item be pinned on app install.
- The other, would be providing instructions to the merchant to show them how to pin
- Leave things as-is and add Pinning to declarative
Just to add a couple of thoughts:
Allowing pinning, by the merchant, certainly feels like the lowest hanging fruit. Right now, the data is 2-3 clicks away with no way of solving.
As for onboarding, a deep link to pin a metafield could be an idea?
One approach weāre planning to take because of this, is to create an admin UI extension as a āreadā view on top of metafields. Easier to document and easier for brands to gain visibility to important data!
1 Like