Swarmz
IntegrationsCommerce and finance

WooCommerce

Manage WooCommerce catalog, inventory, orders, refunds, customers, coupons, and reports

Connect WooCommerce when a project needs to read or change data in an existing WooCommerce store. Swarmz keeps the store URL, consumer key, and consumer secret in the shared connection. The AI can request that connection while it builds, and the published app can call the same supported operations through the connector gateway.

A Swarmz administrator must make WooCommerce visible before workspaces can connect it. WooCommerce doesn't need an OAuth application in Swarmz. Each workspace enters credentials created in its own WordPress admin.

Before you connect

Your store needs:

  • HTTPS on its public store URL
  • a WordPress permalink setting other than Plain
  • WooCommerce REST API credentials

In WordPress admin, open WooCommerce > Settings > Advanced > REST API, then create a key for the WordPress user whose permissions should apply. Choose Read for dashboards and lookup tools. Choose Read/Write if the project will change products, stock, orders, customers, coupons, or refunds.

Copy the consumer key and secret when WooCommerce shows them. The key starts with ck_. The secret starts with cs_. Keep both out of chat, project files, browser code, and client-side environment variables.

See WooCommerce REST API authentication for the provider setup.

Available operations

AreaRead operationsWrite operationsLimit per minute
Productslist_products, get_productcreate_product, update_product30 read, 10 write
Variationslist_variationscreate_variation, update_variation30 read, 10 write
Categorieslist_categoriescreate_category, update_category30 read, 10 write
Orderslist_orders, get_orderupdate_order30 read, 10 write
Refundslist_refundscreate_refund30 read, 10 write
Customerslist_customers, get_customercreate_customer, update_customer30 read, 10 write
Couponslist_coupons, get_couponcreate_coupon, update_coupon30 read, 10 write
Reportsget_sales_report, get_top_sellers_reportNone30

Product and variation updates can change manage_stock, stock_quantity, and other fields accepted by WooCommerce. List operations support bounded WooCommerce query filters. Swarmz limits per_page to 100, request bodies to 128 KB, and provider responses to 2 MB.

The connector sends requests only to the connected store's /wp-json/wc/v3 path. Its server fetch pins the store's public DNS result and rejects local, private-network, link-local, and metadata addresses.

Connect WooCommerce

  1. In Settings > Integrations, select WooCommerce, then select Connect new.
  2. Enter a name that identifies the store or environment.
  3. Enter the public HTTPS Store URL. Include the WordPress subdirectory if the installation uses one.
  4. Enter the Consumer key and Consumer secret in the secure form.
  5. Link the connection to the project when the AI requests it.

Credential validation reads one product from /wp-json/wc/v3/products. A route error usually means the URL, WooCommerce plugin, or WordPress permalink setting is wrong. An authentication error means the key and secret don't match the store.

Build with WooCommerce

Name both the store workflow and the records the app should use. These prompts map to supported operations:

  • “Use WooCommerce to build an inventory screen that lists products and variations, flags low stock, and updates stock quantities.”
  • “Build a support console that searches customers, shows their orders, and lets an approved agent issue a refund.”
  • “Create a coupon manager that lists active codes and can create or update a campaign.”
  • “Build a sales dashboard from WooCommerce orders, sales reports, and top-seller reports.”

The AI will request a WooCommerce connection when it reaches the first store operation. Write operations require approval during the build. The WooCommerce key still decides whether the provider accepts the request.

Test WooCommerce

Use a staging store or disposable records for write tests.

  1. List products with per_page set to 1, then open the returned product in WordPress admin.
  2. Create a draft product, update its price and stock quantity, and confirm both changes in WooCommerce.
  3. Create a variation on a test variable product and update its stock.
  4. Create a coupon with a short expiry date, then confirm it appears in WooCommerce.
  5. Open a test order, change its status, and confirm the order timeline records the change.
  6. If refund handling is in scope, use a test payment and a small disposable order. Confirm the refund in both WooCommerce and the payment provider before deleting the test data.
  7. Read the sales and top-seller reports for a period that contains the test order.

If reads work and writes fail, replace the key with one created using Read/Write permission. If credentials may have leaked, revoke the key in WordPress admin first, create a replacement, then reconnect WooCommerce in Swarmz.

On this page