How to Add an AI Chatbot to WooCommerce — Step by Step in 5 Minutes
↑ Part of AI chatbot for your website
In short: You create an AI agent in BotChata, let it index your store, and paste a single script tag into WordPress. From then on, the chatbot answers customer questions around the clock — about shipping, returns, and availability — using your store's own content, in 40+ languages. With the WooCommerce integration (Base plan), it also answers "where is my order?" from your live store data — after it has checked the customer's phone or e-mail against the order. No coding. GDPR-compliant, hosted in Germany (EU).
→ Start free — no credit card · Live in 5 minutes · Free plan forever
Why stores do this: most tickets are the same questions over and over — where's my order, how do returns work, do you ship internationally. A chatbot that knows your store answers instantly, takes load off support, and keeps customers from leaving the cart.
What You Need (Prerequisites)
- A WordPress site with WooCommerce installed (self-hosted,
wordpress.org), with admin access. - A BotChata account — the free start is enough (sign up with email, no credit card).
- 5 minutes. No code, no developer.
Part 1 — Set Up BotChata (about 3 minutes)
Step 1: Create an account and an agent
Sign up at botchata.net and open the dashboard. Click "Add site", enter your store name and URL in the "Add an agent" window and click "Create & start indexing".
The free start needs no credit card — just your email. (You can optionally activate the 7-day Premium-features trial later with a card; not needed for this guide.)
Step 2: Let it index your store
Indexing starts by itself. Under Training → Links you see every page with its status.
BotChata reads your product pages, shipping & returns policy, FAQ and categories, and builds them into a knowledge base. For a typical store this takes a few minutes; pages get marked Indexed, and the agent's status changes from "Indexing…" to "Ready".
Why this matters: the bot answers only from your indexed store content — your real returns policy, your actual shipping rules. If something isn't on your site, it says so honestly instead of inventing a rule. That protects you from promises you don't make.
Step 3: Quick test
Switch to the "Overview" tab and ask the bot typical customer questions in the live preview ("Do you ship internationally?", "How do returns work?"). If the answers are accurate, you're ready to embed.
Step 4: Copy the embed code
Open Publish → Widget, tab "Script", and copy the script tag. It looks like this:
<script
src="https://botchata.net/api/widget.js"
data-api-key="YOUR_KEY"
data-api-url="https://botchata.net/api"
defer
></script>
The
deferattribute makes the widget load asynchronously so it won't slow down your store (Core Web Vitals matter for conversion). The widget runs in an isolated Shadow DOM — it can't interfere with your theme.
Part 2 — Add the Code to WordPress / WooCommerce (about 2 minutes)
You have three ways. Method A is best for most people — no code, update-safe.
✅ Method A (recommended): via a header/footer plugin — no code
- In the WordPress admin: Plugins → Add New.
- Search for "WPCode" (formerly "Insert Headers and Footers"), install and activate it.
- Go to Code Snippets → Header & Footer.
- Paste the copied BotChata script into the "Footer" box.
- Save. Done — the widget now loads on every store page, including product and checkout pages.
Why "Footer": the script belongs just before the closing
</body>tag — so the page loads first, the widget after.
Method B: block theme via the Site Editor
If you use a modern block theme, it works without a plugin too:
- Open Appearance → Editor.
- Select Templates → Footer (or the template shown on all pages).
- Add a "Custom HTML" block at the end and paste the script.
- Save.
Method C: manually in footer.php (for developers)
Only if you deliberately edit theme files — ideally in a child theme, otherwise the change is lost on the next theme update.
- Appearance → Theme File Editor.
- Open
footer.php. - Paste the script directly before
</body>. - Update File.
⚠️ Editing theme files directly is error-prone and not update-safe. When in doubt, use Method A.
Optional: Order Status From WooCommerce (Base plan)
The steps above make the bot answer from your store pages. To let it answer "where is my order?", connect the native WooCommerce integration. It reads orders through the WooCommerce REST API — no plugin, no developer.
- In WordPress: WooCommerce → Settings → Advanced → REST API → Add key. Permissions: Read. Generate it and copy the Consumer key and Consumer secret.
- In BotChata: Functionality → Integrations → WooCommerce. Enter your store URL and both keys, then click Test connection.
How the bot finds an order — and what it says
- The customer gives two things: the order number and the phone or e-mail used on that order. Without both, the bot asks for what's missing and shows nothing.
- Order numbers as your customers see them. A plain number (
1042,#1042) is looked up directly. If a plugin gives your orders their own numbers with a prefix (BC-1042), the bot searches for that number and accepts only an exact match — upper or lower case doesn't matter. - Phone with or without the country code.
+44 7700 900123and07700 900123match the same order: the last 9 digits are compared. Placeholder numbers like0000000000never match. - The check runs in code, not in the AI. A wrong phone or e-mail gets a refusal. However the question is worded, the bot can't be talked into reading someone else's order.
- What the customer hears: order status, order date, whether it's paid, payment method, total, shipping method, items and quantities. What the bot never says: name, address, phone, e-mail — even to the right customer.
- Tracking numbers. Core WooCommerce has no tracking field. If you add tracking numbers with the Shipment Tracking extension (or a plugin that stores them the same way), the bot gives the carrier and the number, and the tracking link if the plugin stores one.
Order status is part of the Business plan ($119/mo). The script install above works on every plan, including the free one. You can start with the script and add order status later, when "where's my order?" starts eating support time.
Step 3 — Check That It Works (Verification)
- Open your store in a new private/incognito window.
- The BotChata bubble appears in the bottom-right.
- Click it and ask a real customer question ("Do you ship to France?").
- The bot should answer within seconds with content from your store.
See the widget? You're live. 🎉
GDPR Note
- Hosted in Germany (EU): BotChata runs on Hetzner servers in Germany; data does not leave the EU without consent, and there is no AI training on your data.
- Data processing: sign the DPA with BotChata (template available in your account) and list the tool in your privacy policy.
- Consent tool (e.g. Cookiebot, Complianz): if you use a consent banner, set the BotChata script to load only after consent for EU visitors — most consent plugins do this with a checkbox.
- AI disclosure: the widget header always shows an "AI assistant" badge, and it can't be switched off — that's how visitors learn they're talking to an AI before the first message (EU AI Act Art. 50, applies from 2 August 2026). A product description, not legal advice.
Common Problems (Troubleshooting)
| Problem | Fix |
|---|---|
| The widget doesn't appear. | Clear cache (browser and caching plugin like WP Rocket/LiteSpeed). Re-save Method A and confirm the script is in the footer. |
| The bot answers "I don't know". | That page (e.g. a policy or product) may not be indexed. In BotChata, check "Sources" and re-index (one click). |
| The widget clashes with the theme. | The Shadow DOM should prevent this. If a sticky bar (cart, cookie banner) covers the bubble, raise it in Publish → Widget with Bubble bottom offset (mobile). |
| Answers in the wrong language. | BotChata auto-detects the customer's language (40+ languages) — useful for cross-border selling. Test in a fresh window. |
| The bot doesn't answer about orders. | The script install answers from store pages only. Connect Functionality → Integrations → WooCommerce (Base plan) and click Test connection. |
| The bot can't find an order. | Check that the REST key has Read access and that the customer gives the phone or e-mail used on that order. If you use custom order numbers, ask for the number exactly as it appears in the order e-mail. |
FAQ
Does BotChata need a WooCommerce plugin? No. A single script tag is enough. A header/footer plugin (Method A) is just the easiest, code-free way to insert it — not required.
Does the bot know my products and policies? Yes — it indexes your store pages (products, categories, returns/shipping policy, FAQ) and answers from them. Order status comes live from WooCommerce through the native integration (Base plan). Live stock and catalog search are not part of the WooCommerce integration: product answers come from your indexed pages.
Can the bot tell a customer where their order is? Yes, with the WooCommerce integration (Base plan, $39/mo). You create a read-only REST API key in WooCommerce and paste it into BotChata. The bot asks for the order number and the phone or e-mail used on the order, and answers only if they match: status, items, payment, shipping method and — if you add tracking with the Shipment Tracking extension (or a plugin that stores it the same way) — the tracking number.
Can someone look up another person's order? No. The match is checked in BotChata's code, not left to the AI: a wrong phone or e-mail gets a refusal and nothing else. Even on a match, the bot never repeats the buyer's name, address, phone or e-mail.
Is this GDPR-compliant? Yes. Hosted in Germany (Hetzner), DPA included, no AI training on your data, controllable via your consent tool. See the GDPR note above.
Does the bot make up answers? No. It answers only from your indexed store content. If a policy isn't on your site, it says so honestly — it won't promise a return or shipping option you don't offer.
What does it cost? The free plan costs $0 forever (100 messages/month, no card) and covers the script install from this guide. Paid plans: Base $39, Business $119, Premium $299/month — a fixed price per plan, no tokens or credits. Live order status from WooCommerce is included from Base. Your WooCommerce hosting is billed separately.
Will the widget slow down my store?
No. It loads asynchronously (defer) in an isolated Shadow DOM and doesn't block rendering.
Start Now
Give your WooCommerce store a 24/7 AI assistant that knows your products and policies — in 5 minutes.
Set up in 5 minutes. 100 messages/month free. GDPR-compliant, hosted in Germany.