๐Ÿ“˜ User Guide

1. Overview

AI WooCommerce Search is an advanced natural-language product discovery plugin designed for WooCommerce stores.

Instead of traditional filters and keyword search, users can describe what they want in plain language, and the system intelligently returns matching products.

Example:

โ€œElegant pastel polo shirt for men, size Lโ€

The plugin understands the intent and returns precise results using your storeโ€™s real product data.

2. Key Features

๐Ÿง  Natural Language Search
Users type queries like a human
No need for filters or exact keywords

โšก Instant Results
Fast search powered by optimized pipeline
No page reload required

๐ŸŒ Multilingual Support
Works in any language supported by OpenAI

๐ŸŽฏ Accurate Matching
Converts user intent into structured attributes
Uses WooCommerce taxonomy for precise filtering

๐Ÿ’ก Smart UX
Floating search button
Smooth animations
Mobile-first design

3. How It Works (Advanced Logic)

AI Woo Search does not behave like traditional keyword search.

It follows a structured pipeline:

๐Ÿง  Step 1 โ€” User Query

User writes naturally:

โœ” โ€œMenโ€™s grey short sleeve shirtโ€

โœ” โ€œBlack leather shoes under $100โ€

โœ” โ€œGaming laptop with RTX 4060โ€

โœ” โ€œMinimalist white sneakersโ€

โœ” โ€œSamsung phone with stylusโ€

โœ” โ€œWooden dining table for 6 peopleโ€

๐Ÿค– Step 2 โ€” AI Intent Extraction

The plugin uses OpenAI to convert text into structured intent:

{

ย  “category”: “shirt”,

ย  “gender”: “male”,

ย  “attributes”: {

ย ย ย  “color”: “gray”,

ย ย ย  “style”: “short sleeve”

ย ย }

}

๐Ÿ‘‰ AI only understands intent โ€” it does NOT search products.

๐Ÿ‘‰ Important: AI does not search your products directly.

      It only converts user language into structured filters.

      All product matching is done by WooCommerce data.

๐Ÿช Step 3 โ€” Store-Aware Mapping

The plugin maps intent to your store:

  • Categories โ†’ WooCommerce categories
  • Attributes โ†’ WooCommerce attributes
  • Brands โ†’ brand taxonomy

๐Ÿ‘‰ This ensures compatibility with ANY WooCommerce store.

๐Ÿ” Step 4 โ€” Strict Filtering (Core Engine)

The plugin applies filters exactly like WooCommerce filters:

Category AND Gender AND Brand AND Attributes

Example:

Men + Shirt + Gray + Short Sleeve

๐Ÿ‘‰ All conditions MUST match.

โš ๏ธ Important Behavior

If no exact match exists:

๐Ÿ‘‰ Result = 0 products

This is intentional.

The plugin DOES NOT:

โŒ Show unrelated products
โŒ Guess approximate matches
โŒ Return misleading results

๐Ÿ“ฆ Step 5 โ€” Data Sources

The system uses:

  1. WooCommerce taxonomies (main source)
  2. Product attributes
  3. Product title
  4. Short description
  5. Full description

๐Ÿ‘‰ Even if attributes are missing, search can still work via text.

๐Ÿงฎ Step 6 โ€” Ranking

Products are ranked by:

  • exact matches
  • attribute relevance
  • text consistency

Only valid products are ranked.

โšก Step 7 โ€” Instant Response

Results are returned instantly:

  • via REST API
  • optimized queries
  • cache (if enabled)

4. Installation

Upload plugin ZIP in WordPress
Activate plugin

Go to:

AI Woo Search

Enter your OpenAI API Key
Click Save Settings

5. License Activation

Enter your license key
Click Activate

โœ” License binds to your domain
โœ” No manual validation needed after activation

6. Using the Search

Frontend Experience

Click floating search button
Type your request
Results appear instantly

Example Queries

  • โ€œBlack leather shoes under $100โ€
  • โ€œGaming laptop with RTX 4060โ€
  • โ€œMinimalist white sneakersโ€
  • โ€œMenโ€™s grey short sleeve shirtโ€

7. Supported Search Types

โœ” Clothing
โœ” Electronics
โœ” General products
โœ” Technical specs
โœ” Price filters
โœ” Style-based queries

8. Accuracy & Matching Philosophy

๐ŸŽฏ Precision Over Guessing

AI Woo Search is designed to be precise, not approximate.

โœ” Shows only relevant products
โŒ Does NOT show โ€œclose enoughโ€ results

Example

User searches:

โ€œWomen Adidas running shoesโ€

If store has:

  • Adidas (men) โŒ
  • Nike (women) โŒ

๐Ÿ‘‰ Result:

0 products

Why this matters

Prevents:

  • wrong purchases
  • confusion
  • poor UX

Traditional vs AI Search

TraditionalAI Woo Search
Keyword-basedIntent-based
Partial matchesStrict matching
Often irrelevantHighly precise
 

๐Ÿง  How the system uses this data

The search engine:

  • Matches user intent to WooCommerce categories and attributes
  • Uses product titles and descriptions as additional signals
  • Combines structured data + text to find the most accurate results

โš ๏ธ Important note (in simple terms)

If a product does not contain relevant information:

๐Ÿ‘‰ It may not appear in search results

Example:

If a product has no color assigned and no description mentioning it,
a query like:

โ€œred shirtโ€

may not find that product.

โœ… Good news

You do NOT need any custom setup.

Everything works with:

โœ” Standard WooCommerce categories
โœ” Default product attributes
โœ” Regular product descriptions

๐Ÿ’ก Best practice

Think of AI Search as a smart layer on top of your catalog.

๐Ÿ‘‰ The better your product data โ†’ the better your search results

๐Ÿš€ Quick tip

Even small improvements help a lot:

  • Add missing attributes (color, size)
  • Use clear product titles
  • Write short but descriptive product descriptions

9. Performance

โœ” Optimized queries
โœ” Smart caching
โœ” Minimal API calls

Search Result Limit

To keep the interface fast, clean, and easy to use, AI Woo Search displays only the top matching products instead of overwhelming shoppers with very large result lists.

In normal AI search mode, only the highest-ranked matching products are shown.

This improves usability, performance, and conversion.

10. Cost (Important)

Uses your own OpenAI API key.

Typical cost:

  • ~$1โ€“2 per 1000 users
  • ~$10โ€“40/month average

Depends on usage.

11. Troubleshooting

๐Ÿ”ด No results

โœ” Try simpler query
โœ” Check product categories
โœ” Check attributes

๐Ÿ”ด Wrong results

โœ” Verify product data
โœ” Ensure attributes are assigned

๐Ÿ‘‰ AI cannot fix incorrect product data.

๐Ÿ”ด Too strict results

โœ” This is expected

The system requires full match.

๐Ÿ”ด API errors

โœ” Check API key
โœ” Check OpenAI balance

๐Ÿ”ด License issues

โœ” Verify domain
โœ” Re-activate license

๐Ÿ”ด โ€œQuota exceededโ€

โœ” Add payment method in OpenAI

โœ” Check usage limits

๐Ÿ”ด Why a specific product does not appear

This usually happens when the product does not fully match the search criteria.

Check:

โœ” Correct category assigned 

โœ” Required attributes exist (color, size, etc.) 

โœ” Product description contains relevant keywords 

๐Ÿ‘‰ AI Woo Search requires all important conditions to match.

If one condition is missing, the product may be excluded.

๐Ÿ”ด Results not updating

If you recently changed products:

โœ” Clear plugin cache 

โœ” Or wait for cache TTL to expire 

๐Ÿ‘‰ Cached results may temporarily show outdated data.

๐Ÿ”‘How to Get Your OpenAI API Key

(Step-by-step guide for AI Woo Search Plugin users)

๐Ÿ“Œ What is this and why you need it?

AI Woo Search uses the OpenAI API to understand user queries.

๐Ÿ‘‰ To make the plugin work, you need your own OpenAI API Key.

๐Ÿš€ Step-by-Step Instructions

1๏ธโƒฃ Go to OpenAI Platform

๐Ÿ‘‰ Open this link in your browser:

๐Ÿ‘‰ https://platform.openai.com/

2๏ธโƒฃ Sign In or Create Account

  • If you already have an account โ†’ Sign in
  • If not โ†’ click Sign up

3๏ธโƒฃ Open API Keys Page

Once logged in:

๐Ÿ‘‰ Click this direct link:

๐Ÿ‘‰ https://platform.openai.com/api-keys

4๏ธโƒฃ Create New API Key

  1. Click โ€œCreate new secret keyโ€
  2. Give it a name (optional), for example:
  3. WooCommerce AI Search
  4. Click Create

โš ๏ธ IMPORTANT

๐Ÿ‘‰ You will see the key only once!

Example:

sk-abc123xyz456…

๐Ÿ“Œ Copy it immediately and store it safely.

5๏ธโƒฃ Add API Key to Plugin

Go to your WordPress admin:

AI Search โ†’ Settings

Paste your key into:

OpenAI API Key

Click:

๐Ÿ‘‰ Save Settings

๐Ÿ’ณ Do I need to pay OpenAI?

Yes, OpenAI API is usage-based.

Typical cost:

  • ~$10โ€“40/month for medium traffic sites
  • Depends on how often users search

๐Ÿ‘‰ You can monitor usage here:
https://platform.openai.com/usage

๐Ÿ›ก๏ธ Security Tips

  • โŒ Never share your API key publicly
  • โŒ Do not expose it in frontend code
  • โœ… Use it only in plugin settings

๐Ÿงช Test Your Setup

After adding the key:

  1. Open your website
  2. Click AI Search
  3. Type something like:
  4. black sneakers under $100
  5. You should see results instantly

โš™๏ธ AI Woo Search โ€” Plugin Settings Guide

This section explains every setting available in the plugin and how it affects performance, cost, and user experience.

๐Ÿ”‘ OpenAI API Key

๐Ÿ‘‰ This is your personal API key from OpenAI.

What it does:

  • Enables AI-powered search
  • Connects your website to OpenAI

Required:

โœ… Yes (plugin will not work without it)

Example:

sk-xxxxxxxxxxxxxxxx

Tips:

  • Keep it private
  • Do not share it publicly
  • Use a separate key for this plugin

๐Ÿค– OpenAI Model

Default:

gpt-4.1-mini

What it does:

Determines which AI model is used to interpret user queries.

Recommended:

  • gpt-4.1-mini โ†’ โœ… best balance (cost + performance)

Alternatives:

  • Faster/cheaper โ†’ lighter models
  • More accurate โ†’ heavier models (higher cost)

Impact:

FactorEffect
Accuracyโ†‘ better models = better results
Costโ†‘ higher models = more expensive
Speedโ†“ heavier models may be slower

โฑ๏ธ Request Timeout (seconds)

Default:

20

What it does:

Maximum time the plugin waits for AI response.

Example:

  • If set to 20 โ†’ waits up to 20 seconds

Recommended:

  • 15โ€“25 seconds

If too low:

โŒ requests may fail

If too high:

โŒ slow fallback behavior

โœ๏ธ Max Query Length

Default:

150

What it does:

Limits how long a user query can be.

Why important:

  • Controls API cost
  • Prevents abuse/spam
  • Keeps responses fast

Example:

User cannot type more than 150 characters

Recommended:

  • 100โ€“250

๐Ÿ’พ Enable Cache

โœ” Enabled

What it does:

Stores:

  • parsed AI intents
  • search results

Benefits:

  • โšก Faster responses
  • ๐Ÿ’ฐ Lower OpenAI cost
  • ๐Ÿ” Reuses previous searches

Recommended:

โœ… Always ON

โณ Cache TTL (minutes)

Default:

1440 (24 hours)

What it does:

How long cached data is stored.

Example:

  • 1440 = 24 hours
  • 60 = 1 hour

Recommended:

Use CaseTTL
Small store1440
Dynamic pricing60โ€“180
Large catalog720โ€“1440

๐ŸŽจ Enable Animations

โœ” Enabled

What it does:

Enables UI effects:

  • floating search button
  • panel transitions
  • staggered results animation

Recommended:

โœ… ON for best UX

โ™ฟ Respect Reduced Motion

โœ” Enabled

What it does:

Detects user system preference:

  • disables heavy animations if needed

Why important:

  • Accessibility compliance
  • Better UX for sensitive users

Recommended:

โœ… Always ON

๐Ÿž Debug Mode

โŒ Disabled (default)

What it does:

Logs detailed internal activity to WordPress logs.

Includes:

  • API responses
  • errors
  • pipeline steps

Use when:

  • troubleshooting issues
  • development/testing

Important:

โš ๏ธ Do NOT enable on production long-term

Widget Position

Defines where the floating AI Search button appears on the frontend. This helps prevent overlap with important store elements such as sticky add-to-cart buttons, bottom navigation, chat widgets, or mobile action bars.

Horizontal Offset (px)

Controls the horizontal spacing of the widget from its selected anchor position.

Vertical Offset (px)

Controls the vertical spacing of the widget from its selected anchor position.

Mobile Vertical Offset (px)

Lets the administrator increase the bottom spacing on mobile devices to avoid conflicts with sticky purchase buttons, cookie banners, or bottom navigation.

default values:

Widget Position โ†’ Bottom Right

Horizontal Offset โ†’ 24

Vertical Offset โ†’ 24

Mobile Vertical Offset โ†’ 24

Cache Maintenance

Cache Maintenance lets store administrators manually clear the pluginโ€™s locally stored AI cache at any time.

When caching is enabled, the plugin stores parsed search intents and cached product search results in the local database to improve speed and reduce repeated API usage. Over time, this cache may contain outdated or less relevant data, especially after catalog updates, attribute changes, product removals, or major pricing/content edits.

The Clear Cache action removes all stored AI intent cache and cached search results from the local database. This is useful when:

  • product data has changed significantly,
  • categories, attributes, or brand mappings were updated,
  • search results need to be refreshed immediately,
  • the administrator wants to force the plugin to rebuild search data from scratch.

This action does not affect products, orders, licenses, or plugin settings. It only clears cached AI search data.

๐Ÿ“Š Recommended Default Configuration

SettingValue
Modelgpt-4.1-mini
Timeout20
Max Query Length150
CacheON
Cache TTL1440
AnimationsON
Reduced MotionON
Debug ModeOFF

๐Ÿง  Performance & Cost Tips

  • Enable cache โ†’ reduces API cost by up to 70%
  • Limit query length โ†’ prevents unnecessary tokens
  • Use gpt-4.1-mini โ†’ best cost/performance ratio

โš ๏ธ Common Mistakes

โŒ Missing API key
โŒ Cache disabled (high cost)
โŒ Too long queries
โŒ Debug mode left ON

๐Ÿš€ Summary

These settings control:

  • โšก Speed
  • ๐Ÿ’ฐ Cost
  • ๐ŸŽฏ Accuracy
  • ๐ŸŽจ User Experience

Proper configuration ensures your AI search is fast, affordable, and reliable.