Deep Link to header section not working, please help!

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:


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

Hey @da_bob

To link to the app embed, try this:

/admin/themes/current/editor?context=apps&appEmbed=7a2b8f57-8d03-47a9-8683-4222c639f0f8%2Fchatbot

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:

https://.myshopify.com/admin/themes/131438837848/editor?context=apps&appEmbed=0668dc6c-a2a3-4a5c-9d57-75ba0a1b1089

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:

/admin/themes/current/editor?context=apps&appEmbed=7a2b8f57-8d03-47a9-8683-4222c639f0f8%2Fchatbot

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