For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
I am trying to use a deep link to an app extension / app embed so the user can just turn it on easily as part of the install flow but I can't get it to work. This is the deep link I've created:
https://{shop_url}/admin/themes/current/editor?addAppBlockId=7a2b8f57-8d03-47a9-8683-4222c639f0f8/blockname&target=sectionGroup:header
This yields a response:
"blockname" not added. There is a problem with the app block. Contact the app developer.
In the blockname.liquid file I have:
<script src="{{ 'blockname.js' | asset_url }}" defer></script>
{% schema %}
{
"name": "AppName",
"settings": [],
"target": "head"
}
{% endschema %}
When I manually add the app embed, on the shop in question looking at the code I see:
<!-- BEGIN app block: shopify://apps/appname/blocks/blockname/7a2b8f57-8d03-47a9-8683-4222c639f0f8 -->
<script src="https://cdn.shopify.com/extensions/a8177303-19b6-4337-807d-5c29cd5a5b02/appname-1/assets/blockname.js" defer=""></script>
<!-- END app app block -->
and the app extension works fine.
Please help me create a valid deep link.
NB: I have changed the appname and blockname to create this post but the IDs I've left in tact
Solved! Go to the solution
This is an accepted solution.
Hey @da_bob
To link to the app embed, try this:
/admin/themes/current/editor?context=apps&appEmbed=7a2b8f57-8d03-47a9-8683-4222c639f0f8%2Fchatbot
Scott | Developer Advocate @ Shopify
This is an accepted solution.
Hey @da_bob
To link to the app embed, try this:
/admin/themes/current/editor?context=apps&appEmbed=7a2b8f57-8d03-47a9-8683-4222c639f0f8%2Fchatbot
Scott | Developer Advocate @ Shopify
Hi @da_bob,
I'm trying to create a deep link for my app embed so that users can easily activate it as part of the install flow. I saw your solution and have a similar issue. Here is the deep link I'm using:
This link opens up all available embed apps in the left sidebar, but I want my app (2nd one, SmartBot) to be pre-checked (activated already). I saw a competitor achieve this, but I can't figure out how.
In your response, you mentioned adding /chatbot at the end of the URL:
How did you know to add /chatbot? Where did you get that from?
Here’s my directory structure if it helps:
./codeboar:
drwxr-xr-x 2 root root 4096 Jun 11 09:07 assets
drwxr-xr-x 2 root root 4096 Jun 11 12:36 blocks
drwxr-xr-x 2 root root 4096 Jun 11 09:27 locales
-rw-r--r-- 1 root root 285 Jun 11 12:27 shopify.extension.toml
drwxr-xr-x 2 root root 4096 Jun 11 12:35 snippets
./codeboar/assets:
./codeboar/blocks:
-rw-r--r-- 1 root root 588 Jun 11 12:36 chat.liquid
./codeboar/locales:
./codeboar/snippets:
-rw-r--r-- 1 root root 30 Jun 11 12:16 chat_snippet.liquid
Any guidance on how to form the URL correctly to pre-activate my app embed would be greatly appreciated!
Thanks!
Best regards,
Pilsen