Configuration Guide

Learn how to configure and customize your BotFusion chatbots for optimal performance.

Getting Started

Before diving into detailed configurations, let's ensure you have the basics set up correctly. Follow these steps to create your first chatbot:

1. Create a New Chatbot

From your dashboard, click the "Create New Chatbot" button. You'll need to provide a name and optional description for your chatbot.

2. Choose an AI Model

Select an AI model that fits your needs. BotFusion supports various models with different capabilities and pricing. For most use cases, we recommend starting with GPT-3.5-Turbo.

3. Add Knowledge Sources

Your chatbot needs information to work with. You can add knowledge from:

  • Website URLs (we'll crawl and index the content)
  • PDF documents
  • Text input (for custom instructions or information)

4. Test Your Chatbot

Use the built-in chat interface to test how your chatbot responds. This helps you identify any adjustments needed before deploying to your website.

5. Deploy to Your Website

Once you're satisfied with your chatbot's performance, get the embed code from the "Embed" tab and add it to your website.

Chatbot Settings

Customize your chatbot's behavior and appearance through these essential settings:

Basic Information

  • Name: The internal name of your chatbot (not visible to users)
  • Description: A brief description to help you identify this chatbot
  • Avatar: Upload a custom avatar image for your chatbot

Chat Interface

  • Chat Title: The title displayed at the top of the chat window
  • Welcome Message: The first message users see when opening the chat
  • Placeholder Text: Text displayed in the input field before the user types
  • Primary Color: The main color used for the chat interface
  • Position: Where the chat button appears on your website (bottom-right, bottom-left, etc.)

Behavior Settings

  • Auto-Open: Whether the chat window should automatically open when a user visits your site
  • Show Sources: Whether to display the sources of information used to answer questions
  • Require Email: Whether to ask for the user's email before starting a conversation
  • Working Hours: Set specific hours when the chatbot is available

Knowledge Base Configuration

Your chatbot's knowledge base determines what information it can access when answering questions. Here's how to optimize your knowledge sources:

Website Crawling

When adding a website as a knowledge source, you can configure:

  • Crawl Depth: How many links deep the crawler should go (1-5)
  • URL Patterns: Specific patterns to include or exclude from crawling
  • Recrawl Frequency: How often the website should be recrawled for updates

PDF Documents

When uploading PDF documents, consider these best practices:

  • Use text-based PDFs rather than scanned documents for better extraction
  • Keep documents under 50MB for optimal processing
  • Use descriptive filenames to help identify the content

Custom Text

Custom text entries are useful for:

  • Providing specific instructions to the chatbot
  • Adding information that isn't available on your website
  • Creating fallback responses for common questions

Knowledge Weights

You can assign different weights to your knowledge sources to prioritize certain information:

  • High Priority (weight 3): Critical information that should be preferred
  • Normal Priority (weight 2): Standard information sources
  • Low Priority (weight 1): Supplementary information used only when needed

AI Model Settings

Fine-tune your chatbot's AI behavior with these advanced settings:

Model Selection

BotFusion supports several AI models with different capabilities:

  • GPT-3.5-Turbo: Good balance of performance and cost
  • GPT-4: More capable but higher cost
  • Claude: Alternative model with different strengths

Temperature

Temperature controls how creative or focused the AI responses are:

  • Low (0.0-0.3): More focused, deterministic responses
  • Medium (0.4-0.7): Balanced creativity and focus
  • High (0.8-1.0): More creative, varied responses

For factual, support-oriented chatbots, we recommend a lower temperature (0.2-0.4).

System Prompt

The system prompt provides instructions to the AI about how it should behave. A well-crafted system prompt can significantly improve your chatbot's performance.

Example system prompt for a customer support chatbot:

You are a helpful customer support assistant for BotFusion, a company that provides AI chatbot solutions. Answer questions accurately based on the provided knowledge base. If you don't know the answer, politely say so and offer to connect the user with a human support agent. Keep responses concise and friendly. Always maintain a professional tone.

Context Window

The context window determines how much of the conversation history and knowledge base content is sent to the AI model:

  • Small (2k tokens): Faster responses, less context
  • Medium (4k tokens): Balanced approach
  • Large (8k tokens): More context but potentially slower responses

Larger context windows allow the AI to reference more information but may increase response time and costs.

Website Embedding

Once your chatbot is configured, you'll need to embed it on your website:

Standard Embed

The simplest way to add your chatbot is with our standard embed code. Copy this code from the "Embed" tab in your dashboard and paste it just before the closing </body> tag on your website:

<script src="https://cdn.botfusion.ai/embed.js" data-bot-id="YOUR_BOT_ID" async></script>

Custom Trigger

You can also create custom elements to trigger the chatbot:

<button onclick="BotFusion.open()">Chat with us</button>

JavaScript API

For more advanced integrations, use our JavaScript API:

// Initialize with custom options
  BotFusion.init({
    botId: 'YOUR_BOT_ID',
    position: 'bottom-right',
    primaryColor: '#4F46E5',
    welcomeMessage: 'How can I help you today?'
  });

  // Open the chat window
  BotFusion.open();

  // Close the chat window
  BotFusion.close();

  // Set user identity
  BotFusion.identify({
    email: 'user@example.com',
    name: 'John Doe',
    customData: {
      plan: 'premium',
      signupDate: '2023-01-15'
    }
  });

Responsive Design

The BotFusion chat widget is fully responsive and works well on all devices. On mobile devices, the chat window will expand to full screen when opened for better usability.

Advanced Configuration

For power users, BotFusion offers several advanced configuration options:

Custom CSS

You can fully customize the appearance of your chatbot with custom CSS. Add your styles when initializing the chatbot:

BotFusion.init({
  botId: 'YOUR_BOT_ID',
  customCSS: `
    .bf-chat-window {
      border-radius: 16px;
      box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    }
    .bf-message-user {
      background-color: #F3F4F6;
      color: #1F2937;
    }
    .bf-message-bot {
      background-color: #4F46E5;
      color: white;
    }
  `
});

Webhooks

Set up webhooks to receive notifications when users interact with your chatbot:

  1. Go to Settings → Webhooks in your dashboard
  2. Add a new webhook URL
  3. Select the events you want to receive (conversation started, message sent, etc.)
  4. Save your webhook configuration

Webhook payloads include detailed information about the event, such as user data, message content, and timestamps.

Custom Functions

For advanced use cases, you can define custom functions that your chatbot can call:

BotFusion.init({
  botId: 'YOUR_BOT_ID',
  functions: [
    {
      name: 'getProductPrice',
      description: 'Get the current price of a product',
      parameters: {
        type: 'object',
        properties: {
          productId: {
            type: 'string',
            description: 'The ID of the product'
          }
        },
        required: ['productId']
      },
      function: async ({ productId }) => {
        // Fetch the product price from your API
        const response = await fetch(`/api/products/${productId}`);
        const product = await response.json();
        return { price: product.price, currency: product.currency };
      }
    }
  ]
});

When a user asks about a product price, the chatbot can call this function to get real-time pricing information.

Multi-Language Support

Configure your chatbot to support multiple languages:

  1. Go to Settings → Languages in your dashboard
  2. Enable the languages you want to support
  3. For each language, you can customize the welcome message and system prompt
  4. The chatbot will automatically detect the user's language and respond accordingly

Need Configuration Help?

Our support team is ready to assist you with any configuration questions.