Hello Team,
I have a question regarding Theme App Extension deep linking URLs.
When a merchant installs our app, we use a URL like the one below to automatically open the Theme Editor and allow them to add our app block:
https://store.myshopify.com/admin/themes/current/editor?template=product&addAppBlockId=APP_BLOCK_ID/FILE_NAME&target=newAppsSection
This works well for first-time setup.
However, once the merchant has already added the app block, is there any URL that can directly take them to the existing app block inside the Theme Editor instead of showing the “Add App Block” flow again?
Currently, even when I detect that the app block is already added, I still use the same deep link. As a result, if the merchant clicks the button again, they can accidentally add a duplicate app block.
My goal is:
-
Show “Add in Theme Editor” for merchants who have not added the app block yet.
-
Show “Manage in Theme Editor” for merchants who have already added the app block.
-
The “Manage” button should ideally open the existing app block in the Theme Editor rather than prompting the merchant to add a new one.
Is there a recommended way to achieve this?
Thank you.