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.
Go to WooCommerce → Email Reports → AI Insights. The tab sits just before License.
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
| Service | Get an API key | Default model |
|---|---|---|
| Claude (Anthropic) | console.anthropic.com/settings/keys | claude-opus-5 |
| Gemini (Google) | aistudio.google.com/app/apikey | A 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.
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.
| Service | Models 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. |
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.
| Message | What it means | What 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 message | The 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 error | Your 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) orgenerativelanguage.googleapis.com(Gemini). WP_HTTP_BLOCK_EXTERNALis set inwp-config.php. Add the service’s host toWP_ACCESSIBLE_HOSTS.- A security plugin or firewall is blocking outbound requests. Allowlist the service’s host.
Replacing, removing or pausing
| To… | Do this | What happens |
|---|---|---|
| Use a different key | Click Replace, paste the new key and click Save and test. | The old key is overwritten. |
| Pause AI but keep the key | Turn 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 key | Click 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.