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
Create an account
Sign up at the app home page. You will use one login to manage all your store chatbots.
- 2
Create a store
From the dashboard, click “New store”. Enter your store name, MongoDB connection string, and database name.
- 3
Test the database connection
Use “Test Connection” before saving. The chatbot reads products, orders, and FAQs from this MongoDB database.
- 4
Customize your chatbot
Set colors, welcome message, quick reply buttons, and widget position in store setup.
- 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.
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.
| Collection | Purpose |
|---|---|
| settings | Store name, welcome message, quick actions |
| knowledge | FAQ intents, keywords, and bot responses |
| products | Product search and recommendations |
| orders | Order tracking by order ID or email |
| categories | Browse categories (optional) |
| pages / blogs | Content answers (optional) |
Embed on any website
Paste before </body>. Replace your-store-slug with your dashboard slug.
<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.
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.
- Magento Admin → Content → Design → Configuration → Footer → Miscellaneous HTML
- Paste the embed script below
- Save and flush cache (System → Cache Management)
<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_URIandAUTH_SECRET, then redeploy. Check/api/health. - MongoDB connection error — In Atlas → Network Access, allow
0.0.0.0/0for cloud hosting. - Widget not showing — Confirm store slug, flush site cache, and allow
https://mybizbot.vercel.appin CSP rules.
Try the live demo
See the widget on a sample storefront page.