Custom Trigger
Trigger Boei to open from any button or element on your website.
How to get there: Go to Widgets in the left menu → click your widget → copy the embed code, then use the CSS class on your website.
How It Works
Boei listens for clicks on any element with the class boei-embed-open. Add this class to any button, link, or element to make it open your widget.
Example
<a href="#" class="boei-embed-open">Click here to contact us</a>
Use Cases
- "Contact Us" button in your navigation
- Call-to-action buttons on landing pages
- Help links in footers
- Custom chat buttons matching your design
Implementation
HTML Link
<a class="boei-embed-open">Get in touch</a>
HTML Button
<button class="boei-embed-open">Need help?</button>
Styled Button
<button class="boei-embed-open my-custom-button">Chat with us</button>
Open a specific channel directly
Add a data-channel attribute with the channel key (you can copy this from the channel settings inside your widget) to open straight into that channel:
<a class="boei-embed-open" data-channel="whatsapp">WhatsApp us</a>
Open via URL Parameter
You can also open the widget by adding ?open-chat=1 (or ?open-chat=true) to any page URL on your site. When a visitor lands on that URL, the widget opens automatically.
This is useful for:
- Email campaigns — link directly to a page with the chat ready
- Ads — deep-link visitors from Google or Facebook ads into a live chat
- External "Chat now" buttons — from your help center, social media, or partner sites
- QR codes — print a QR that opens chat directly on mobile
Examples
https://yoursite.com/?open-chat=1
https://yoursite.com/pricing?open-chat=true
https://yoursite.com/contact?open-chat=1#plans
The parameter works alongside other query strings and URL anchors.
JavaScript API
If you need to open the widget from your own JavaScript (after a form submit, a search query, an analytics event, etc.), call the global Boei.* methods:
<script>
Boei.open(); // open the widget
Boei.open('whatsapp'); // open straight into a channel
Boei.close(); // close the panel
Boei.isOpen(); // returns true / false
Boei.hideLauncher(); // hide the launcher button entirely
Boei.showLauncher(); // show it again
Boei.ask('How do I install?'); // open the chatbot and auto-send a first message
</script>
See the JavaScript SDK Guide for full details and the advanced callback form.
Related
- JavaScript SDK Guide - Full JavaScript API reference
- Widget Branding - Customize the widget appearance
- Custom CSS - Advanced styling