AI product enrichment sounds simple: send a product name to a model and write the answer back. In a real WooCommerce store, that shortcut is risky. A product record contains commercial facts, editorial copy, taxonomy, search metadata, and media. They should not all have the same write permissions.

This tutorial describes a safer boundary: let AI draft product copy and images, while price, inventory, and orders remain outside the automation. The workflow is based on the Cormak WooCommerce integration, but the design applies to any WordPress plugin that calls an AI service.

1. Define the write boundary first

Before choosing a model, make a table of fields the automation may touch:

Field group AI may propose Automation should not own
Editorial title, long description, short description —
Taxonomy existing categories, tags, attributes deleting the store taxonomy
SEO focus keyword, SEO title, meta description, image alt pretending an SEO score is a guarantee
Media a product image or scene variation silently replacing approved media
Commercial — price, stock, orders

This distinction matters because a generated description can be reviewed by a person. A wrong stock quantity can create an operational incident.

Cormak's plugin follows this boundary. It can fill product content, taxonomy suggestions, SEO fields, alt text, and images. It does not read or modify prices, inventory, or orders. That is a product decision, not a prompt instruction.

2. Install and connect the plugin

Install Cormak from WordPress.org with WooCommerce active. Use an HTTPS WordPress admin in a normal deployment; localhost is useful for development.

The connection uses OAuth with PKCE. The plugin stores the connection securely using the WordPress site's salts, and the generation request requires an explicit confirmation in the plugin. Do not paste a long-lived Cormak password into a plugin settings field.

After connecting, check the account panel before starting a batch. It shows the available balance, the operation limit, and the current prices. Treat the displayed quote as the source of truth: an AI image and an AI text operation do not necessarily have the same cost.

3. Start with one product

Choose a product with a real image and enough factual input. A useful minimum brief looks like this:

{ "locale": "en-US", "product": { "name": "Stoneware coffee mug", "description": "350 ml glazed stoneware mug, dishwasher safe.", "categories": ["Kitchen", "Mugs"], "attributes": [ {"name": "Capacity", "values": ["350 ml"]}, {"name": "Material", "values": ["Stoneware"]} ] }, "options": { "fields": ["title", "description", "short_description", "seo", "image_alt"], "tone": "friendly", "length": "medium", "instructions": "Do not invent a warranty, origin, or shipping promise." } } 

The important part is not the wording “make it persuasive”. It is the negative constraint. Models are good at smoothing prose and bad at knowing which commercial facts are absent.

4. Review structured output, not only the preview

A useful response should separate fields so the editor can approve them independently:

{ "status": "complete", "result": { "title": "Stoneware Coffee Mug, 350 ml", "short_description_html": "A dishwasher-safe 350 ml stoneware mug.", "categories": {"existing": ["Kitchen", "Mugs"], "new": []}, "tags": ["coffee mug", "stoneware"], "seo": { "title": "350 ml Stoneware Coffee Mug", "focus_keyword": "350 ml stoneware coffee mug" }, "image_alt": "Glazed stoneware coffee mug on a neutral table" } } 

Check five things before applying it:

  1. Every number matches the source product.
  2. No shipping, guarantee, certification, or health claim was invented.
  3. Existing taxonomy was selected instead of creating near-duplicates.
  4. The HTML contains only the tags your storefront permits.
  5. The alt text describes the image rather than stuffing keywords.

5. Make retries safe

Network timeouts are normal in AI workflows. A retry must reuse the same request ID. Otherwise a user can pay twice or create two different image jobs while believing the first call failed.

The minimal server-side contract is:

type Operation = { requestId: string; status: "running" | "complete" | "failed" | "unknown"; result?: unknown; }; async function runOnce(requestId: string, body: unknown) { const existing = await db.operations.findByRequestId(requestId); if (existing) return existing; await db.operations.insert({ requestId, status: "running", bodyHash: hash(body) }); try { const result = await callModel(body); return await db.operations.complete(requestId, result); } catch (error) { return await db.operations.fail(requestId, safeError(error)); } } 

The production implementation also needs ownership checks, a durable credit ledger, and a policy for an ambiguous provider result. Never create a new UUID just to get around an unknown operation.

6. Scale only after a review sample

For a batch, generate drafts first and publish later. Keep a sample of 5–10 products for manual review. Compare the output against your store's tone, taxonomy, and factual requirements. If the sample fails, changing the prompt is cheaper than repairing 500 products.

The practical workflow is:

  1. Import or select products.
  2. Quote the operation and confirm spend.
  3. Generate draft text or images.
  4. Review a sample and correct the rules.
  5. Apply to the batch.
  6. Keep publication as a separate human decision.

For a working example, see the Cormak WooCommerce guide. The point is not to automate every field. The point is to make the dangerous fields impossible for this workflow to change.