Back to AI Tools & Custom Tools

How to Integrate Your WooCommerce Store with ABC Sales AI


This guide provides a step-by-step process for connecting your ABC Sales AI agent to your WooCommerce store. This integration allows your agent to directly query your product catalog in real-time.


The process involves two main stages:


  1. Generating Read-Only API Keys from your WooCommerce store
  2. Configuring a Custom Tool within ABC Sales AI using those keys



Part 1: Generate WooCommerce API Keys


First, create secure API credentials from your WordPress dashboard.


  1. Log in to your WordPress admin dashboard
  2. Navigate to WooCommerce → Settings
  3. Click on the Advanced tab
  4. Select the REST API sub-section
  5. Click Add key or Create an API key
  6. Fill in the details:

- Description: ABC Sales AI (for easy identification)

- User: Defaults to your current user

- Permissions: Select Read ⚠️ This is critical for security

  1. Click Generate API key

⚠️
Important: Copy both the Consumer Key and Consumer Secret immediately. You will not be able to view the Secret again after leaving this page!



Part 2: Configure the Custom Tool in ABC Sales AI


Use the keys you generated to set up the product search tool.


  1. In your ABC Sales AI dashboard, navigate to AI Agents → AI Tools
  2. Create a new Custom Tool with these details:

- Tool Name: Product_Search

- Description: Searches the product catalog and returns matching results

- Method: GET


  1. Construct the Request URL:

\\\`

https://[CONSUMER_KEY]:[CONSUMER_SECRET]@[YOUR_SITE_URL]/wp-json/wc/v3/products?\_fields=id,name,price,description,average_rating,rating_count,stock_quantity,permalink&search=

\\\`


Replace:


  • \[CONSUMER_KEY]\ with your generated key
  • \[CONSUMER_SECRET]\ with your generated secret
  • \[YOUR_SITE_URL]\ with your store domain (e.g., my-cool-store.com)

Example:

\\\`

https://ck_123abc:cs_456xyz@bestwidgets.com/wp-json/wc/v3/products?\_fields=id,name,price,description,average_rating,rating_count,stock_quantity,permalink&search=

\\\`


ℹ️
Note: The \\_fields\ parameter limits the data returned to only what's necessary, making the tool faster and more efficient.

  1. Define the Dynamic Parameter:

- Parameter Name: search

- Type: String

- Location: Query


  1. Save the tool



Part 3: Add the Tool to Your Agent


  1. Go to your agent's configuration page
  2. Add the Product_Search tool to the agent's capabilities
  3. Update your system prompt to guide when to use it:

_"When a user asks about products or product details, use the 'Product_Search' tool to find relevant items in the WooCommerce store."_


Your ABC Sales AI agent is now connected to your WooCommerce store and can perform live product searches!


Still need help?

Our support team is ready to assist you.

Contact Support