How to activate an app block automatically (NodeJS)

Topic summary

The discussion centers on automatically activating app blocks (Theme App Extensions) in Shopify without manual intervention through the Theme Editor.

Core Problem:

  • Deep linking only works for app embed blocks, not app blocks, according to Shopify documentation
  • Users express frustration with lack of official support and incomplete documentation

Proposed Workaround:
One user shares a multi-step solution:

  1. Manually add the app block once via Theme Editor
  2. Navigate to “Edit code” → “product.json” and locate the app block property (identifiable by its long ID)
  3. Use the Asset API to duplicate product.json
  4. Add the app block property to the duplicate file (including updating the block_order property)
  5. Assign products to the duplicated template

Key Technical Notes:

  • Duplication is necessary because Shopify resets default files without notification
  • App block data is stored in theme files like settings_data.json
  • Some apps have successfully implemented automatic activation

Unresolved Questions:

  • Whether this process must be repeated for every theme
  • How to proceed if Shopify restricts Asset API usage
Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Hello!
I’m currently researching app blocks(Theme app extension). Is there anyway to activate an app block automatically without Theme Editor?

With app embed block i can use a deep link but the docs (https://shopify.dev/apps/online-store/theme-app-extensions/extensions-framework#simplified-installation-flow-with-deep-linking) pointed out: “Deep linking is compatible only with app embed blocks. You can’t deep link to an app block.”.

So if it’s not possible with app blocks then is there a way to work around this? Any help would be appreciated. Thank you.

1 Like

Why no one answers? Shopify supports redirects me to the forum and here no one answers. Strange!

1 Like

Since Shopify documentation never fully explains anything and whenever I ask no one answer, I have to find solutions to every Shopify problem myself (real pain). This is no exception.

To solve this, first, you deploy your app blocks and add it manually using Theme Editor. Then you go to the “Edit code” section in your Theme, go to “product.json”, and scroll down til you find the App Blocks property (really easy to identify because the name of the property is a really long id).

Then to activate it automatically, copy that property, duplicate the product.json using Asset API, and also use Asset API to add that property to that duplicate file (remember to add the property’s name to the block_order property as well). Finally, assign the product template to that product.json duplicate template/file.

Why do you have to duplicate the product.json file instead of just editing the file itself? Because Shopify will just reset the code for default files anyway, which is understandable but it doesn’t notify you.

1 Like

@Neli2404 @youshd have ypu found the solution.

i have see few of the app that was do the automatic theme app blocked activated.

i can see the app blocked data are store in the theme file / settings_data.json.

do i have to repeat this proccess on every theme? also it seems that shopify forbids using assets api, how can i add block automaticly to theme inpdp page then?