AI writing
Draft campaign emails and get recovery insights from your results, with your own AI provider account. Optional and off by default. You pay your provider directly, and everything else works without it.
Supported providers
| Provider | Default model | Notes |
|---|---|---|
| OpenAI | gpt-4.1-mini | The default provider |
| Anthropic | claude-haiku-4-5-20251001 | Claude models |
| Google Gemini | gemini-2.5-flash | |
| Groq | llama-3.3-70b-versatile | Fast open models |
| OpenRouter | openai/gpt-4.1-mini | Many models, one key |
| Mistral | mistral-small-latest | |
| Custom endpoint | — | Any OpenAI-compatible HTTPS endpoint |
| WordPress AI | — | Connectors set up in WordPress itself. Listed only on WordPress 7.0+ (with its built-in AI Client); no key is stored by this plugin. |
1. Connect a provider
- Pick a provider
On the AI Connector tab, click its card. The sidebar shows a "How to connect" guide with a link to get an API key.
- Save your API key
Paste it into API key and click Save Key. Your available models load automatically.
- Choose a model
Keep "Provider default", pick one from the list, or choose "Other model ID…".
- Test Connection
Click Save Changes, then Test Connection. You should see "Connected to OpenAI using gpt-4.1-mini." and the status Connected. Other statuses: Not tested, Not connected, Invalid credentials, Rate limited or Error.
- AI Provider cards (OpenAI selected)
- Connection card with API key and Model
- "How to connect" guide in the sidebar
Requests & limits
These protect your provider bill. Cached answers are free and don't count.
| Setting | Default | Range |
|---|---|---|
| Timeout (seconds) | 45 | 5–120 |
| Max response tokens | 1024 | 256–2048 |
| Cache answers (minutes) | 60 | 0–1440 |
| Hourly limit per admin | 30 | 0–500 (0 = no limit) |
| Daily limit (whole site) | 200 | 0–5000 (0 = no limit) |
| Log provider errors | On | To WooCommerce → Status → Logs, with keys removed |
2. Turn on AI writing
On the AI Writing tab:
Adds Write with AI to each campaign email.
Friendly, Helpful, Gently urgent or Premium.
What you sell and how you talk to customers, for example "Handmade leather goods. Warm, short sentences, no exclamation marks." It is sent with each request.
- AI Writing card: Enable AI writing, Default tone, About your brand
- Recovery Insights card with "Include Campaign and Product Names"
- AI Connection card in the sidebar
The sidebar card AI Connection shows the provider, its status (Ready, Not set up, AI is off or License needed) and today's usage.
3. Draft an email
- Open a campaign
In the campaign builder, find the email you want to write.
- Click Write with AI
If the email already has text, you're asked before it is replaced.
- Review and save
"Draft written. Review it, then save the campaign." Nothing is saved until you click Save campaign.
- An email right after a draft was written
- Subject, heading, message and button filled in
The Write with AI button sits in each email card's header, next to Preview. Click Preview right after drafting to see the result; there is no need to save first. AI writes the subject, heading, message and button text. It doesn't touch Subject B, the coupon or the design. To A/B test an AI subject, write Subject B yourself. It knows the email's position in the sequence, its wait time and whether it carries a coupon, and it uses {first_name}, {store_name}, {cart_total} and {coupon_code} correctly. Unknown placeholders and links are removed from the draft.
4. Recovery insights
With AI ready, the Analytics tab can ask your provider for 3–5 recommendations based on the period's totals. They run only when you click Generate insights, and results are kept for 24 hours.
On the AI Writing tab, under Recovery Insights. Off: campaigns are sent as "Campaign 1", "Campaign 2", and product and category results are left out. On: their names are sent too, for more specific advice.
Insights use the same connector, limits, cache and usage counters as writing.
Privacy & security
- API keys are encrypted on your server and never sent to the browser or shown again.
- You can define a key in
wp-config.phpinstead. It always wins and is never stored in the database:
define( 'SITERYN_ABANDONED_CART_PRO_AI_OPENAI_API_KEY', 'sk-…' ); define( 'SITERYN_ABANDONED_CART_PRO_AI_ANTHROPIC_API_KEY', 'sk-ant-…' );
- A custom endpoint key is tied to its host, so changing the URL asks for the key again.
- If your site's security salts change, saved keys can't be decrypted and you're asked to enter them again.
Common messages
| Message or status | What to do |
|---|---|
| Invalid credentials | The key is wrong or revoked. Paste a new one. |
| Rate limited | Your provider is throttling requests. Wait, or upgrade your provider plan. |
| The AI request limit set on the AI Connector tab has been reached. | Try again later, or raise the hourly or daily limit. |
| This request is already running. | Wait for the current draft to finish. |