Chat Widget
The Intufind chat widget adds an AI-powered assistant to your website. It can answer questions about your products, content, and help customers find what they're looking for.
Quick Start
Add the chat widget to any page with a single script tag:
<script
src="https://cdn.intufind.com/chat-loader.js"
data-publishable-key="if_pk_your_key_here"
></script>
Replace if_pk_your_key_here with your publishable key from the Intufind Dashboard.

Installation Methods
Script Tag (Recommended)
The simplest method — add a single script tag before </body>:
<script
src="https://cdn.intufind.com/chat-loader.js"
data-publishable-key="if_pk_xxx"
data-trigger-position="bottom-right"
></script>
Configuration Object
For more options, use a configuration object:
<script>
window.intufindConfig = {
publishableKey: 'if_pk_xxx',
title: 'Ask me anything',
subtitle: 'AI-powered assistant',
triggerPosition: 'bottom-right',
greeting: 'Hi! How can I help you today?',
};
</script>
<script src="https://cdn.intufind.com/chat-loader.js"></script>
Programmatic Initialization
Control when the widget loads:
<script src="https://cdn.intufind.com/chat-loader.js" data-manual></script>
<script>
// Initialize when ready
window.IntufindChatbot.init({
publishableKey: 'if_pk_xxx',
// ... other options
});
</script>
Embed Modes
Floating Mode (Default)
A floating button that opens a chat overlay:
window.intufindConfig = {
publishableKey: 'if_pk_xxx',
embedMode: 'floating',
triggerPosition: 'bottom-right', // or 'bottom-left', 'top-right', 'top-left'
};

Inline Mode
Embed the chat directly in a container:
<div id="chat-container" style="height: 600px;"></div>
<script>
window.intufindConfig = {
publishableKey: 'if_pk_xxx',
embedMode: 'inline',
containerSelector: '#chat-container',
};
</script>
<script src="https://cdn.intufind.com/chat-loader.js"></script>

Configuration Options
API Settings
| Option | Type | Default | Description |
|---|---|---|---|
publishableKey | string | required | Your Intufind publishable key |
workspaceId | string | auto | Workspace ID (auto-derived from hostname) |
userJwt | string | — | JWT token for authenticated features (order lookup) |
Header & Branding
| Option | Type | Default | Description |
|---|---|---|---|
title | string | 'Chat' | Header title text |
subtitle | string | — | Header subtitle text |
avatarUrl | string | — | Header avatar image URL |
headerAvatarShowBackground | boolean | true | Show background behind header avatar |
headerAvatarShowBorder | boolean | true | Show border around header avatar |
Trigger Button (Floating Mode)
| Option | Type | Default | Description |
|---|---|---|---|
triggerPosition | string | 'bottom-right' | 'bottom-right', 'bottom-left', 'top-right', 'top-left' |
triggerIconUrl | string | — | Custom trigger button icon URL |
triggerShowBackground | boolean | true | Show background circle on trigger |
triggerShowBorder | boolean | true | Show border around trigger |
Greeting & Prompts
| Option | Type | Default | Description |
|---|---|---|---|
greeting | string | 'Hi! How can I help?' | Main greeting text |
greetingSubtext | string | — | Subtext below greeting |
greetingIcon | string | — | Custom greeting icon URL |
initialPrompts | array | — | Array of { prompt: string, icon?: string } |
promptStyle | string | 'inline' | 'inline', 'input', or 'both' |
Example with prompts:
window.intufindConfig = {
publishableKey: 'if_pk_xxx',
greeting: 'Welcome! What can I help you find?',
initialPrompts: [
{ prompt: 'Show me running shoes' },
{ prompt: 'What are your shipping options?' },
{ prompt: 'Do you have sales?' },
],
promptStyle: 'inline',
};

Card Display
| Option | Type | Default | Description |
|---|---|---|---|
cardLayout | string | 'carousel' | 'carousel', 'stack', or 'grid' |
cardImageDisplay | string | 'cover' | 'contain', 'cover', or 'backdrop' |
cardImageAspectRatio | string | 'square' | 'square', 'landscape', or 'wide' |
Post Card Options
| Option | Type | Default | Description |
|---|---|---|---|
showPostImage | boolean | true | Show featured image |
showPostAuthor | boolean | true | Show author name |
showPostDate | boolean | true | Show publish date |
showPostCategory | boolean | true | Show category |
Message Display
| Option | Type | Default | Description |
|---|---|---|---|
showMessageActions | boolean | true | Show copy/feedback buttons |
showUserCopyButton | boolean | false | Show copy button on user messages |
showMessageTimestamps | boolean | false | Show timestamps on messages |
loadingIndicator | string | 'dots' | 'dots' or 'progress' |
typingDelay | number | 400 | Delay before showing response (ms) |
Live Agent Handoff
| Option | Type | Default | Description |
|---|---|---|---|
liveAgentEnabled | boolean | false | Enable live agent handoff |
liveAgentManualHandoff | boolean | true | Show "Talk to a Human" button |
liveAgentAutoHandoff | boolean | false | Allow AI to suggest handoff |
liveAgentBusinessHours | string | — | Business hours text (e.g., "Mon-Fri 9am-5pm") |
contactFormEnabled | boolean | false | Show contact form when agents unavailable |
Voice Input
| Option | Type | Default | Description |
|---|---|---|---|
voiceLanguage | string | 'en-US' | BCP 47 language tag for voice recognition |
Analytics & Privacy
| Option | Type | Default | Description |
|---|---|---|---|
analyticsEnabled | boolean | true | Enable analytics tracking |
analyticsConsentRequired | boolean | false | Require GDPR consent before tracking |
JavaScript API
The widget exposes a global API at window.IntufindChatbot:
Control Methods
// Open the chat widget
window.IntufindChatbot.open();
// Close the chat widget
window.IntufindChatbot.close();
// Toggle open/closed
window.IntufindChatbot.toggle();
// Check if open
const isOpen = window.IntufindChatbot.isOpen();
Configuration Methods
// Get current configuration
const config = window.IntufindChatbot.getConfig();
// Update configuration
window.IntufindChatbot.configure({
title: 'New Title',
greeting: 'Updated greeting!',
});
// Get full state
const state = window.IntufindChatbot.getState();
// Returns: { isOpen: boolean, config: ChatbotConfig }
Theme Methods
// Update theme
window.IntufindChatbot.setTheme({
primaryColor: '#6101fe',
widgetBackground: '#ffffff',
});
// Set custom CSS
window.IntufindChatbot.setCustomCSS(`
.itf-chat-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
`);
Analytics Consent (GDPR)
// Grant analytics consent
window.IntufindChatbot.grantAnalyticsConsent();
// Revoke analytics consent
window.IntufindChatbot.revokeAnalyticsConsent();
// Get consent status
const status = window.IntufindChatbot.getAnalyticsConsentStatus();
// Returns: 'granted' | 'denied' | 'pending'
Cleanup
// Remove widget from page
window.IntufindChatbot.destroy();
Authenticated Features
To enable features like order lookup, pass a user JWT:
window.intufindConfig = {
publishableKey: 'if_pk_xxx',
userJwt: 'eyJhbGciOiJIUzI1NiIs...', // Server-generated JWT
};
The JWT should be generated on your server and contain the user's identity. See Order Support for details.
Custom Styling
See the Widget Styling guide for comprehensive theming options.
Quick example:
window.intufindConfig = {
publishableKey: 'if_pk_xxx',
theme: {
primaryColor: '#6101fe',
widgetBackground: '#1a1a1a',
userBubbleBackground: '#6101fe',
assistantBubbleBackground: '#2d2d2d',
fontFamily: '"Inter", sans-serif',
},
};
Mobile Behavior
The chat widget is fully responsive:
- Desktop: Floating widget with configurable size (320px-100vw width)
- Mobile (≤480px): Full-screen overlay for better usability
- Touch-friendly: Optimized tap targets and gestures
- Safe areas: Respects notches and home indicators

Browser Support
| Browser | Supported | Voice Input |
|---|---|---|
| Chrome | ✓ | ✓ |
| Firefox | ✓ | ✗ |
| Safari | ✓ | ✗ |
| Edge | ✓ | ✓ |
| Mobile Chrome | ✓ | ✓ |
| Mobile Safari | ✓ | ✗ |
Accessibility
The widget follows WCAG 2.1 AA guidelines:
- Full keyboard navigation (Tab, Enter, Escape)
- ARIA labels and roles for screen readers
- Focus management and visible focus indicators
- Semantic HTML structure
- Sufficient color contrast
Troubleshooting
Widget not appearing
- Verify your publishable key is correct
- Check browser console for errors
- Ensure the script is loaded (check Network tab)
- Verify no CSP issues are blocking the iframe
Widget appears but doesn't respond
- Check your API connection in the Dashboard
- Verify content is synced (at least 1 product/post)
- Check for JavaScript errors in console
Styling conflicts
- Use the
customCSSoption for overrides - Widget CSS uses
.itf-prefix to avoid conflicts - Check for overly broad CSS selectors in your theme
Next Steps
- Search Widget — Add AI-powered search
- Widget Styling — Customize colors, fonts, and layout
- Framework Integration — React, Vue, and Next.js guides