Setting Up AI

AI Insights is switched on by saving your own API key for one AI service. You are billed by that service directly — there is no zorem-hosted AI and no extra charge from us.

Where to find the settings

Go to WooCommerce → Email Reports → AI Insights. The tab sits just before License.

You need the manage_options capability — an Administrator — to save a key, change the service or model, pause AI or test the connection.

Setup steps

  • Go to WooCommerce → Email Reports → AI Insights.
  • Choose your AI service — Claude (Anthropic) or Gemini (Google).
  • Paste your API key and click Save and test. The key is saved and one small test request is made straight away.
  • When the test passes, the API key row shows Connected. Pick a Model if you want something other than the default, then click Save Changes.
  • Open each report you want insights in, and turn on Show insights summary under Report Settings in the report builder.

The What AI adds to your reports card at the bottom of the tab shows how many of your reports have the insights summary turned on, for example 2 of 5 reports use it. Draft reports are not counted.

Services and where to get a key

ServiceGet an API keyDefault model
Claude (Anthropic)console.anthropic.com/settings/keysclaude-opus-5
Gemini (Google)aistudio.google.com/app/apikeyA Flash Lite or Flash model from your account

The Where do I get a key? link next to the API key field opens the right page for the service you have selected.

Each service keeps its own key, so you can switch between Claude and Gemini without losing either one. Only the selected service is ever called. After switching the service, save once to see that service’s models.

Choosing a model

One short request is made per report period, so the cost per email is small whichever model you choose. A cheaper model costs less; a more capable one is better at explaining what drove the numbers.

ServiceModels offered
Claude (Anthropic)Claude Opus 5 — most capable (default)
Claude Sonnet 5 — balanced
Claude Haiku 4.5 — cheapest
Gemini (Google)The list is read live from your own Google account, so a newly released Gemini model shows up without a plugin update. Only models that can write text are listed. If the list cannot be loaded, Gemini 2.5 Flash, Gemini 2.5 Flash Lite and Gemini 2.5 Pro are offered instead.
Claude defaults to Opus 5, the most capable and most expensive Claude model. If you send many reports, or daily reports, Sonnet 5 or Haiku 4.5 will cost noticeably less.

Testing the connection

Once a key is saved, the Not getting a summary? row offers a Test connection button. It sends one tiny request with your key and shows the result in place. It confirms that the key is valid, that the model is available to your account, and that your server can reach the service.

MessageWhat it meansWhat to do
Connected to Claude (Anthropic). The AI features are ready. (or Gemini)The key and model work.Nothing — turn on Show insights summary on your reports.
Enter an API key first.No key is saved for the selected service.Paste a key and click Save and test.
Could not reach the AI service: followed by the service’s own messageThe service refused the request — usually a wrong or revoked key, an account with no credit, or a model the account cannot use.Re-copy the key from the service’s dashboard, check billing is set up, or pick a different model.
Could not reach the AI service: followed by a cURL, connection or timeout errorYour server could not reach the service at all.See the next section.

If your server cannot reach the service

The plugin calls the service with WordPress’s own HTTP client. The connection test waits up to 15 seconds; the summary for a report waits up to 30 seconds. Common causes of a connection failure:

  • Outbound HTTP is blocked by the host. Ask your host to allow api.anthropic.com (Claude) or generativelanguage.googleapis.com (Gemini).
  • WP_HTTP_BLOCK_EXTERNAL is set in wp-config.php. Add the service’s host to WP_ACCESSIBLE_HOSTS.
  • A security plugin or firewall is blocking outbound requests. Allowlist the service’s host.

Replacing, removing or pausing

To…Do thisWhat happens
Use a different keyClick Replace, paste the new key and click Save and test.The old key is overwritten.
Pause AI but keep the keyTurn off Use the AI features and save. The label shows Paused.Nothing is sent to the service. The insights block and the Show insights summary switch disappear, and reports go out exactly as before. Turning it back on restores everything, including each report’s switch.
Remove the keyClick Remove and confirm.The key is deleted from your database and AI stops until a new key is added.

Every save on this tab also clears the summaries already written, so a change of model or key shows in the very next preview or email rather than the next day.

How your key is stored

The key is saved as a WordPress option in your own database, exactly as the service issued it, and is not loaded on every page. After saving, the settings screen only shows the last four characters, such as ********Xk9Q. The key is only ever sent to the service you chose, and never to zorem.

Removing a key here only stops this store using it. To stop the key being usable anywhere — and to stop any billing on it — revoke it in the service’s console. See AI Data & Privacy.