=== CaseKit Order Replies ===
Tags: woocommerce, customer support, ai, order status, email replies
Contributors: casekit
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn WooCommerce order questions into personal replies in five languages. Free includes 25 service drafts a month. No API key needed.

== Description ==

**A customer question. A ready-to-edit reply.**

CaseKit puts a compact Reply Assistant beside your WooCommerce orders. Choose an order, paste the customer's question and click Draft reply. Get a personal greeting, relevant order details and a closing in your chosen language. Review, edit and copy into your customer conversation.

= Useful from the first reply =

* **Answers grounded in the order:** status, recorded refunds and saved tracking details, with supporting facts one click away.
* **Several questions, one reply:** handle order updates, refunds, changes and item problems together when asked.
* **Five languages:** English, French, Spanish, German and Italian, including greetings and closings.
* **Find orders faster:** match a pasted order number, including your store's order prefix.
* **Fits your workflow:** use the order panel or WooCommerce > Reply Assistant, then copy into Gmail or your help desk. You choose what to send.
* **Built for WooCommerce:** supports HPOS and legacy order storage.

= Free or Pro =

* **CaseKit reply:** AI when helpful. Free: 25 successful service drafts per UTC calendar month. Pro: unlimited drafts, tone and reply-style instructions.
* **Local reply:** order-based templates, no AI. Unlimited on every plan.

No separate AI button or API key is needed. Before your first service draft, choose Connect and draft to consent to the data transfer. Short security rate limits apply to Pro service drafts.

Each successful service draft counts once, including drafts that do not need AI. Failed requests and copying do not use another reply. Factual store rules, including processing and refund times, remain available on both plans.

= Local reply option =

Reply options > Local reply works entirely on your WordPress site, with no service account. All built-in topics, languages, order matching, factual store rules, editing and copying remain free and unlimited, including when the service is disconnected, unavailable or its allowance is exhausted.

Service plans do not restrict any local plugin functionality. Pro is $19 USD per month or $190 USD per year for one WooCommerce site. Paid subscriptions renew automatically until cancelled. Only a WooCommerce manager can use Upgrade to Pro or Manage Pro; this explicit action connects the site if necessary and opens a short-lived, site-bound [CaseKit billing page](https://casekit.app/woocommerce/pro/), where PayPal handles subscription approval. Installing the plugin or opening its admin pages does not start a purchase. Pro demos remain separately managed by CaseKit. The plugin does not collect payment details or install an updater. Disconnecting or uninstalling CaseKit does not cancel a PayPal subscription; cancel through Manage Pro or PayPal automatic payments first.

CaseKit drafts replies from the available order record. It does not verify live carrier events, read a mailbox, send email, issue refunds or change orders. It does not guarantee that a store policy applies to a particular order. Review the facts before sending.

= External service: CaseKit =

The hosted CaseKit service at https://api.casekit.app/ handles Draft reply and service account management. Activation does not contact CaseKit. Before the first service draft, Connect and draft explains the transfer and records the current user's consent for this WordPress site. The local action under Reply options does not require this connection or consent. After a site connects, opening a plugin admin surface may refresh plan and usage information; that request contains no customer message or order details. Starting or managing a subscription sends a signed site identity without customer messages or WooCommerce order details.

On the first service connection, the plugin sends the public WordPress site URL and a random installation secret to CaseKit. CaseKit checks a public, nonce-specific proof endpoint on that site. The secret is stored in a WordPress option and encrypted in CaseKit's Cloudflare database. Later requests are signed and replay protected.

Each service draft sends the pasted customer message (up to 2,000 characters), language, selected topic, saved tone, reply-style instructions and four short candidate replies to CaseKit over HTTPS. Candidate replies can include the selected order number, customer first name, WooCommerce status, item names, refund amount and stored tracking details. Do not paste unnecessary sensitive information. CaseKit returns a draft and temporary draft ID; it does not intentionally store message or draft text. Each successful service draft consumes one monthly use, whether or not an AI call was needed. Copy sends the draft ID for idempotent bookkeeping and does not consume another use. CaseKit stores site URL, connection state, monthly reply usage, temporary draft IDs, AI model/token/cost totals and operational audit data. A store manager can disconnect and delete service account data under WooCommerce > CaseKit Settings.

Uninstall removes local settings and attempts service-account deletion. On multisite, local cleanup completes across sites before remote deletion begins; data still used by an active pre-release CaseKit plugin is preserved. Remote deletion is best effort. If the service is unreachable or uninstall is interrupted, email support@casekit.app with the affected site URLs.

To prevent reconnecting from resetting the Free allowance or bypassing an abuse restriction, CaseKit retains a keyed site fingerprint, the current month's consumed allowance and a disabled flag when applicable after account deletion. This guard contains no plaintext site URL, connection secret or customer data. The allowance resets at the next UTC month; expired unrestricted guards are removed during later service activity. A disabled guard remains until CaseKit reviews the restriction.

CaseKit retains a keyed site fingerprint and minimal PayPal payment and subscription identifiers for financial records and to restore paid access after reconnection. This separate billing ledger contains no customer messages or WooCommerce order data. Financial records are not erased by Disconnect and delete account data; email support@casekit.app for billing or privacy questions.

CaseKit's [WooCommerce terms](https://api.casekit.app/woo/terms) and [WooCommerce privacy policy](https://api.casekit.app/woo/privacy) describe the service and data handling.

= External service: OpenAI =

When useful for the reply, CaseKit sends the pasted customer message to OpenAI's Responses API to identify up to three topics, concern, style and one next-step category. For Pro sites, saved tone (up to 200 characters) and reply-style instructions (up to 800 characters) may also be sent. These preferences affect style, not order facts, eligibility, amounts or store decisions. The four candidate replies stay with CaseKit and are not deliberately sent to OpenAI; anything included in the pasted message is sent. The request uses store: false. OpenAI may process data under its own service terms and retention rules. CaseKit uses the returned categories to assemble existing factual paragraphs and approved localized wording, without model-written order facts. Review [OpenAI's privacy policy](https://openai.com/policies/privacy-policy/) and [API terms](https://openai.com/policies/services-agreement/).

== Installation ==

1. Install and activate WooCommerce 8.2 or newer on WordPress 6.5 or newer, with PHP 7.4 or newer.
2. If you used the pre-release CaseKit AI Order Replies plugin, deactivate it first. Install and activate CaseKit Order Replies for WooCommerce.
3. Open WooCommerce > Reply Assistant or a WooCommerce order.
4. Paste a customer message and click Draft reply. On first use, read the short service disclosure and choose Connect and draft. Consent is saved for your WordPress user on this site.
5. Review the reply and order facts, edit if necessary, then click Copy and paste it into your email or help desk.
6. For a reply processed entirely on your site, use Reply options > Local reply. This remains free and unlimited.
7. Use WooCommerce > CaseKit Settings for language, order matching, factual store rules and the Pro service style settings, or to disconnect the service.

== Frequently Asked Questions ==

= Does CaseKit send email or change orders? =

No. You review and send each reply. Drafting and copying do not change the order.

= Do I need an OpenAI key or account? =

No. CaseKit manages the provider credentials. Connect and draft sets up the service after your consent. Local reply needs no service account.

= Can it confirm delivery or refund arrival? =

No. CaseKit uses WooCommerce records and saved tracking details. It does not check live carrier events or confirm that a refund reached the customer.

= Can I use it with Gmail or another help desk? =

Yes, by copying and pasting your reply. This release does not read your mailbox or provide a Gmail copilot.

== Screenshots ==

1. From customer question to editable reply, with the selected order and supporting facts at hand.
2. Set your reply language, order matching and factual support rules in one place.

== Changelog ==

= 0.3.1 =

* Clarify the difference between CaseKit service replies (Free: 25/month; Pro: unlimited) and unlimited local order-based templates with no AI.

= 0.3.0 =

* Make Draft reply the main CaseKit service action, with concise consent remembered per WordPress user and site.
* Count 25 successful service replies per Free month; use AI when applicable and keep Pro monthly service replies unlimited.
* Combine up to three requested topics with order-grounded facts, localized acknowledgments and an appropriate next step.
* Add hosted Pro tone and reply-style instructions while preserving all local functions and factual rules under Reply options.
* Prepare a versioned, data-only integration contract for a future Gmail copilot; pairing and remote order lookup are not enabled.

= 0.2.4 =

* Add manager-only, nonce-protected links to CaseKit's site-bound Pro billing page.
* Keep paid subscription management available as plan information updates.
* Disclose automatic renewal and cancellation separately from plugin disconnection or removal.
* Use the CaseKit website's brand mark in the reply workspace and settings.

= 0.2.3 =

* Add customer-name greetings and localized closings in all five reply languages.
* Improve multilingual question detection and consistency of reply wording.
* Format refund amounts for the reply language and read saved custom tracking links safely.
* Refine the compact reply workspace and order-fact presentation.
* Clean up local settings across multisite installations before attempting remote account deletion, preserving active pre-release plugin data.
* Improve the WordPress directory description and screenshots.

= 0.2.2 =

* Make all customer-message drafting, local intent detection, reply topics, languages, store rules and copying available without service access or limits.
* Separate optional hosted AI guidance behind its own disclosed action; Free and Pro allowances apply only to external AI requests.
* Preserve the current editable reply when the optional AI service is unavailable or its allowance is exhausted.
* Apply manually selected question types and staff policy notes to local replies, including replies with no customer message.

= 0.2.1 =

* Use the CaseKit website logo in the assistant, settings and WordPress directory assets.
* Show a compact Free or Pro plan card with current usage and a homepage upgrade link.
* Show the service disclosure beside the draft action when a customer message is present.
* Resolve Plugin Check translation comments and input-sanitization findings.
* Meter AI-guided drafts at generation so the Free allowance cannot be bypassed by manual copying.
* Avoid conflicts with the pre-release plugin and correct custom order-prefix matching and card-refund timing.

= 0.2.0 =

* CaseKit-managed AI guidance for Free and Pro; no merchant OpenAI key.
* Free 25 AI-guided copied replies per month, Pro unlimited monthly; local status previews remain available.
* Store settings, multilingual classification improvements, refund-status accuracy fixes and service data deletion.
* Dedicated Woo operations support for plans, demos, usage and AI expense tracking.

= 0.1.0 =

* Initial WooCommerce order reply assistant.

== Upgrade Notice ==

= 0.3.1 =

Clearer reply options: CaseKit uses AI when helpful; Local reply provides unlimited order-based templates without AI. Plans and limits are unchanged.

= 0.3.0 =

Draft reply now uses CaseKit after your consent. Free includes 25 successful service replies per month. Unlimited Local reply remains under Reply options. No merchant API key required.

= 0.2.4 =

Manager-only CaseKit Pro billing and the current CaseKit logo. Uninstalling does not cancel a subscription; use Manage Pro or PayPal automatic payments.

= 0.2.3 =

Personal greetings, localized closings and clearer multilingual order replies. Local replies remain free and unlimited.
