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

  1. Download the MxChat plugin from the WordPress plugin repository or from MxChat’s website.
  2. Upload the `mxchat` folder to the `/wp-content/plugins/` directory if downloading manually.
  3. Activate the plugin through the ‘Plugins’ menu in your WordPress dashboard.
  4. Navigate to the ‘MxChat’ settings page to configure your OpenAI API key and other settings.

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

Adjust the appearance and behavior of the chatbot using the customization options in the settings. The Pro version offers extensive customization, allowing you to change colors, fonts, introductory messages, and behavior settings to match your brand.

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.


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:

  1. Enter your Loops API Key: In the Loops Settings section, paste your Loops API key and click “Save.”
  2. 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.
  3. 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!”
  4. 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.

Usage

coming soon

FAQ

coming soon

Support

coming soon