WooCommerce Store Setup
Connect your WooCommerce store to QuackChat so your bot can answer live product, price, stock and category questions (and look up a customer's order status) straight from your store, using WooCommerce's own REST API.
This is not the chat-widget install (that's the separate "WooCommerce" guide). This connects the bot to your store's live data.
What your bot can do
- Search products: find items by keyword, category, price range or on-sale status, with live price and stock.
- Answer product detail & stock: including variations (size/colour) with their individual price and availability.
- Browse categories: help a customer navigate your catalog.
- Look up an order: status and items for a single order, only after the customer gives the order number and the matching billing email.
- Start a return: when a customer wants to send something back, the bot collects their order, email and reason in a quick form, verifies the order is theirs, and emails the request to you (plus a dedicated Returns list in your dashboard). You make the refund in your store.
The store connection stays read-only. The bot never creates, changes or cancels orders in your store. Returns are captured as requests and sent to you; the refund is always yours to make.
Prerequisites
- A QuackChat account on the Pro plan or above (live mode is Pro & Managed).
- WooCommerce 3.5+ on WordPress 4.4+ with pretty permalinks (Settings → Permalinks → anything except "Plain").
- An https store URL. Credentials travel in the request, so plain http is refused.
- A Read WooCommerce REST API key (generated below).
Step 1: Generate a REST API key (Read)
- In WordPress admin, go to WooCommerce → Settings → Advanced → REST API → Add key
- Set:
- Description:
QuackChat - User: an admin account
- Permissions: Read
- Description:
- Click Generate API key
- Copy the Consumer key (
ck_…) and Consumer secret (cs_…). The secret is shown only once
A Read key is all the connector needs. It never writes to your store, so don't grant Read/Write.
Step 2: Connect in QuackChat
- Open your bot's workspace and go to Settings → Integrations → Online Store → Get Started
- Choose Platform WooCommerce and Mode Live
- Enter your Store URL. Your site root, e.g.
https://yourstore.com(no trailing path, must be https) - Enter your Storefront URL. The public shop link the bot hands customers off to
- Paste the Consumer key and Consumer secret
- Save
Step 3: Test the Connection
- Click Test. A successful test shows your store name, currency and WooCommerce version
- Ask your bot a product question (e.g. "do you have X in stock?") to confirm live answers
How order lookups stay safe
When a customer asks about an order, the bot asks for the order number and the billing email on the order, and only shares the details when they match. If either is wrong it gives the same non-committal reply (it never confirms whether an order exists), and there's a per-session limit on attempts. Only non-personal order details (the order number, status, total, date and items) are shared with the AI; the billing email is used purely to verify identity and is never sent to the model.
Demoing on a staging clone
If your host clones the store before touching production, you can run the bot against the clone first. Two rules make the demo behave exactly like production:
- Generate the API key on the clone, and set the Store URL to the clone. Keys live in the database of the site that issued them, so a production key will not work against a clone and vice versa.
- Install the widget on the clone too. Product links, add-to-cart, the free-shipping bar and click tracking all require the page the widget runs on to be the same site as the store connection. Point the connection at a clone while the widget runs on production and those features switch off silently.
Promoting the demo to production
- Generate a fresh Read key on the production site and paste it in.
- Change the Store URL to production.
- Clear the site username and password if you set them, otherwise every production request keeps sending the staging gate credentials and your key stays in the URL for no reason.
- Re-test, then move the widget over.
Troubleshooting
"Store URL must use https://"
The store URL (and any API base URL) must start with https://. WooCommerce credentials would otherwise be sent in clear text. Serve your store over HTTPS and re-enter the URL.
"WooCommerce refused these credentials."
WooCommerce returns the same response for several different causes, so work through all of them:
- The key was created on a different site. API keys live in the database of the site that issued them, so a key generated on a staging clone, a copy of the store, or a different domain will never work against your live store. Re-generate the key on the exact site your Store URL points at.
- The key is wrong, revoked, or truncated. Re-generate a Read key (Step 1) and paste both values in full, with no leading or trailing spaces.
- The key lacks Read access. Check its Permissions in WooCommerce → Settings → Advanced → REST API.
- Your site sits behind a proxy or CDN. If Cloudflare (or similar) terminates HTTPS and forwards plain http to your server, WordPress reports the connection as insecure and WooCommerce ignores the key entirely. Set your SSL mode to Full (strict), or have your host trust the
X-Forwarded-Protoheader.
Click Test on the connection. It probes your store and names the most likely cause.
"Your site is behind a password prompt"
A staging lock, maintenance-mode plugin, or HTTP Basic password in front of the site answers before WooCommerce does, so the API is never reached. This is common on agency staging clones.
Two ways forward: remove the site-wide password, or open My site is password protected under the credentials and enter the site username and password. Note that supplying them moves your consumer key into the URL of each request, so it will appear in your server's access logs. On a throwaway staging clone that is usually fine; on production it usually is not.
"Store API not found. Confirm the store URL and that WooCommerce is installed."
The URL isn't a WooCommerce REST endpoint. Confirm the store URL is the site root (no /wp-admin or page path), and that WooCommerce is active with pretty permalinks enabled.
The bot says it can't find a product that exists
Confirm the product is published and in stock in WooCommerce. Stock answers only count items WooCommerce marks as "in stock".
Auto-disabled connection (5 consecutive failures)
A lightweight health check runs about every 15 minutes; the connection auto-disables after 5 consecutive failures and self-heals once the underlying issue (usually a revoked key or a store URL change) is fixed. Re-test to confirm recovery.