Creating & Embedding Chatbot

Step 1: Access the Chatbot Builder

  1. Log into your Markleyo AI dashboard

  2. Click "AI Chatbots" in the left sidebar

  3. Click "+ Add New Chatbot" button

  4. The chatbot configuration widget will open

Step 2: Configure Your Chatbot

Chatbot Title (Required)

Enter a name for your chatbot. This is for your internal identification and won't be visible to customers.

Example: "Website Support Bot", "Sales Inquiry Bot", "Customer Service Assistant"

Bubble Message (Optional)

Customize the text that appears in the chat bubble when the chat window is minimized. This is the first thing visitors see.

Example: "Hi! 👋 Need help? Chat with us!"
Alternative: "Questions? We're here to help!"

Welcome Message (Required)

The first message your chatbot sends when a visitor opens the chat window. Make it warm, welcoming, and clear about what the chatbot can do.

Example:
"Welcome to Acme Marketing! 🎉 I'm here to help answer your questions about our services, provide information, or connect you with our team. What can I help you with today?"

Chatbot Instructions (Required)

Define exactly how your chatbot should behave. These instructions guide the AI in how to respond, what tone to use, and what actions to take.

Best Practices for Instructions:

Example Instructions:
"You are a friendly and professional customer service assistant for Acme Marketing Solutions. Your role is to:

Do Not Go Beyond Instructions (Toggle)

Enable this setting if you want the AI to strictly follow your instructions and not go off-topic.

Recommendation: Enable this for support chatbots to maintain focus.

Language (Required)

Select the primary language your chatbot will use.

Options include:

Interaction Type (Required)

Choose how your chatbot handles conversations:

AI Only

Only Human Agent

AI + Live Chat Agent

Recommendation: Select "AI + Live Chat Agent" for best customer experience.

Connect Message (If AI + Live Chat Agent Selected)

The message shown to the customer when the chatbot transfers them to a human agent.

Example:
"I'm connecting you with one of our specialists who can help with your specific needs. They'll be with you in just a moment!"


Step 3: Customize Your Chatbot

After clicking "Next", you'll access the Customize Chatbot page where you can:

Chatbot Appearance:

Chat Behavior:

Advanced Features:


Step 4: Train Your Chatbot

The chatbot needs knowledge to answer questions effectively. You can train it using:

Option A: Website Content

Website url is best when you want to crawl all web pages including blog pages. It is only recommended when your blog pages are commercial, not general or informational.

Option B: Uploaded Files

Option C: Text Input

Option D: Q&As

Best Practice: Use a combination of methods. Start with your website, add key documents, then supplement with custom FAQs.

Important! Keep adding Q&As on daily basis when and where your AI chatbot can't respond to your user's query. Maintaining it will keep perfecting your chatbot training part and would decrease the human interaction in the future.


Step 5: Embedding on Your Website

Once your chatbot is configured and trained, you can embed it on your website using the provided code.

Getting Your Embed Code

  1. Complete chatbot configuration

  2. Click "Get Embed Code" or "Installation"

  3. Copy the provided JavaScript code snippet

  4. You'll receive code like:

<script>
  (function(w,d,s){
    var j = d.createElement(s);
    j.async = true;
    j.src = "https://app.markleyo.com/chatbot-embed.js?bot=YOUR_BOT_ID";
    d.head.appendChild(j);
  })(window, document, 'script');
</script>

Embedding Steps

  1. Access Your Website Code

  2. Locate the </body> Tag

  3. Paste the Code

    <script>
      (function(w,d,s){
        var j = d.createElement(s);
        j.async = true;
        j.src = "https://markleyo.com/chatbot-embed.js?bot=YOUR_BOT_ID";
        d.head.appendChild(j);
      })(window, document, 'script');
    </script>
  4. Save Changes

  5. Test the Chatbot

For a complete guidelines on how to embed your embed code on different websites or CRMs, just follow this article.


Troubleshooting Embedding Issues

Problem: Chatbot doesn't appear after embedding

Problem: Chat widget appears but doesn't respond

Problem: Chatbot appears on all pages but I want it only on specific pages