Assistant Integration
The Integration tab provides everything you need to deploy your assistant on websites, share direct links, and control the chat widget programmatically.
Overview
Once your assistant is configured and trained, you need to deploy it. FineGuide offers multiple integration options:
- JavaScript embed — Add to any website
- Direct link — Share a standalone chat page
- Iframe embed — Embed in web applications
- Third-party platforms — Connect to Slack, WhatsApp, etc.
JavaScript Embed (Recommended)
The most common way to add your assistant to a website.
Getting the Code
- Go to your Assistant → Integrations
- Copy the provided JavaScript code
Installation
Add both scripts to your HTML file — either in the <head> section or immediately before </body>:
<!-- FineGuide Chat Widget -->
<script>var FINEGUIDE_CHATBOT_ID = 'your-bot-id-here';</script>
<script src="https://cdn.fineguide.ai/fineguide.min.js"></script>Important:
- Both scripts are required
- The configuration script must come first
- Don't modify the script order or content
Where to Add the Code
| Platform | Instructions |
|---|---|
| WordPress | Add to theme's header.php or use a header scripts plugin |
| Shopify | Add to theme.liquid before </body> |
| Wix | Use Custom Code in site settings |
| Squarespace | Add to Code Injection in advanced settings |
| React/Vue/Angular | Add to index.html or use a script loader |
| HTML site | Add directly to your HTML files |
Verification
After adding the code:
- Refresh your website
- Look for the chat bubble in the configured position
- Click it to open the chat and send a test message
Direct Link
A standalone URL that opens your assistant in a full-page chat interface.
Getting the Link
Your assistant's direct link follows this format:
https://client.fineguide.ai/{your-bot-id}Find the exact link in Assistant → Integrations.
Use Cases
| Use Case | How to Use |
|---|---|
| Email signatures | Add as "Chat with us" link |
| QR codes | Generate QR code pointing to the link |
| Social media | Share in bio or posts |
| Support portals | Link from help center |
| Demos | Share with stakeholders |
Iframe Embed
Embed the chat directly into your page layout (not as a floating widget).
Basic Embed
<iframe
src="https://client.fineguide.ai/{your-bot-id}"
width="400"
height="600"
frameborder="0"
></iframe>Responsive Embed
<div style="width: 100%; max-width: 500px; height: 700px;">
<iframe
src="https://client.fineguide.ai/{your-bot-id}"
style="width: 100%; height: 100%; border: none; border-radius: 12px;"
></iframe>
</div>Use Cases
- Dedicated support page with embedded chat
- Web applications with built-in assistant
- Kiosk or terminal displays
- Landing pages with full-page chat
JavaScript API
Control the chat widget programmatically after the script loads.
Theme Management
// Get current theme
const theme = window.$__fg_window_theme;
console.log(theme); // "dark" or "light"
// Switch to dark theme
window.$__fg_window_switch_theme("dark");
// Switch to light theme
window.$__fg_window_switch_theme("light");Use case: Match your website's dark/light mode toggle.
Window Controls
// Open the chat window
window.$__fg_window_open();
// Close the chat window
window.$__fg_window_close();
// Toggle open/closed
window.$__fg_window_toggle();Use cases:
- Open chat after user action (button click, scroll)
- Close chat when navigating away
- Create custom chat buttons elsewhere on page
Practical Examples
Custom "Chat Now" Button:
<button onclick="window.$__fg_window_open()">
💬 Chat Now
</button>Open Chat on Page Load (with delay):
setTimeout(() => {
window.$__fg_window_open();
}, 5000); // Open after 5 secondsSync Theme with Website:
// Assuming you have a theme toggle button
themeToggle.addEventListener('click', () => {
const isDark = document.body.classList.toggle('dark-mode');
window.$__fg_window_switch_theme(isDark ? "dark" : "light");
});Open on Exit Intent:
document.addEventListener('mouseleave', (e) => {
if (e.clientY < 0) {
window.$__fg_window_open();
}
}, { once: true });Connect Apps (Third-Party Platforms)
Deploy your assistant on messaging platforms beyond your website.
Available Platforms
| Platform | Description |
|---|---|
| Slack | Respond to DMs and channel messages |
| Discord | Bot responds to mentions and DMs |
| WhatsApp Business API integration | |
| Telegram | Telegram bot integration |
| Facebook Messenger | Facebook page inbox |
| DMs and comment replies | |
| AmoCRM / Kommo | CRM chat integration |
Setup Process
- Go to Assistant → Connect Apps
- Click the platform you want to connect
- Follow the OAuth flow or enter required credentials
- Authorize FineGuide to act on behalf of your account
- Configure platform-specific settings if needed
See the Connect Apps section for detailed setup guides.
Troubleshooting
Widget Not Appearing
- Check script order — Configuration script must come before the widget script
- Verify bot ID — Ensure the ID in your code matches your assistant
- Check console — Look for JavaScript errors in browser developer tools
- HTTPS required — Widget may not load on HTTP pages
- Cache — Clear browser cache and hard refresh
Widget Appears but Doesn't Work
- Test direct link — If the direct link works, it's a script issue
- Check ad blockers — Some block third-party scripts
- CSP issues — Content Security Policy might be blocking the script
- Network — Ensure
cdn.fineguide.aiandclient.fineguide.aiare accessible
Styling Conflicts
If the widget looks wrong:
- Check for CSS that might affect iframes or fixed positioning
- Ensure no z-index conflicts with other elements
- Verify no global styles override widget styles
Advanced Configuration
Multiple Assistants on One Page
If you need different assistants on different pages:
// Change bot ID dynamically before script loads
if (window.location.pathname.includes('/sales')) {
window.FINEGUIDE_CHATBOT_ID = 'sales-bot-id';
} else {
window.FINEGUIDE_CHATBOT_ID = 'support-bot-id';
}Loading Script Dynamically
For single-page applications:
function loadFineGuide(botId) {
window.FINEGUIDE_CHATBOT_ID = botId;
const script = document.createElement('script');
script.src = 'https://cdn.fineguide.ai/fineguide.min.js';
document.body.appendChild(script);
}Next Steps
- Customize Appearance before deploying
- Configure Features for optimal user experience
- Set up Webhooks to track conversations