WooCommerce

What it is

WooCommerce is the e-commerce plugin for WordPress. The integration connects the bot to your store's REST API. The bot exports the catalog with prices and stock, checks whether a product or variation is available and creates an order with a payment link. It also reports the order status, cancels orders, adds notes and shows the customer their order history. An order from the bot appears in the WooCommerce admin like any other.

Requirements

  • A WordPress site with WooCommerce installed, reachable from the internet over HTTPS.
  • Administrator access to the WordPress admin.
  • A WooCommerce REST API key with Read/Write permissions.

How to connect

  1. In the WordPress admin open WooCommerce → Settings → Advanced → REST API.
  2. Click Add key, pick an administrator user and Read/Write permissions, then Generate API key.
  3. Copy the Consumer Key (ck_…) and Consumer Secret (cs_…). The secret is shown only once.
  4. In the constructor, open Integrations → find the WooCommerce card → Connect.
  5. Enter the store URL with https://, the Consumer Key and the Consumer Secret.
  6. Save the connection and click Check connection. The reply shows the store name and WooCommerce version.

Available operations

Operation What it does
Export catalog A page of published products (up to 100): ID, name, type, prices, image, link, availability, stock, number of variations. Search by word, filter by category, paging through next_page
Product and its variations The product description and all variations: ID, attributes (“Size: M, Color: Red”), SKU, price, availability, stock
Check availability By product/variation ID or SKU and the quantity needed, returns available = 1/0 with the stock and price
Create order Line items as ID:quantity, contacts, address, note, status and paid flag. Returns the order number and payment_url — the payment link
Order details By ID or number: status, items, total, payment link, customer note
Customer's orders Latest orders by the customer's email or phone (guest orders included) or by customer ID
Cancel order Moves the order to Cancelled and saves the reason as a note. WooCommerce restores the stock itself
Add order note A private order note, or one emailed to the customer

Limitations

  • HTTPS only: over HTTP WooCommerce requires a different signing scheme and the keys would travel in clear text. The URL must be a public website — local and internal addresses are refused.
  • Botconsole doesn't follow redirects. Enter the store's final address — with or without www, the way the site opens.
  • If the hosting strips the Authorization header (happens with Apache in CGI mode), WooCommerce answers 401 even with valid keys. It's fixed in the server configuration — see the WooCommerce documentation.
  • Stock is reduced when the order moves to Processing or On hold. A Pending payment order doesn't reserve stock — check availability before creating it.
  • SKU search finds products. For a variation, pass its ID from «Product and its variations» instead.
  • The catalog and orders come in pages of up to 100 records.

Notes

A typical sales flow: «Export catalog» → «Product and its variations» → «Check availability» → «Create order» → the bot sends the customer the order number and the payment_url payment link.

Orders from the bot get a hidden _botconsole meta field, so you can tell them apart from website orders.

Use «Mark as paid» only when the payment has already happened in the bot. Otherwise keep Pending payment and send the customer the payment_url.

Order lookup by phone compares digits only, so +1 (415) 555-0123 and 14155550123 count as the same number.