Website Chat Widget
The Flowbotic Website Chat Widget allows you to embed an AI-powered chat interface directly on your website, enabling visitors to engage with your AI assistants in real-time. This guide covers the setup, customization, and integration of the chat widget.Overview
The Website Chat Widget is a lightweight, customizable component that appears on your website, typically in the corner of the screen. It enables:- Real-time conversations with AI assistants
- Rich interactions with text, buttons, and media
- Seamless handoff to human agents when needed
- Visitor information collection
- Persistent conversation history
[Screenshot placeholder: Website with chat widget open showing a conversation]
Setting Up the Chat Widget
Prerequisites
Before setting up the chat widget, you should have:- A chat assistant already created and tested
- Admin access to your website to add the widget code
- Clear goals for how the widget will be used
Step 1: Create a New Channel
- Navigate to Communication Channels in the sidebar
- Click + Add Channel button
- Select Website Chat Widget
- Click Continue
[Screenshot placeholder: Channel creation screen with Website Chat selected]
Step 2: Basic Configuration
- Channel Name: Give your widget a descriptive name (internal only)
- Assistant: Select the AI assistant that will power this widget
- Website URLs: Enter the domains where this widget will be used
- This is a security measure to prevent unauthorized use
- Add multiple domains if needed (e.g., staging and production)
[Screenshot placeholder: Basic configuration screen for chat widget]
Step 3: Appearance Customization
Configure how your widget looks and behaves on your website:General Appearance
- Theme: Choose between Light, Dark, or System (follows user’s preferences)
- Primary Color: Select a color that matches your brand
- Widget Position: Choose where the widget appears (bottom-right, bottom-left, etc.)
- Border Radius: Adjust the roundness of the widget corners
- Font: Select from available font options or use your website’s font
Widget State
Customize the different states of the widget:-
Closed State:
- Icon or logo
- Widget button size
- Button tooltip text
-
Open State:
- Header title and subtitle
- Header logo/avatar
- Window size (height and width)
- Maximum/minimum size constraints
[Screenshot placeholder: Appearance customization interface with preview]
Step 4: Behavior Settings
Configure how the widget interacts with users:- Initial Message: Set the first message users see when opening the widget
-
Auto-Open: Configure if and when the widget should automatically open
- On page load
- After time delay
- On specific pages
- Based on user behavior
-
Pre-Chat Form: Collect information before starting a conversation
- Name
- Custom fields
- Required vs. optional fields
-
File Attachments: Enable/disable file sharing
- Allowed file types
- Maximum file size
- Usage limits
-
Operation Hours: Set when the widget is available
- 24/7 operation
- Business hours only
- Custom schedule
- Different behavior outside operating hours
[Screenshot placeholder: Behavior configuration screen]
Step 5: Advanced Options
Configure additional features for enhanced functionality:- Persistent Conversations: Allow returning users to continue previous conversations
- User Identification: Connect known user information
- Custom Variables: Pass website data to the assistant for context
- Analytics Integration: Connect with Google Analytics or other tracking
- Language Detection: Automatically detect user language
[Screenshot placeholder: Advanced configuration options]
Step 6: Human Handoff Settings
Configure how conversations transfer to human agents:-
Handoff Triggers:
- User request
- AI confidence threshold
- Specific topics or keywords
- Number of messages exchanged
-
Handoff Behavior:
- Notification method
- Queue messaging
- Routing rules
- Availability status
[Screenshot placeholder: Handoff configuration interface]
Step 7: Generate and Install Code
After configuration, you’ll get a JavaScript snippet to add to your website:- Click Generate Code button
- Copy the provided JavaScript code
- Add the code to your website before the closing
</body>tag
[Screenshot placeholder: Code generation and installation instructions]
Advanced Integration Options
Custom Styling with CSS
You can further customize the widget appearance using CSS variables:JavaScript API
The widget provides a JavaScript API for programmatic control:URL Parameters
You can control the widget through URL parameters:?flowbotic-open=true- Opens the widget automatically?flowbotic-message=Hello- Pre-fills a user message?flowbotic-hide=true- Temporarily hides the widget
Testing Your Chat Widget
After installation, thoroughly test your widget:-
Basic Functionality:
- Does the widget open and close properly?
- Does the assistant respond appropriately?
- Do all buttons and interactive elements work?
-
Appearance Testing:
- Test on different devices (desktop, tablet, mobile)
- Verify the widget looks good in both light and dark modes
- Check that it respects your branding guidelines
-
Integration Testing:
- Verify custom variables are properly passed
- Test user identification features
- Ensure analytics tracking works correctly
-
Conversation Flows:
- Test common user scenarios
- Verify knowledge retrieval is accurate
- Test human handoff functionality
[Screenshot placeholder: Widget testing checklist or testing interface]
Monitoring and Analytics
Track the performance of your chat widget:- Navigate to the Analytics section in the sidebar
- Select the Channels tab
- Choose your Website Chat Widget
- View metrics including:
- Conversation volume
- Average conversation length
- Most common topics
- User satisfaction ratings
- Handoff frequency
[Screenshot placeholder: Analytics dashboard for chat widget]
Best Practices
Widget Placement and Design
- Consistent Placement: Keep the widget in the same position across your site
- Contrasting Colors: Ensure the widget button stands out without clashing
- Clear Purpose: Make it obvious what the widget is for
- Non-Intrusive: Avoid interrupting the user experience
- Mobile-Friendly: Test thoroughly on mobile devices
Conversation Design
- Clear Welcome Message: Set expectations in the initial message
- Conversational Tone: Use natural language appropriate for your brand
- Helpful Fallbacks: Have good responses for queries the assistant can’t answer
- Guided Options: Offer button choices for common inquiries
- Appropriate Length: Keep responses concise for chat format
User Experience
- Fast Response Times: Optimize for quick initial responses
- Typing Indicators: Show when the assistant is “typing”
- Clear Human Handoff: Make it obvious when a human takes over
- Persistent Context: Remember returning users and their history
- Easy Restart: Provide a way to start a new conversation
Performance Optimization
- Lazy Loading: The widget script loads only when needed
- Caching Strategy: Implement proper caching for assets
- Minimal Dependencies: Avoid adding unnecessary code
- Compressed Assets: Use minified code and optimized images
- Content Delivery Network: Use the provided CDN for reliability
Troubleshooting
Widget Not Appearing
Widget Not Appearing
If the widget doesn’t appear on your website:
- Verify the code is properly added before the
</body>tag - Check that your website domain is allowed in the widget settings
- Look for JavaScript errors in your browser’s developer console
- Ensure there are no conflicting scripts blocking the widget
- Try disabling ad blockers that might interfere with the script
Styling Issues
Styling Issues
If the widget doesn’t match your design:
- Verify your primary color is set correctly
- Check for CSS conflicts from your website
- Try using the CSS variables for more precise control
- Test on different browsers to identify browser-specific issues
- Ensure your font choice is available and loaded properly
Assistant Not Responding
Assistant Not Responding
If the assistant isn’t responding properly:
- Check the assistant’s status in the Flowbotic dashboard
- Verify the assistant is correctly associated with the widget
- Test the assistant directly in the testing interface
- Check for knowledge retrieval issues
- Verify API rate limits haven’t been exceeded