Integration/WooCommerce

WooCommerce

Connect your WooCommerce store using the built-in REST API. Requires WooCommerce 3.5+ and WordPress 5.6+.

Generate API credentials

  1. In WordPress Admin, go to WooCommerce → Settings → Advanced → REST API
  2. Click Add key
  3. Set Description to "betterfound.ai", User to an admin, and Permissions to Read
  4. Click Generate API key and copy the Consumer Key and Consumer Secret
WooCommerce REST API key generation screen
The Consumer Secret is shown only once. Copy it immediately — you cannot retrieve it later.

Add the data source

In betterfound.ai dashboard, go to Data Sources → Add data source → WooCommerce. Enter:

  • Store URL — e.g. https://your-store.com
  • Consumer Key — ck_xxxxxxxxxxxx
  • Consumer Secret — cs_xxxxxxxxxxxx

betterfound.ai connects to /wp-json/wc/v3/products and paginates through all published products automatically.

Custom product attributes

WooCommerce product attributes (size, colour, material) are mapped to betterfound.ai's tags field automatically. In the schema mapping review you can promote specific attributes to dedicated fields for richer filtering.

Schema mapping — WooCommerce attribute mapping

Install the widget

Paste the betterfound.ai snippet into your theme's footer.php before </body>, or use a plugin like Insert Headers and Footers:

<script src="https://your-dashboard-domain/api/widget/pf.js" async></script>
<product-finder data-api="https://your-dashboard-domain" token="YOUR_WIDGET_TOKEN"></product-finder>
Get the exact snippet, pre-filled with your real token, from Widget → Get Code in your betterfound.ai dashboard. If your store uses Gutenberg, you can also embed betterfound.ai as an inline widget inside a Custom HTML block on any page or product category page.