=== 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.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn WooCommerce order questions into clear, personal replies in five languages. Review the facts, edit and copy in seconds.

== Description ==

**An order question. A useful reply. In seconds.**

CaseKit adds a compact Reply Assistant to your WooCommerce order screens and a full workspace under WooCommerce > Reply Assistant. Choose an order, paste the customer's question and click Draft reply. You get an editable answer with the customer's first name, a localized greeting and a closing. Open Order facts to review the supporting record.

= Made for everyday order support =

* **Five reply languages:** English, French, Spanish, German and Italian.
* **Order facts at hand:** status, recorded refunds, items and stored tracking details when available.
* **Customer questions covered:** order status, tracking, refunds, cancellation, changes and item problems.
* **Less searching:** match a pasted order number to a recent order, with your store's order prefix.
* **Your store rules:** set a default language, processing and refund times, return rules and staff policy notes.
* **Your existing workflow:** edit and copy into Gmail, email or your help desk. You remain in control of sending.
* **Modern WooCommerce support:** compatible with HPOS and legacy order storage through WooCommerce order APIs.

= Unlimited replies on your site =

Draft reply runs entirely on your WordPress site. All built-in topics, languages, order matching, store rules, editing and copying are free and unlimited, without an account or service connection. Leave the message blank for a status reply. Local replies remain available when the optional service is disconnected, unavailable or its allowance is exhausted.

= Optional CaseKit guidance =

After a local draft, open Optional AI guidance to read the disclosure and choose Draft with AI guidance. This separate hosted service classifies the question and concern, selects a reply grounded in the order and may add a short acknowledgment in the chosen language.

* **Free:** 25 successful hosted AI-guided drafts per UTC calendar month.
* **Pro:** unlimited monthly hosted AI-guided drafts, with the saved tone used during inference. Short security rate limits still apply.

Service plans do not restrict any local plugin functionality. Pro and Pro demos are currently managed by CaseKit; the Upgrade to Pro link opens the [CaseKit homepage](https://casekit.app/). The plugin does not collect payment or install an updater.

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/ is used only for the separate optional AI-guidance action and its service account management. It is not required for Draft reply, including customer-message replies. Activation and local drafting do not contact CaseKit. After the site connects through the optional AI action, opening an admin surface may refresh plan and usage information from CaseKit; that request contains no customer message or order details.

The Optional AI guidance section discloses the data transfer before the separate action button. On the first explicit AI-guided draft request, the plugin sends the public WordPress site URL and a random connection 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 AI-guided draft request sends the pasted customer message, language, saved tone 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 tracking details when those fields exist. Do not paste unnecessary sensitive information into the message. CaseKit returns a selected draft and a temporary draft ID; it does not intentionally store message or draft text. Each successful AI-guided draft consumes one monthly use. Clicking Copy sends the draft ID for idempotent bookkeeping and does not consume another use. CaseKit stores site URL, connection state, monthly usage, temporary draft IDs, AI model/token/cost totals and operational audit data. A store manager can disconnect and delete its 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'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 =

For AI-guided drafts, CaseKit sends the pasted customer message to OpenAI's Responses API to classify intent and level of concern. For Pro sites, the saved tone may also be sent, limited to 200 characters. It does not deliberately send the four candidate replies or order record to OpenAI; however, anything included in the pasted message is sent. The request asks OpenAI not to store the response. OpenAI may process data under its own service terms and retention rules. CaseKit uses the returned categories to select a locally prepared factual reply and a fixed acknowledgment; OpenAI does not write 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. This runs locally without an account or usage limit.
5. Review the reply and order facts, edit if necessary, then click Copy and paste it into your email or help desk.
6. Optionally open Optional AI guidance beneath the reply, read the service disclosure and choose Draft with AI guidance. This separate service action uses the monthly AI allowance; local replies remain unlimited.
7. Use WooCommerce > CaseKit Settings to set language and store rules or disconnect the optional service.

== Frequently Asked Questions ==

= Does CaseKit send email or change orders? =

No. A store worker reviews and sends every reply outside the plugin. Drafting and copying do not change the order.

= Do I need an OpenAI key or account? =

No. Local drafting needs no external account. CaseKit manages the optional AI service, and a site connection is created only when a worker explicitly chooses Draft with AI guidance.

= What counts toward the Free plan? =

Only a successful Draft with AI guidance request to the hosted service counts once, even if you do not copy it. Copying does not count again. All local Draft reply requests, including customer-message drafts and every reply topic, are unlimited. Service limits and failures do not remove your existing reply or disable local drafting, editing or copying.

= Can it confirm delivery or refund arrival? =

No. It reads WooCommerce records and may show stored tracking data, but it does not query a carrier or payment provider. It avoids claiming a carrier delivered a parcel or that refunded money reached a customer without evidence.

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

Yes. Copy the reviewed reply and paste it into your customer conversation. This release does not read your mailbox or grant an external service access to search your WooCommerce orders.

== Screenshots ==

1. The reply workspace: a personal, editable reply and the order facts that support it.
2. Store settings: reply language, order matching and support rules in one place.

== Changelog ==

= 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.2.3 =

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