Introduction
Welcome to the MxChat Documentation! MxChat is a powerful, AI-driven chatbot plugin for WordPress, designed to elevate user engagement and support with seamless integration and intelligent, real-time interactions. Our mission is to build the most customizable and user-friendly chatbot, helping businesses connect with their audience effortlessly.
In this documentation, you’ll find everything you need to get started, configure, and maximize MxChat’s capabilities, from setup and integration with leading AI models to advanced customization and GDPR compliance options. Let’s make your site’s user experience smarter, faster, and more engaging with MxChat!
For additional guidance and demos, visit our YouTube channel, where we showcase various features and provide helpful tutorials.
Installation
Requirements
This plugin requires WordPress version 5.0 or higher and PHP 7.2 or higher.
Installation Steps
- Download the MxChat plugin from the WordPress Plugin Directory or install it directly from your WordPress admin panel by searching for “MxChat” under Plugins > Add New.
- Activate the plugin through the ‘Plugins’ menu in your WordPress dashboard.
- Navigate to the ‘MxChat’ settings page to configure your OpenAI API key and other settings.
Usage
Shortcodes
MxChat provides shortcodes for easy placement of the chatbot on any page or post:
-
[mxchat_chatbot floating="yes"]
: Displays the chatbot as a floating widget on the page. -
[mxchat_chatbot floating="no"]
: Embeds the chatbot directly within the page content.
These shortcodes allow you to choose between a floating or in-page chatbot, depending on your preference and page design.
Appending to Body
To make the chatbot accessible across your entire site, enable the “Append to body” option in the MxChat settings. This setting is located on the main MxChat plugin page, under the “Chatbot” tab. Simply scroll down until you find the toggle labeled “Append to body.” Enabling this option ensures that the chatbot appears on every page, providing site-wide accessibility without the need to add shortcodes manually to individual pages. This is the recommended setup for consistent chatbot presence across your website.
Configuration
API Key
To configure the MxChat plugin, you will need API keys for the AI models you’d like to integrate. Here’s a breakdown of the API requirements:
- OpenAI API Key (Required): An OpenAI API key is necessary for core functionality, as OpenAI’s models are used for embeddings, intents, and content generation. This key is essential even if you plan to use other models.
- X.AI API Key (Optional, Pro Feature): For advanced conversational capabilities, you can also integrate models from X.AI. Obtain your X.AI API key to access models like `grok-beta` for human-like and context-aware responses. This is available in the Pro version.
- Claude API Key (Optional, Pro Feature): MxChat supports Anthropic’s Claude models for intelligent, nuanced interactions. To use Claude models, such as Claude 3.5 Sonnet, obtain your Claude API key. This feature is also part of the Pro version.
Once you have the necessary API keys, enter them in the MxChat settings page to start using the AI models of your choice.
Customization
MxChat offers a wide range of customization options to ensure the chatbot matches your brand’s look and feel. The Pro version unlocks extensive customization, allowing you to adjust both the appearance and behavior of the chatbot through user-friendly settings within the WordPress panel.
Theme and Color Customization
You can personalize the chatbot’s theme colors to align with your website’s design. Available color options include:
- Close Button & Title Color
- Chatbot Background Color
- User Message Background & Font Color
- Bot Message Background & Font Color
- Top Bar Background Color
- Send Button & Chat Input Font Color
- Floating Widget Background & Icon Color
Text and Behavior Customization
Beyond appearance, you can customize several textual and interactive elements for a more engaging experience:
- Top Bar Title: Set a custom title for the chatbot’s top bar.
- Introduction Message: Create a personalized welcome message.
- Pre-Chat Popup Message: Display a message before users engage with the chatbot.
- Input Field Placeholder Text: Customize the hint text where users type their messages.
- Rate Limits and Rate Limit Message: Configure how often users can interact and set a message for when the limit is reached.
- Privacy Notice Toggle: Enable or disable a privacy notice to inform users about data use.
- Popular Questions: Set up to three frequently asked questions to display as clickable buttons, making it easy for users to initiate common queries.
These options enable you to craft a chatbot experience that is consistent with your brand while providing an engaging and personalized experience for users.
Models
With MxChat, you have access to a variety of powerful AI models from OpenAI, X.AI, and Claude (Anthropic). Each model offers unique capabilities, allowing you to choose the best fit for your chatbot’s needs, whether for simple customer interactions or complex, real-time responses.
OpenAI Models
MxChat supports a range of OpenAI models that cater to different levels of conversational complexity. These models are ideal for both basic and advanced use cases, providing high-quality, intelligent responses.
- GPT-4o (Recommended): OpenAI’s flagship model for handling complex, multi-step tasks, suited for high-level AI interactions.
- GPT-4o-mini: A lightweight version of GPT-4o, balancing speed and intelligence, ideal for simpler conversations.
- GPT-4-turbo: An advanced model with high intelligence, designed for deep reasoning and complex queries.
- GPT-4: The previous generation model, known for its high performance in creative and complex tasks.
- GPT-3.5-turbo: A fast and cost-effective model suitable for straightforward tasks and quick responses.
X.AI Models (Pro Feature)
For advanced conversational needs, MxChat includes models from X.AI, available in the Pro version. X.AI models are designed for human-like interactions and excel in delivering context-aware, natural conversations.
- grok-beta (Early Beta): X.AI’s latest model in early beta, offering advanced language comprehension for highly personalized and context-driven responses.
Claude (Anthropic) Models (Pro Feature)
Anthropic’s Claude models, available in the Pro version, are optimized for high-intelligence, nuanced interactions. They are ideal for users seeking responsive and detailed conversational capabilities.
- Claude 3.5 Sonnet (Most Intelligent): Designed for complex conversations, capable of handling in-depth queries with a high degree of understanding.
- Claude 3 Opus (Highly Complex Tasks): Ideal for intricate tasks that require detailed responses and advanced reasoning.
- Claude 3 Sonnet (Balanced): A versatile model that combines speed and intelligence, fitting most use cases effectively.
- Claude 3 Haiku (Fastest): Optimized for fast responses with reliable accuracy, perfect for quick interactions.
These models offer flexibility and performance for a wide range of applications, ensuring that MxChat can handle everything from simple customer support queries to complex, real-time interactions.
Intents
Overview of Intents
In MxChat, intents define specific actions or responses that the chatbot can execute based on user input. Intents allow the chatbot to perform tasks such as capturing emails, answering product inquiries, and assisting with checkout. Each intent is designed to meet specific user needs and enhance the chatbot’s interactivity and functionality. Some intents are available to all users, while others are exclusive to Pro users, offering advanced eCommerce and engagement features.
To determine the user’s intent, MxChat uses vector embeddings, a technique that helps the chatbot understand the meaning behind user messages by comparing sentence similarities. This allows MxChat to recognize and respond to a wide variety of phrases for each intent, even if the phrasing differs. For example, the chatbot can understand that phrases like “I’m ready to checkout” and “go to checkout” mean the same thing and trigger the checkout intent accordingly. This capability enables MxChat to deliver accurate and relevant responses, making interactions feel natural and intuitive for users.
Chat with PDF
The Chat with PDF intent allows the chatbot to process and extract content from PDF documents provided by a URL. This feature leverages advanced vector embedding techniques to ensure precise and contextually relevant responses based on the document’s content. Users can ask detailed questions about the PDF, and the chatbot intelligently identifies and retrieves the most relevant sections of the document to respond effectively.
How the Chat with PDF Intent Works
When a user provides a valid URL to a PDF file, the chatbot processes the document by splitting it into pages and creating vector embeddings for each page. These embeddings allow the chatbot to compare the user’s query with the content of the PDF and retrieve the most relevant information, ensuring accurate answers. If multiple pages are relevant, the chatbot includes the surrounding pages to provide full context.
This feature is ideal for scenarios such as answering questions about product catalogs, user manuals, or detailed reports. By using embeddings, the chatbot can respond to specific inquiries without needing to process the entire document repeatedly.
Example Key Phrases for Chat with PDF Intent
Here are some example key phrases that a website owner might configure to trigger the Chat with PDF intent:
process this PDF, analyze this PDF, read this document, process the file, check this PDF link
These phrases can be configured in the chatbot’s intent settings. When users provide queries similar to these, the chatbot will detect their intent to process a PDF and guide them accordingly.
Example of Asking Questions About the PDF
Once the PDF is processed, users can ask questions about its content. For instance:
What does page 5 of the document cover?
Who is mentioned in the acknowledgments section?
The chatbot will search the content of the PDF and return answers based on the user’s query, using the embeddings to pinpoint the relevant sections.
Important Notes
- The PDF URL must be publicly accessible and use the HTTPS protocol.
- Only text-based PDFs are supported; image-based PDFs without OCR will not provide usable content.
- The chatbot processes one PDF per session. If a new PDF URL is provided, it will replace the previous one.
Email Capture
The Email Capture intent allows the chatbot to collect email addresses from users, which is useful for building a mailing list, offering discounts, or following up with leads. This feature is available to all users and integrates with Loops, a platform for managing mailing lists.
How to Set Up Email Capture with Loops
Follow these steps to configure the Email Capture intent:
- Enter your Loops API Key: In the Loops Settings section, paste your Loops API key and click “Save.”
- Select a Mailing List: After saving your API key, refresh the page, and you’ll see an option to select a mailing list from your Loops account. Choose the list where you’d like to store collected email addresses.
- Configure Triggered Phrase Response: This is the automatic response the chatbot will give when it detects a trigger phrase. For example, you might set it to: “I’ve got a discount offer for you! Just drop your email, and I’ll send over the code!”
- Configure Email Capture Response: This is the chatbot’s follow-up message after a user has provided their email address. For instance, it could be: “Thanks! Your discount code is on its way to your inbox. Anything else I can help you with?”
Once these settings are configured, the chatbot will be able to detect specific trigger phrases and respond accordingly, guiding users to submit their email addresses.
Example Key Phrases for Email Capture Intents
Here are some example key phrases that you might set up to trigger the Email Capture intent. These examples show two different use cases: a discount code and a newsletter sign-up.
1. Coupon Code Offer
discount code, get a discount, send me a coupon, I want a coupon, how do I get a discount
In this example, if a user mentions any of these phrases, the chatbot will respond with the Triggered Phrase Response, encouraging them to submit their email to receive a discount code.
2. Newsletter Sign-Up
sign me up for the newsletter, subscribe me, I want to join the mailing list, newsletter subscription, email updates
Here, if a user expresses interest in signing up for a newsletter, the chatbot will prompt them to submit their email and will respond with the Email Capture Response once their email is received.
Show Product Card
The Show Product Card intent allows the chatbot to detect when a user is asking about a product, and it displays a WooCommerce product card with relevant details. This feature is part of the Pro version and enhances user experience by providing immediate product information in a visually engaging format.
How the Show Product Card Intent Works
When a user mentions a product by name, the chatbot attempts to identify the product based on their message. If the product is found, the chatbot will display a product card that includes:
- Product Image: A thumbnail image of the product, making it easy for users to recognize.
- Product Name: The name of the product as listed in WooCommerce.
- Product Price: The current price of the product, shown directly on the card.
- Add to Cart Button: A button that allows users to add the product to their cart directly from the chat, creating a seamless shopping experience.
If a user asks follow-up questions about a product they recently inquired about, the chatbot can remember the last discussed product and continue to display its information, providing a smooth, continuous interaction.
Example Key Phrases for Product Inquiries
Below are some example phrases that could trigger the Show Product Card intent. These examples help the chatbot recognize when a user is asking about a specific product:
show me the product, tell me about the product, what is the price of MxChat, what features does MxChat have, product details for MxChat
In these examples, if the chatbot detects a specific product name within the phrase, it will display the product card with the details for that product. This feature enhances user engagement and supports quick shopping actions within the chat.
Order History
The Order History intent allows logged-in users to retrieve details about their past WooCommerce orders directly within the chat. This feature is part of the Pro version and offers a seamless way for users to check their order history without navigating away from the chat.
How the Order History Intent Works
When a user asks about their previous orders, the chatbot checks if they are logged in to retrieve the necessary details. Based on the user’s query, the chatbot can either show the most recent order or provide a summary of all past orders. The order information displayed includes:
- Order Number: A unique identifier for each order.
- Order Date: The date the order was placed.
- Order Status: The current status of the order (e.g., completed, pending).
- Total Amount: The total cost of the order.
- Items Ordered: A list of items in the order.
If the user is not logged in, the chatbot will prompt them to log in to access their order history.
Example Key Phrases for Order History
Below are some example phrases that users can say to view their order history:
order history, last order, recent orders, view my orders, what did I order last time
These phrases trigger the chatbot to fetch and display order details, providing users with a quick and convenient way to check their past orders directly within the chat.
Generate Image
The Generate Image intent allows the chatbot to create images based on user requests. This feature, available in the Pro version, uses OpenAI’s DALL-E model to produce unique images based on descriptive prompts provided by users. It’s ideal for creative applications, enabling users to request visual content directly within the chat.
How the Generate Image Intent Works
When a user provides a description, such as “generate an image of a sunset over the ocean,” the chatbot sends this prompt to OpenAI’s DALL-E image generation model. The AI then creates an image that reflects the request, returning it within the chat as a visual response. The image card includes:
- Generated Image: An AI-generated image based on the user’s description.
- Customizable Prompt: The chatbot can understand a variety of descriptive prompts, allowing users to get creative with their requests.
If the AI cannot generate an image based on the request, the chatbot will inform the user with a fallback message.
Example Key Phrases for Image Generation
Here are some example phrases users can use to trigger image generation. These phrases allow the chatbot to recognize when a user is requesting an image:
generate an image of a sunset, create a picture of a forest, draw a city skyline, show me an image of a mountain, make an image of a futuristic city
In these examples, the chatbot interprets the user’s description and generates a unique image that aligns with the requested theme or scene.
Brave Web Search
The Brave Web Search intent allows the chatbot to perform a web search using the Brave Search API, fetching information from the internet to answer user queries. This feature is available to all users and can be used for general web searches or news-specific searches, depending on the user’s request.
Brave Search API Key Requirement
To enable this feature, you’ll need an API key from Brave. You can sign up for an API key at the Brave Search API page. Once you have your key, enter it in the Brave Search Settings in the MxChat plugin configuration to allow the chatbot to retrieve search results.
How the Brave Web Search Intent Works
When a user requests information, the chatbot identifies key terms in the message, such as “search the web for” or “news about,” to detect that a web search is needed. Based on the user’s request, the chatbot can perform:
- General Web Search: The chatbot retrieves general web results that are relevant to the user’s query, displaying titles, URLs, descriptions, and source information.
- News Search: If the query includes terms like “news,” the chatbot specifically searches for recent news articles, providing a summary with article titles, publication dates, descriptions, and sources.
If no query is provided, or if the chatbot cannot find relevant information, it will prompt the user to refine their search or notify them that results are unavailable.
Example Key Phrases for Brave Web Search
Here are some example phrases that users might use to trigger a Brave Web Search:
search the web for AI advancements, show me the latest news about technology, what’s the news in New York, news about climate change, find articles on health tips
These phrases prompt the chatbot to fetch and display relevant information from Brave’s search engine, helping users quickly access web or news content directly within the chat.
Brave Image Search
The Brave Image Search intent allows the chatbot to perform an image search using the Brave Search API, retrieving relevant images based on user input. This feature is available to all users and enables the chatbot to show images directly in the chat, enhancing the user experience with visual content.
How the Brave Image Search Intent Works
When a user requests an image, the chatbot first processes the user’s message through a predefined model from OpenAI. This model helps interpret the user’s query by identifying the essential keywords needed for the image search, removing any unnecessary words or phrases. For example, if a user asks, “Could you find me an image of a beach at sunset?”, the model simplifies the request to focus on the key terms, such as “beach sunset.”
The refined search query is then sent to Brave’s image search API, which returns a set of images matching the request. The chatbot displays these images in a gallery format within the chat, including:
- Image Thumbnail: A clickable thumbnail that opens the full image in a new tab.
- Image Title: A short description or title of the image, if available.
If the chatbot cannot find relevant images, it prompts the user to provide a more specific query or notifies them that no results were found.
Example Key Phrases for Brave Image Search
Here are some example phrases that users might use to trigger an image search:
find an image of a mountain, show me a picture of a forest, search for images of modern architecture, I want to see photos of the ocean, look up images of cute animals
These phrases prompt the chatbot to interpret the key terms and retrieve relevant images, allowing users to easily view visual content based on their interests.
Add to Cart
The Add to Cart intent allows users to add WooCommerce products directly to their cart through the chatbot interface, streamlining the shopping experience. This feature is part of the Pro version and enables users to quickly add items without leaving the chat.
How the Add to Cart Intent Works
When a user expresses interest in adding a product to their cart, the chatbot will check if there is a “last discussed product” in the conversation. This feature remembers the last product that was mentioned, so users can add it to their cart simply by saying something like “add to cart” without repeating the product name.
If the product is successfully added to the cart, the chatbot will confirm with a message, such as “The product has been added to your cart.” The chatbot will also prompt the user to proceed to checkout if desired. If no recent product is identified, the chatbot will prompt the user to specify the product they’d like to add.
Example Key Phrases for Adding to Cart
Here are some example phrases users might say to add a product to their cart:
add to cart, put this in my cart, I want to buy this, add this product to my cart, include this in my cart
In these examples, the chatbot will detect the intent to add a product and confirm once it has been added to the cart, making the shopping process quick and convenient.
Proceed to Checkout
The Proceed to Checkout intent allows users to go directly to the WooCommerce checkout page from within the chatbot, making the purchasing process quick and seamless. This feature is part of the Pro version and enables users to complete their purchase without navigating away from the chat.
How the Proceed to Checkout Intent Works
Once a user has added items to their cart, they can ask the chatbot to proceed to checkout. If there is an active checkout prompt and items in the cart, the chatbot will provide a link to the checkout page, allowing the user to complete their purchase immediately. If no items are in the cart, the chatbot will prompt the user to add items first.
This intent is useful for creating a smooth, end-to-end shopping experience by guiding users from product selection to checkout within the chat interface.
Example Key Phrases for Proceeding to Checkout
Here are some example phrases that users might say to go to the checkout page:
proceed to checkout, checkout now, I’m ready to checkout, go to checkout, let’s finish my order
Using these phrases, the chatbot will recognize the intent to proceed to checkout and provide a link, making it easy for users to complete their order.
Data Privacy and Security
We take data privacy and security seriously. MxChat is designed to ensure that your data remains secure and private. Here are some key points regarding how data is handled within MxChat:
Data Handling
All interactions between your site’s visitors and the chatbot stay within your website’s hosting environment. MxChat operates on a “bring your own key” system, meaning you provide your own API key for OpenAI (or other models if using the Pro version). No information is transmitted to our servers or stored by us.
Bring Your Own API Key
By supplying your own API key, your chatbot’s interactions are processed directly between your website and OpenAI (or other AI providers). MxChat does not handle or process any user data on our servers. This ensures that all interactions remain confined to your website’s infrastructure and are never shared with third parties.
Costs and Billing
As a “bring your own key” solution, MxChat doesn’t charge you for data processing. Instead, you’ll work directly with OpenAI or other providers for API billing, allowing you full control over usage and costs without any middleman fees.
For more information on API costs, please refer to the OpenAI Pricing Page.
Knowledge Database
The Knowledge Database in MxChat allows you to add customized content that the chatbot can use to respond to questions specific to your site. Stored securely on your website, this database uses advanced vector embedding to interpret and match user queries with relevant content, even if phrased differently. This ensures responses are accurate and context-aware. Below, you’ll find an overview of how the Knowledge Database works and the various methods for adding content.
Submission Methods
There are several ways to add content to the Knowledge Database:
- Manual Submission: Add specific content directly through the MxChat admin dashboard.
- URL Submission: Submit individual URLs, and MxChat will automatically pull relevant content from each URL to include in the knowledge database.
- Sitemap Submission: Add your site’s sitemap, and MxChat will extract content from each listed URL, keeping your database updated with your latest site content.
- WooCommerce Integration: If using WooCommerce, products can be automatically added, updated, or removed in the Knowledge Database, ensuring accurate and up-to-date product information.
Currently, document uploads are not supported, but MxChat offers flexible ways to ensure your most important content is available in the knowledge database.
Query Matching Process
MxChat uses vector embeddings to process user queries and identify the most relevant content in the knowledge database. Here’s how the process works:
- Vector Embedding for User Query: When a user submits a query, MxChat uses vector embeddings to convert it into a numerical format, capturing the essential meaning and context of the input.
- Comparison with Database Entries: The chatbot then compares this query vector with vectors generated for all entries in the knowledge database. By measuring similarity, MxChat determines which content is most relevant to the user’s question.
- Relevant Response Generation: MxChat retrieves the best-matching content from the database and uses it to generate an accurate and context-aware response for the user.
This process enables MxChat to recognize and respond appropriately to various phrasing styles and queries, ensuring a seamless experience for users.
Managing Content
You can easily search, edit, and delete content within the Knowledge Database directly through the MxChat dashboard. This feature allows you to refine, update, and manage the content that the chatbot references, helping keep information accurate and relevant.
FAQ
coming soon
Support
coming soon