# 🤖 AI Chatbot & Live Chat for WordPress (ChatGPT & Gemini) by WebChatAgent

**Contributors:** webchatagent  
**Tags:** chatbot, ai, live-chat, chatgpt, gdpr
**Requires at least:** 5.8  
**Tested up to:** 7.0  
**Stable tag:** 1.1.0  
**License:** GPLv2 or later  
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html  

Add a GDPR-compliant, AI-powered chatbot **and live chat** widget to your WordPress site. Answer visitors 24/7, capture leads, book appointments, and hand over conversations to humans when it matters – powered by OpenAI ChatGPT, Google Gemini, xAI Grok, Mistral AI and more. Includes a generous free plan, no coding required.

## ✨ Features

- **Generous Free Plan** – Start for free on WebChatAgent.com and upgrade only when you need more traffic, pages, or advanced features
- **Inline Chat Embed (Shortcode & Block)** – Place the chat directly inside any page or post with the `[webchatagent_inline]` shortcode or the "WebChatAgent Inline Chat" Gutenberg block
- **Hybrid AI Chatbot + Live Chat** – Let the AI handle common questions and let humans jump in via live chat when needed
- **Human Takeover / Agent Inbox** – View all conversations in one place and take over any chat in real time from the WebChatAgent inbox
- **Smart Contextual Answers** – Uses RAG (Retrieval-Augmented Generation) to answer based on your website content and uploaded documents
- **Multi-LLM Support** – Switch between OpenAI ChatGPT, Google Gemini (incl. Gemini 3.5 Flash), xAI Grok, and Mistral AI models
- **Message Streaming** – Bot responses appear word by word in real time for a natural, modern chat experience
- **Voice Input** – Visitors can dictate their messages via the microphone button in the chat widget
- **Live URL Answers** – Visitors can paste a link in the chat and the bot reads that page to answer questions about it
- **JavaScript Page Crawling** – The website crawler renders JavaScript-heavy pages (SPAs), so their content becomes chatbot knowledge too
- **AI-Assisted Setup** – Let AI write your widget texts, assistant role and prompt buttons based on your website
- **Temperature Control** – Adjust per chatbot how creative or how precise the answers should be
- **Custom Fonts** – Use your brand font in the chat widget, with multilingual fallback recommendations
- **Kanban Ticket Management** – Manage support requests from chats as tickets on a kanban board
- **Team Permissions** – Per-chatbot access control for your team members
- **GDPR / DSGVO Compliance** – Anonymized IP storage and automatic cleanup of old conversations and personal data after a configurable retention period
- **Action Bar & Form Builder** – Add a customizable action bar with up to 5 buttons: external links, WhatsApp contact, Calendly scheduling, and custom lead-collection forms
- **Proactive Triggers** – 9 intelligent trigger types (time on page, exit intent, scroll depth, inactivity, URL match, section visibility, returning visitor, pages visited, rage click) with AI-generated messages
- **Calendly Integration** – Embed your Calendly scheduling page directly inside the chat widget — no redirects
- **WhatsApp Button in Widget** – QR code on desktop, direct link on mobile — visitors can start a WhatsApp conversation from the chat widget header
- **WhatsApp Business Integration** – Let your bot respond to customers on WhatsApp via your business number
- **Knowledge Tester** – AI generates test questions from your knowledge base, grades answers, and can fix gaps with one click
- **Content Search** – Search through the actual content of all your data sources with hybrid AI + keyword matching
- **Custom MCP Server Support** – Connect your own Model Context Protocol servers for advanced, self-hosted or custom AI models
- **Confluence & Notion Integration** – Import wiki pages, knowledge bases, and databases directly into your chatbot (Premium+)
- **AI Chat File Upload** – Visitors can upload files and images in the chat for AI analysis (Premium+)
- **In-Chat Appointments & Bookings** – Allow visitors to book appointments directly in the chat (with Google Calendar sync on supported plans)
- **AI Team Wiki** – Publish an AI-assisted team knowledge base on your own subdomain
- **Tool Integrations** – Connect your chatbot with external services and systems to perform real actions  
  - **Lead Management** – Automatically collect, qualify and manage potential customer information  
  - **Feedback Management** – Gather and analyze user feedback to improve your service and the bot  
  - **Questions Management** – Track and categorize all questions asked to your chatbot
- **API Connector for WooCommerce & More** – Connect your shop so customers get instant answers  
  - **WooCommerce Order Status** – Customers ask "Where is my order?" and your chatbot checks WooCommerce and answers in seconds  
  - **WooCommerce Product Info** – Let customers ask about product availability, prices or details from your shop  
  - **Account & Order History** – Look up customer accounts, past orders or membership status automatically  
  - **Support Ticket Updates** – Show real-time status of support requests without manual lookup  
  - **Ready-Made WooCommerce Template** – Get started in minutes with our pre-built WooCommerce connector — no coding needed  
  - **Secure by Design** – Customers must verify their identity (e.g. order email) before seeing personal data
- **Analytics Dashboard** – See how your bot performs with metrics like leads, bookings and unanswered questions (on supported plans)
- **Multilingual Support** – Automatically detects and responds in the visitor’s language; human replies can be translated as well
- **WCAG 2.2 AA Accessibility** – Built to be accessible for all visitors, including those with disabilities
- **Spam & Abuse Protection** – Prevents chatbot abuse and protects against unexpected usage spikes
- **Drag & Drop File Upload** – Upload PDF, Word, Excel, and text files by dragging them onto the Data Sources tab
- **Bulk Actions** – Select multiple data sources and delete or re-index them all at once
- **Complete Customization** – Customize appearance, persona, colors, fonts, behavior and more from the WebChatAgent dashboard
- **Custom Role Presets** – 6 ready-made chatbot personas to get started in seconds
- **Live Preview** – See changes to your widget in real time in the WebChatAgent admin; the WordPress plugin shows a live preview iframe
- **Responsive Design** – Works perfectly on all devices and screen sizes
- **Simple Embedding** – Install the plugin, connect your Chatbot ID, and the chat widget appears on your selected pages
- **Lead Generation** – Engage visitors, answer questions and qualify leads automatically around the clock

## 🚀 Installation

1. Upload the `webchatagent` folder to the `/wp-content/plugins/` directory of your WordPress installation **or** install it directly via the WordPress plugin directory.
2. Activate the plugin in the WordPress admin area under **“Plugins”**.
3. Register or log in at **https://webchatagent.com** and create your chatbot.
4. Copy your **Chatbot ID** from the WebChatAgent dashboard.
5. In WordPress, navigate to **“WebChatAgent”** in the admin menu and paste your Chatbot ID.
6. Enable the widget to display it on your website.

Once connected, all design, behavior and AI settings are managed from the WebChatAgent dashboard. The WordPress plugin focuses on embedding and showing a live preview of your chatbot.

## ⚙️ Configuration Options

Most configuration options (design, persona, messages, live chat rules, WhatsApp, appointments, etc.) are managed directly in the WebChatAgent dashboard.

In the WordPress admin, the plugin currently exposes:

- **Enable Chatbot** – Turns the floating chat widget on or off on your WordPress site.
- **Chatbot ID** – The unique ID of your chatbot (required to connect your site to WebChatAgent).

### Inline Embed (Shortcode & Block)

To place the chat *inside* your content instead of (or in addition to) the floating button, use:

- the `[webchatagent_inline]` shortcode (Classic Editor, page builders, text widgets), or
- the **WebChatAgent Inline Chat** Gutenberg block (WordPress 5.8+).

Both use the Chatbot ID from the plugin settings. Override it per embed with `[webchatagent_inline chatbot-id="..."]` or via the block sidebar. The inline embed works independently of the **Enable Chatbot** toggle, and the inline widget script is loaded only on pages that use it.

All other settings (theme color, title, welcome message, widget behavior, human takeover rules, integrations, etc.) are read-only in WordPress and are loaded from your WebChatAgent account. You can adjust them anytime at **https://webchatagent.com** and the changes will automatically be reflected in the WordPress widget.

The plugin includes a **live preview iframe** that shows your current widget as configured in WebChatAgent, using the active WordPress language where possible.

## 🛠️ Dashboard Tools

When you register at **WebChatAgent.com**, you get access to a full-featured dashboard:

### Live Chat & Human Takeover

Use the **Agent Inbox** to see all conversations in one place. Let the AI handle most questions and step in manually whenever needed:

- Take over any ongoing AI conversation with one click
- Reply as a human and let the AI continue afterwards
- Use auto-translation to chat with visitors in their own language

### Lead Management

Collect contact information from website visitors through your chatbot. Categorize leads, track status, and follow up efficiently with potential customers. Combine AI qualification with human follow-up in the inbox.

### Feedback Management

Gather and analyze user feedback to improve your products, services and chatbot responses. Track sentiment and spot recurring issues or feature requests.

### Questions Management

Monitor all questions asked to your chatbot. Identify common topics, improve your knowledge base, and ensure your chatbot provides accurate answers.

### Appointments & Bookings

Let visitors book appointments directly in the chat. On supported plans you can sync bookings with **Google Calendar**, reducing back-and-forth emails and no-shows.

### Custom MCP Server Integration

For advanced users, connect to your own **Model Context Protocol (MCP)** servers to use self-hosted or specialized AI models with your chatbot and tools.

### Action Bar & Form Builder

Add a customizable action bar at the bottom of your chat widget with up to 5 buttons:

- **External Links** – Direct visitors to your shop, booking page, or any URL
- **WhatsApp Contact** – Visitors start a WhatsApp conversation with one click
- **Custom Forms** – Collect leads with forms you build (8 field types: text, email, phone, textarea, dropdown, checkbox, number, info)
- **Calendly Scheduling** – Embed your Calendly page directly inside the widget — no redirects

Form submissions are automatically saved as leads. All labels are auto-translated to the visitor's language on paid plans. Available on Standard plans and above.

### Proactive Triggers

Start conversations automatically based on visitor behavior — instead of waiting for them to click the chat button:

- **9 Trigger Types** – Time on Page, Exit Intent, Scroll Depth, Inactivity, URL Match, Section Visibility, Returning Visitor, Pages Visited, Rage Click
- **3 Response Modes** – Static message, AI context on reply, or fully AI-generated greetings
- **Trigger Combinations** – Combine triggers with AND logic (e.g. scroll 70% + time on page 45s)
- **Anti-Annoyance Protection** – Built-in limits, cooldowns, and permanent dismiss options

Available on Standard plans and above.

### Knowledge Tester

Find gaps in your chatbot's knowledge before your customers do:

- **Auto-Generated Tests** – AI creates realistic questions and grades your chatbot's answers
- **Custom Questions** – Test with your own questions — the AI generates alternative phrasings
- **One-Click Fixes** – Missing answer? AI generates the content and adds it as a data source

### WhatsApp Business Integration

Connect your WhatsApp Business number and let your AI chatbot answer messages 24/7. Manage WhatsApp conversations alongside website chats in the WebChatAgent inbox. A WhatsApp button in the chat widget header shows a QR code on desktop or opens WhatsApp directly on mobile.

### Confluence & Notion Integration

Connect your Confluence Cloud or Notion workspace and import pages, databases, and documentation directly into your chatbot. Supports incremental sync and automatic re-indexing on configurable intervals (Premium+).

### API Connector for WooCommerce & More

Let your chatbot answer questions that require live data from your WooCommerce shop or other business systems. Instead of just answering general questions, your chatbot can look up real information for each customer.

**WooCommerce examples:**

- **"Where is my order #12345?"** – The chatbot checks your WooCommerce shop and tells the customer the current order status
- **"Is the blue T-shirt in size M available?"** – Looks up product stock and availability in WooCommerce
- **"Show me my recent orders"** – Displays the customer's order history from your shop

**Other systems:**

- **Support tickets** – Show ticket status from helpdesk systems
- **Account info** – Look up balances, memberships or custom data from any system

**How to set it up:**

1. Select the **WooCommerce template** (or another template for your system)
2. The chatbot asks customers to verify their identity (e.g. their order email)
3. Once verified, the chatbot can look up their orders, products and personal data

No programming knowledge required — the WooCommerce connector works out of the box.

### Analytics & Reporting

Use the analytics dashboard to see:

- How many conversations your bot handles
- How many leads, bookings and handovers to humans are created
- Which questions remain unanswered and need knowledge base improvements

## 💻 Requirements

- WordPress 5.8 or higher (tested up to 7.0)  
- PHP 7.4 or higher  

## 🔄 External Services

This plugin connects to the WebChatAgent service (**https://webchatagent.com**) to provide chat functionality.

- The service loads an external JavaScript file (`https://webchatagent.com/widget/web-chat-agent.js`) to render the floating chat widget on your website. When you use the inline shortcode or the Gutenberg block, the inline widget script (`https://webchatagent.com/widget/chat-widget-inline.js`) is loaded on those pages instead. These scripts are required for the widgets to function properly.
- When using custom fonts, external resources may be loaded from **Google Fonts** (`https://fonts.googleapis.com`). This means that data may be shared with Google when a visitor views your website with the chat widget enabled.
- The service receives messages from visitors to your website when they use the chat. Data is only sent when a visitor interacts with the chat.

For more information, please see:

- Terms of Service: https://webchatagent.com/terms  
- Privacy Policy: https://webchatagent.com/privacy-policy  

We operate in accordance with GDPR.

## 🔒 License

GPLv2 or higher

## 📝 Changelog

### 1.1.0
* Added: [webchatagent_inline] shortcode to embed the inline chat widget in any page, post or text widget
* Added: "WebChatAgent Inline Chat" Gutenberg block with optional per-block Chatbot ID (WordPress 5.8+)
* Added: Optional chatbot-id attribute to override the global Chatbot ID per embed
* Added: New "Inline Embed" tab in the plugin settings with a copy-ready shortcode snippet
* Improved: Inline embeds load the widget script only on pages that use them
* Compatibility: Minimum required WordPress version is now 5.8

### 1.0.5
* Added: Bundled translations for German, Spanish, French, Italian, Dutch and Russian (admin UI and privacy policy text)
* Fixed: Plugin text domain is now loaded, so translations actually apply
* Improved: Admin JavaScript messages (media uploader, validation alerts) are now translatable

### 1.0.4
* Compatibility: Tested up to WordPress 7.0
* Docs: documented new platform features — voice input, live URL answers, JavaScript page crawling, AI-assisted widget text & role generation, kanban ticket management, temperature control, custom fonts, per-chatbot team permissions, GDPR data retention auto-cleanup
* Docs: updated model list (Gemini 3.5 Flash)
* Docs: GDPR/DSGVO compliance now highlighted in description, features and FAQ; `gdpr` tag added

### 1.0.3
* Changed: WordPress admin now shows read-only values loaded from the public endpoint
* Changed: Only Chatbot ID and Enable remain editable; other settings are managed in the WebChatAgent dashboard
* Added: Color swatches for theme and message colors in admin preview
* Improved: Preview iframe sets html lang to current WP language

### 1.0.2
* Added: Hide branding option in General tab (now managed in WebChatAgent dashboard)
* Added: Speech bubble text option in Messages tab
* Added: Chat button image URL option in Appearance tab
* Added: Live preview support for new options
* Added: Documentation for dashboard tools (Leads, Feedback, Questions)
* Added: Documentation for custom MCP server support
* Improved: Widget rendering to include new attributes

### 1.0.0
* Initial release
