Skip to main content

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 SettingsChannels & AccountsYou can access this directly at: app.vambeai.com/settings?q=channels
3

Add Webchat Channel

  1. Click “Add Channel” 2. Select “Webchat” from the available options
  2. Give your webchat channel a descriptive name (internal use only, not visible to customers)
4

Get Your Integration Code

  1. Click on the newly created Webchat channel
  2. Click the three dots menu (⋮)
  3. Select the code icon (<>)
  4. 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:
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:
❌ Avoid:

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’s footer.php before </body>:

React/Next.js

Vue.js

Shopify

Add to Online StoreThemesEdit Codetheme.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

  1. Load Asynchronously: The script loads async by default
  2. After Page Load: Consider loading after main content
  3. Lazy Load: Load only when user interacts

User Experience

  1. Collect Minimal Info: Only ask for necessary information
  2. Clear Suggestions: Provide helpful suggested questions
  3. Brand Consistency: Match your website’s colors and style
  4. Mobile Friendly: Test on mobile devices
  5. Response Time: Configure AI for quick responses

Privacy & Compliance

Troubleshooting

Widget Not Appearing

Open browser console and verify:
Should show your configuration object.
Check that clientId and channelId match your Vambe account settings.
Open browser DevTools (F12) → Console tab Look for errors related to the webchat script.
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

  1. Open your website in a browser
  2. Click the chat button - should open chat interface
  3. Send a test message - verify it appears in Vambe dashboard
  4. Check contact creation - go to Vambe → Contacts
  5. 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