Open the Flyweight AI Chatbot via Custom Buttons on Your Store

Open Flyweight AI Chatbot from custom buttons, links, or events using JavaScript. Full control over chatbot appearance without external libraries.

Marc-Andre Hoffmann profile pictureBy

Good news: you can now open the Flyweight AI Chatbot from any custom button, link, or event on your Shopify storefront. Our Shopify chatbot gives you flexible ways to plug chat into your store. You decide when it shows up and how it fits the journey, whether that’s after a specific customer action, from a fixed icon, or inside your existing call-to-action buttons.

To set it up, just update your Shopify theme and add a small JavaScript snippet to trigger the chatbot manually. No external libraries needed. It’s lightweight and easy to work with.

Here’s how it works:

  • Add your own button or link anywhere on your site, for example in the Shopify Theme Editor

  • On click, or any other event, run a simple window.dispatchEvent(...) call

  • That tells Flyweight to open the assistant exactly when you want it to

window.dispatchEvent(new Event('flyweightchatopen'));

// Examples
<a href="#" onclick="window.dispatchEvent(new Event('flyweightchatopen'))">Link</a>

<button onclick="window.dispatchEvent(new Event('flyweightchatopen'))">Button</button>

This gives you the freedom to shape the chat experience around your brand journey, from product discovery to conversion.

Want to guide shoppers with better timing and more context? This feature is now live for all Flyweight users.

Trigger the JavaScript-controlled chatbot for custom Shopify experiences ✌️

Get Started Today

Try your own AI chatbot for free and see how it grows your business. 7 days free, no limits on traffic or AI chats.

Click "Install" to add the "Flyweight AI" app to your Shopify® store. No credit card needed, no signup required.

Built for Shopify