import Image from 'next/image'
You can open the chat window by using a deep link without modifying your theme's code.
In the Shopify Theme Editor, simply add the hashtag #shoply-ai-chatbot to any button, icon, or text element.
When customers click on these elements, the chat window will automatically open.
Live example: demo.shoplyai.ai
Steps:
#shoply-ai-chatbot.Examples:
Use a button to open the chat window:
Use a linked text to open the chat window:
In the previous section, we discussed how to use the hashtag (deep link) to trigger the chat window by adding it to any button, icon, or text directly from the Theme Editor, without editing your theme's code.
However, if you'd like to have full flexibility to add the deep link anywhere on your store (e.g., creating a new icon in the header), you will need to edit the template code.
Below are simple HTML code examples you can use to create new icons in your Theme template:
The code below adds a chat icon:
The code below adds an AI star:
Besides using hashtags, you can also put the function call openShoplyAIChatBot() to the onclick attribute of any button/icon, so that customers will see the chat window when they click the button/icon.
You can use any of the examples above, and inject the code next to the search icon in the sections/header.liquid file, to add the chat deep link to your store's header.
However, if you're not entirely comfortable editing the code in your Theme template, don't worry!
Feel free to book a meeting with us, and we'll gladly help you set up the perfect icon in the ideal spot to match your store's unique vibe.
Once you configure the deep link to open the chat window. You may want to hide the floating icon. Also, store owners often mention that having too many floating icons on their websites can be overwhelming. We understand your concerns! That's why we've introduced a feature to hide the chat icon.
In the "Customize AI Chat" section of the app's admin console, under the Select a Chat Icon settings, you can now select the:
“Hide floating icon and use deep link to open chat” option.
This allows you to hide the floating icon while still enabling the chat window to open via a deep link.