Overview
The Vambe Webchat is a powerful tool that allows customers to interact with your AI assistant directly from your website, enabling real-time communication and instant support.Quick Start
Prerequisites
- Active Vambe account
- Access to your website’s HTML code
- Your Vambe API credentials
Installation Steps
1
Access Your Vambe Account
Log in to your Vambe account at app.vambeai.com
2
Navigate to Channels & Accounts
Go to Settings → Channels & AccountsYou can access this directly at: app.vambeai.com/settings?q=channels
3
Add Webchat Channel
- Click “Add Channel” 2. Select “Webchat” from the available options
- Give your webchat channel a descriptive name (internal use only, not visible to customers)
4
Get Your Integration Code
- Click on the newly created Webchat channel
- Click the three dots menu (⋮)
- Select the code icon (
<>) - Copy the provided script code
5
Add Code to Your Website
Paste the copied code into the
<body> section of your website’s HTML, preferably just before the closing </body> tag.6
Test the Integration
Refresh your website and you should see the Vambe chat widget appear in the corner of your page.
Success! Your webchat is now live on your website. Customers can start
chatting with your AI assistant immediately.
Configuration Options
After the basic installation, you can customize your webchat with various options:Basic Configuration
Configuration Reference
string
required
Your Vambe client ID (found in the integration code)
string
required
Your webchat channel ID (found in the integration code)
string
default:"\"\""
The name of the agent displayed in the chat. Example:
"Sofia", "Customer Support"string
default:"\"\""
URL to the agent’s avatar image. Must be a valid image URL (JPG, PNG, SVG, etc.)Example:
"https://your-domain.com/avatar.png"string
The user ID from your system. Use this if you’re embedding the webchat on a page where users are already logged in.This allows you to:
- Track conversations by your user IDs
- Link chat history across sessions
- Use with POST /api/public/webchat/contact/add-metadata endpoint
string
The user’s name from your system. Use when embedding on authenticated pages.
boolean
default:false
Request user’s phone number before starting the chat.
boolean
default:false
Request user’s email before starting the chat.
boolean
default:false
Request user’s name before starting the chat. If not provided, contact will be
named “Webchat Contact” in Vambe.
boolean
default:false
Enable dark theme for the webchat widget.
string
default:"\"#2994FF\""
Primary color for the chat widget. Must be a valid hex color code.Examples:
"#2994FF", "#FF5733", "#00AA00"string
default:"\"es\""
Chat interface language. Options:
"es" (Spanish) or "en" (English)array
default:[]
Up to 4 suggested questions displayed to start the conversation.Example:
string
default:"\"\""
Text displayed next to the chat button. Example:
"Chat with us", "Need help?"number
default:20
Horizontal position of the chat button in pixels from the right edge.
number
default:20
Vertical position of the chat button in pixels from the bottom edge.
Advanced Examples
Example 1: E-commerce Website
Example 2: Logged-in User Area
Example 3: Multilingual Support
Example 4: Dark Theme for Dark Websites
Customization Tips
Choosing Colors
- Primary Color: Used for buttons, headers, and accents
- Brand Alignment: Use your brand’s primary color
- Contrast: Ensure good contrast with white/dark backgrounds
- Test: Test with both light and dark themes
Positioning the Widget
Creating Effective Suggested Questions
✅ Good Examples:Integration with User Data
Pass User Information
If users are logged in on your website, pass their information:Add Metadata After Chat Start
Use the webchat metadata endpoint to enrich contact data:Common Integrations
WordPress
Add to your theme’sfooter.php before </body>:
React/Next.js
Vue.js
Shopify
Add to Online Store → Themes → Edit Code →theme.liquid before </body>:
Advanced Features
Conditional Loading
Only load webchat on specific pages:Dynamic User Identification
Custom Styling
While the widget is pre-styled, you can adjust positioning and behavior:Best Practices
Performance
- Load Asynchronously: The script loads async by default
- After Page Load: Consider loading after main content
- Lazy Load: Load only when user interacts
User Experience
- Collect Minimal Info: Only ask for necessary information
- Clear Suggestions: Provide helpful suggested questions
- Brand Consistency: Match your website’s colors and style
- Mobile Friendly: Test on mobile devices
- Response Time: Configure AI for quick responses
Privacy & Compliance
Troubleshooting
Widget Not Appearing
Check script is loaded
Check script is loaded
Open browser console and verify:Should show your configuration object.
Verify IDs are correct
Verify IDs are correct
Check that
clientId and channelId match your Vambe account settings.Check for JavaScript errors
Check for JavaScript errors
Open browser DevTools (F12) → Console tab Look for errors related to the
webchat script.
Verify script source
Verify script source
Ensure
https://vambeai.com/webchat.js is accessible and loading.Widget Styling Issues
- Z-index: If widget appears behind other elements, adjust z-index
- Mobile: Test responsiveness on different screen sizes
- Colors: Verify hex color codes are valid
- Images: Ensure avatar URL is accessible and CORS-friendly
Data Not Syncing
- External User ID: Verify externalUserId matches your system
- Metadata Endpoint: Use correct endpoint for webchat contacts
- API Key: Ensure API key has proper permissions
Testing Your Integration
Local Testing
- Open your website in a browser
- Click the chat button - should open chat interface
- Send a test message - verify it appears in Vambe dashboard
- Check contact creation - go to Vambe → Contacts
- Verify metadata - if using externalUserId, check it’s saved
Production Checklist
- Chat button visible and positioned correctly
- Colors match your brand
- Suggested questions are relevant
- Agent name and icon display properly
- Language is correct
- Form fields (name/email/phone) work as expected
- Messages appear in Vambe dashboard
- Contacts are created with correct information
- Mobile version works properly
- No console errors
Related Resources
- Webchat Metadata Endpoint - Add metadata to webchat contacts
- Contact Management - Manage webchat contacts
- Analytics - Track webchat performance
- Webhooks - Real-time notifications for webchat events
