User guide

How to use Business Chatbot

Set up your store chatbot, connect MongoDB, and embed it on any website including Next.js and Magento.

Quick start

  1. 1

    Create an account

    Sign up at the app home page. You will use one login to manage all your store chatbots.

  2. 2

    Create a store

    From the dashboard, click “New store”. Enter your store name, MongoDB connection string, and database name.

  3. 3

    Test the database connection

    Use “Test Connection” before saving. The chatbot reads products, orders, and FAQs from this MongoDB database.

  4. 4

    Customize your chatbot

    Set colors, welcome message, quick reply buttons, and widget position in store setup.

  5. 5

    Share or embed

    Give customers the /chat/your-slug link, or paste the embed script on your website.

Environment variables (self-hosted)

Required in .env.local or on Vercel.

.env.local
CHATBOT_MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/?appName=chatdata
CHATBOT_DB_NAME=chatbot
AUTH_SECRET=your-long-random-secret
NEXT_PUBLIC_APP_URL=https://mybizbot.vercel.app

MongoDB collections (per store)

Each store connects to its own MongoDB database. These collections power the chatbot.

CollectionPurpose
settingsStore name, welcome message, quick actions
knowledgeFAQ intents, keywords, and bot responses
productsProduct search and recommendations
ordersOrder tracking by order ID or email
categoriesBrowse categories (optional)
pages / blogsContent answers (optional)

Embed on any website

Paste before </body>. Replace your-store-slug with your dashboard slug.

Embed script
<script
  src="https://mybizbot.vercel.app/embed.js"
  data-base-url="https://mybizbot.vercel.app"
  data-store="your-store-slug"
  data-store-name="Your Store Name"
  data-position="bottom-right"
  defer
></script>

data-store

Required. Your store slug from the dashboard.

data-store-name

Display name shown in the chat header.

data-position

bottom-right or bottom-left

data-base-url

Your deployed app URL (https://mybizbot.vercel.app)

Embed in Next.js

Add to app/layout.tsx using next/script.

app/layout.tsx
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://mybizbot.vercel.app/embed.js"
          data-base-url="https://mybizbot.vercel.app"
          data-store="your-store-slug"
          data-store-name="Your Store Name"
          data-position="bottom-right"
          strategy="lazyOnload"
        />
      </body>
    </html>
  )
}

Embed in Magento

Magento uses MySQL internally — that is fine. The chatbot reads from MongoDB. Sync product and order data to MongoDB, then embed the script in your Magento footer.

  1. Magento Admin → Content → Design → Configuration → Footer → Miscellaneous HTML
  2. Paste the embed script below
  3. Save and flush cache (System → Cache Management)
Magento footer HTML
<script
  src="https://mybizbot.vercel.app/embed.js"
  data-base-url="https://mybizbot.vercel.app"
  data-store="your-store-slug"
  data-store-name="Your Store Name"
  data-position="bottom-right"
  defer
></script>

Customer chat links

Full-page chat

https://mybizbot.vercel.app/chat/your-store-slug

Widget preview

https://mybizbot.vercel.app/embed?store=your-store-slug

Troubleshooting

  • Sign in failed on Vercel — Add CHATBOT_MONGODB_URI and AUTH_SECRET, then redeploy. Check /api/health.
  • MongoDB connection error — In Atlas → Network Access, allow 0.0.0.0/0 for cloud hosting.
  • Widget not showing — Confirm store slug, flush site cache, and allow https://mybizbot.vercel.app in CSP rules.

Try the live demo

See the widget on a sample storefront page.