Context: our app creates a product in the merchant’s store, and we want our theme app extension app block (a button that opens a modal) to appear on that product’s page automatically - ideally without the merchant having to add it in the theme editor.
What I’ve got working so far (but I’m not happy with):
- themeFilesUpsert to create a suffix template templates/product.test.json = a copy of the merchant’s product.json with our app block (shopify://apps//blocks//) merged into the main product section.
- productUpdate to set that product’s templateSuffix.
It works, but the downsides bug me:
- It forks the merchant’s product template (drifts from their real product page; theme redesigns don’t apply).
- Breaks on theme switch/update - the merged JSON is tied to the current theme’s section/block structure, and the suffix template won’t exist in a new theme.
Questions:
- Is there a more robust/supported way to auto-place an app block on a specific product page without forking/editing the merchant’s template? (App-block “default” placement, deep-link to theme editor with the block pre-added, metafield-driven approach, something else?)
- If automatic placement isn’t really supported, what’s the recommended pattern apps use here - deep-link + merchant click?
- Any way to make the block reference / placement survive theme switches and updates?
Themes are Online Store 2.0. Goal is minimal merchant effort + robustness across themes. Thanks! 
Doing it with zero merchant action would mean modifying their theme files. That’s not the recommended approach and isn’t eligible for an Asset API exemption (using it to add an app block to save merchant clicks), so it becomes a Built for Shopify and App Store liability (App Store 5.1, Built for Shopify 3.2.2). By design, merchants own their theme and should know what gets added to it.
The recommended pattern is the deep link plus one merchant click, which keeps them in control. Since a deep link adds the block to a product template, it shows on every product using it. To scope it to a single product, gate the block’s Liquid on a metafield you set on that product so it only renders for that one.
Within the same theme, placement persists through version updates. The only exception is significant updates to the template, which can happen with large version jumps. It won’t carry to a different theme since sections and templates are structured differently, so the merchant can just re-add it with the deep link.
Thanks! @Paige-Shopify
Just a quick clarification: if a merchant adds the extension to their current theme with deep linking, it won’t automatically transfer over if they change themes, correct? Does this apply to all extensions across the board?
Correct. When a merchant adds your app block, it gets saved into the theme’s JSON template, so it’s tied to the specific theme they added it to.
Picture it this way: Horizon’s product.json isn’t the same file as Dawn’s product.json. If a merchant has Dawn published with your app block added in product.json, then installs Horizon and publishes it, Horizon’s product.json won’t have your block added in it. The merchant would need to add it through the deep link on Horizon.
The same applies to app embed blocks that live in the theme’s settings_data.json. Both are stored per theme, so neither carries across a theme switch.