=== AI Chatbot for WooCommerce: Emporiqa Sales Assistant ===
Contributors: rosenhristov1
Tags: ai chatbot, live chat, woocommerce chatbot, ecommerce chatbot, ai customer support
Requires at least: 6.2
Tested up to: 7.1
Requires Plugins: woocommerce
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.1
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI chatbot and live chat for WooCommerce. Recommends from your catalog, answers from your pages, adds to cart; your team can step in. No monthly fee.

== Description ==

Emporiqa is an AI chatbot for WooCommerce with no monthly fee and no API key to paste. You pay $0.25 when it talks to a shopper, and nothing in the months it doesn't. The model cost is inside that rate, so no second bill arrives. You start with $25 of signup credit, about 100 conversations, and no card is required.

It sells and it answers support questions, in 65+ languages, from your own synced catalog.

Open the [live demo store](https://demo.emporiqa.com) and ask for a product it does not sell: it says so instead of inventing one. That demo sells electronics; the behavior is the same on any catalog. Unedited conversations, refusals left in, are on the [proof page](https://emporiqa.com/proof/).

https://www.youtube.com/watch?v=y7ARSIUxuXI

= What it does =

* Recommends by meaning, not keyword: "waterproof winter boots under 80, size 9" returns only what matches all four conditions
* Answers "too expensive" with alternatives you already sell, and asks which size or colour rather than guessing
* Visual search: finds the closest thing you stock from a photo a shopper uploads
* Voice mode, if you switch it on: the shopper taps the microphone, speaks, and hears the answer read aloud while the product cards stay on screen
* Adds the item to the WooCommerce cart, with your own stock and variation checks
* Answers shipping, returns and policy questions from your synced pages, and looks up an order from a number and email
* Lets anyone on your team take over a live conversation, reading it from the first message with your saved replies to hand
* Alerts your team in Slack, Microsoft Teams, Discord, Google Chat or email; outside your business hours it takes an email or phone number
* Reports which chats ended in a purchase, with the revenue attributed to chat

= Answers and wording you control =

Write your own answers as pages in the Emporiqa dashboard, up to 25 per store and 10 languages each, and a sync from your shop never touches them.

Under Settings and How the chat writes, pick one of four tones, Standard, Friendly, Professional or Concise, and leave short wording notes, in general and per situation. That changes wording only: stock, prices and orders come from your store, and "never say something is out of stock" is ignored on purpose.

Under Settings and Widget appearance, add up to four starter questions per language, shown as buttons under the welcome message until the conversation starts, and put your store's own picture in the chat header and next to the chat's answers. Team members can answer under their own name and photo.

= The chat tells shoppers it is an AI =

The default greeting tells the shopper they are talking to your store's AI assistant, in every language the chat speaks, which is the disclosure the EU AI Act asks for. If you rewrite the greeting, keep that disclosure in it: one that drops it is refused when you save, and the Emporiqa terms (section 8.6) treat removing it, including through custom CSS or code, as a breach.

= Built for WooCommerce =

Simple, variable, grouped and external products. HPOS. WPML and Polylang. Multi-currency via WOOCS, WPML Multi-Currency, WooCommerce Payments and Aelia.

Price, stock and status changes reach Emporiqa as you make them; a few edits need one Sync All afterwards, which the [documentation](https://emporiqa.com/docs/woocommerce/) covers. The same chatbot also runs on Drupal Commerce, Magento, PrestaShop, Shopware and Sylius.

= Privacy and security notes =

The signed-in shopper's token is fetched from `admin-ajax.php?action=emporiqa_customer_token`. It is read-only and returns only the current session's own identity token. It cannot be nonce-protected, because the page that would carry the nonce is full-page cached; cross-site use is blocked instead by a required custom header (which forces a CORS preflight) and a Sec-Fetch-Site / Origin check, and the answer is never cached.

= Third-Party Service =

This plugin requires an [Emporiqa](https://emporiqa.com) account and sends data there. Your catalog and synced pages go to `https://emporiqa.com/webhooks/sync/`, signed with HMAC-SHA256; the widget script loads from `https://emporiqa.com/chat/embed/`; connecting uses a PKCE handshake via `https://emporiqa.com/connect/start`. What a shopper types, and any photo uploaded for visual search, is processed by Emporiqa's AI provider and never trains AI models. If you switch on voice mode, a shopper's spoken message goes to that provider to be turned into text and the reply is read aloud by an AI voice; Emporiqa does not keep the recording. Sync requests carry the plugin version (`X-Emporiqa-Plugin-Version`). If you add the Order status rule, Emporiqa calls this site's `/wp-json/emporiqa/v1/actions/order-status` with a signed request to look up the order a shopper asks about; the older order tracking address `/wp-json/emporiqa/api/order/tracking` keeps working while you use it. When a shopper is signed in to your store, the chat sends Emporiqa their WordPress user ID (signed, never their name or email), so Order status can find their own orders without an email and `/wp-json/emporiqa/v1/actions/customer-prices` can answer with the prices your shop gives that customer. Emporiqa also calls `/wp-json/emporiqa/v1/actions/verify` to check the address is yours. Each of these answers only a request signed with your store's connection secret (HMAC-SHA256, within 5 minutes), checked by the route's permission callback; the one unsigned call is the connect check, answered only during a connection you started in the last 2 minutes. [Terms of Service](https://emporiqa.com/terms-of-service/), [Privacy Policy](https://emporiqa.com/privacy-policy/).

== Installation ==

1. Plugins > Add New, search for "Emporiqa", then Install Now and Activate.
2. Settings > Emporiqa, click **Connect to Emporiqa**, sign in or create a free account and pick the store. You land back connected.
3. On the Sync tab, click **Send my catalog**. The widget appears once that first sync finishes.

On plain HTTP, or to paste credentials yourself, expand *I'd rather paste credentials manually* and use the Store ID and Connection Secret from Settings > Integration > Integration overview.

Full guide: [emporiqa.com/docs/woocommerce/](https://emporiqa.com/docs/woocommerce/)

== Frequently Asked Questions ==

= Is this AI chatbot free? =

The plugin is free and you connect without a card. The service is pay-as-you-go: $25 of signup credit, about 100 conversations, then $0.25 per conversation. There is no monthly plan and no free trial. The $59 figure is a spending cap, not a fee: the default ceiling on a month's charges, which you raise or remove yourself. A month with 40 conversations costs $10. Team members are included with no per-seat fee, and a conversation is billed once, when the shopper first writes. Voice mode is optional and off by default: a conversation where the shopper speaks costs $0.15 more, charged once, and counts toward the same cap. Prices exclude VAT. [Full pricing](https://emporiqa.com/pricing/).

= Do I need an OpenAI API key or my own AI account? =

No. You do not open an account with an AI provider, paste a key, or manage tokens. The model cost is inside the per-conversation price.

= What happens when the $25 credit runs out? =

You get an email before it is exhausted. If no card is on file by then the widget pauses: your store keeps working, but the chat doesn't answer until you add one. Spending stops at the cap.

= What will it cost at my traffic level? =

Cost follows traffic, not revenue: multiply the conversations you expect by $0.25. The share of visitors who open a chat varies by store, so you find your own figure in the first weeks. As an illustration, if 3 in 100 visitors opened the chat, 40,000 monthly visitors would come to roughly 1,200 conversations, about $300.

= What happens when the chatbot can't answer, or gets something wrong? =

Ask for something you don't stock and it says so, instead of inventing a product. Prices, stock, variations and policy pages come from what your site syncs. When it can't answer with confidence it says so and offers to bring in a person. Every conversation is readable in the dashboard, and low-rated ones are flagged.

= How is this different from a live chat plugin? =

Live chat routes a shopper to a person, so it answers when someone is at the keyboard. This one answers on its own from your catalog, recommends products and handles objections, and your team can still take over any conversation.

= Which languages does it speak? =

65+, and it answers in the language the shopper writes in. On multilingual stores it detects Polylang and WPML and syncs every configured language.

= Will it work with my theme, and will it slow my site down? =

It works with any theme: the widget is a script layered over your storefront, not built into it. The script loads asynchronously in the footer, and the chat downloads only when a shopper opens the bubble. It sits outside your checkout, so if Emporiqa is unreachable your storefront keeps working.

= What do you do with my data, and my customers' data? =

Emporiqa is an EU company under GDPR, and shopper conversations are not used to train AI models. Your catalog stays in WooCommerce. There is no SOC 2 or ISO 27001 certification and no service level agreement on pay-as-you-go, where Rosen Hristov answers support email himself.

= How do I turn the chatbot off, and what happens to my data? =

Deactivate the plugin and the widget disappears from your storefront immediately, with no contract to cancel. Your synced products stay on the Emporiqa side until you delete the store there. Chat history is deleted after 90 days on a rolling basis, and there is no conversation export yet, so save any transcripts first.

== Screenshots ==

1. Product recommendations: asked for headphones for long flights under 400 euros, the chat shows two, each with photo, price and Cart button
2. Asked for a product the shop does not stock, the chat says so
3. Objection handling: over budget, it shows cheaper headphones you already sell
4. In-chat cart: it asks which colour, then adds it and offers checkout
5. Customer support: shipping and payment from your synced policy pages
6. Live take-over: your teammate answers inside the shopper's chat, both views shown
7. Order tracking: the chat asks for an order number and matching email
8. Dashboard (demo store data): chat status, spend, revenue from chat
9. Billing: pay-as-you-go at $0.25 a conversation, capped at $59 a month, with the next billing date
10. Voice mode, if you switch it on: the answer is read aloud in an AI voice while the product cards stay on screen

== Changelog ==

= 1.2.0 =
* New: Order status, a ready-made rule. Shoppers ask "where is my order?" and the chat answers from your WooCommerce orders: status, order date and tracking numbers (WooCommerce Shipment Tracking and Advanced Shipment Tracking are read when installed). A signed-in shopper only gives the order number; a guest also gives the order's email. Settings > Emporiqa shows the Order status address to copy into the rule in Emporiqa, and whether the rule is on.
* Changed: a signed-in shopper's identity is no longer written into the page or the chat script's URL, where a full-page cache could hand it to another shopper and server logs could keep it. The chat asks for it when it opens, from an uncached request.
* Changed: the old order tracking keeps working as before and stays on. Where ready-made rules are offered it moves under Advanced, with how to switch it off once the Order status rule replaces it.
* Changed: sync requests are also signed with Emporiqa's newer per-purpose keys and carry the plugin version; connecting proves the request came from your site; a connection Emporiqa holds for an owner's approval shows Emporiqa's own explanation.
* Changed: prices are sent as your shop shows them. A shop that enters prices without tax but shows them with tax (or the reverse) used to send the entered amount; prices with and without tax are now both sent when taxes are on.
* Fix: prices are always synced as a signed-out visitor sees them, with tax at your shop's address. A role, B2B or wholesale pricing plugin could otherwise send the price of whoever saved the product or ran the sync as the public price. The chat's cart now shows each item's price with or without tax as your cart page does.
* Fix: Sync All pages through products and pages by id, so a product changed during a sync can no longer be skipped and then removed from Emporiqa.
* Fix: an order conversion that Emporiqa could not receive after every retry is sent again at the order's next paid status.
* Changed: a language you did not tick under Languages (Polylang or WPML) is neither synced nor offered: its pages show no chat.
* New: customer prices. Emporiqa can ask this site for a signed-in shopper's own prices (`actions/customer-prices`), read by WooCommerce as that shopper with tax for their address. WooCommerce has one price per product, so this is your public price unless a role, B2B or wholesale pricing plugin gives that customer another; only prices are returned, and products the shopper cannot see are left out.
* New: quantity price tiers. The Tiered Price Table plugin's tiers are sent when it is active, and the `emporiqa_price_tiers` filter lets any other quantity-pricing plugin send its own (WooCommerce has none of its own); each tier is the unit price the cart charges, with tax as your shop shows prices.
* Changed: the signed-in shopper's token request requires a custom header and refuses cross-site requests; guests no longer reach it at all.
* Fix: the old order tracking reads a typed number only as an order number, never as another order's internal id.
* Test connection warns when this server's clock is more than 2 minutes off.
* Changed: a variation is sent without the description, categories and brand it shares with its product, and Emporiqa reads them from the product, so syncs send less.
* Fix: moving a variable product to the Trash now removes its variations from Emporiqa straight away, not only at the next Sync All.
* Fix: on a page served from a full-page cache long enough for its security token to expire, the chat's first add to cart no longer fails with "Security check failed"; it is retried once with a fresh token.
* Fix: when Emporiqa is busy and asks a sync to slow down, Sync All and the WP-CLI sync wait as asked and send the same batch again, instead of failing the sync and blocking the next one for an hour.
* Fix: the chat's cart actions now refuse requests sent from another website, and a guest's cart security token is tied to that guest's own cart.
* Fix: the Mini-Cart block of block themes (such as Twenty Twenty-Five) now updates when the chat adds or removes items; it used to show the old count until the page was reloaded.
* Changed: requires WordPress 6.2, the oldest version WooCommerce 8.0 runs on. The signed-in shopper's token answer is marked no-store and private on every supported WordPress version.

= 1.1.10 =
* Changed: admin notices now point to the renamed dashboard section (Settings → Integration → Integration overview).
* Changed: the connect screen now says the chat goes live once the first full sync finishes.
* Text only. No functional changes.

Older entries are in changelog.txt, shipped with the plugin.

== Upgrade Notice ==

= 1.2.0 =
Adds the Order status rule, and keeps a signed-in shopper's identity out of cached pages. Old order tracking keeps working; nothing to do after updating.

= 1.1.10 =
Text-only update: the plugin's setup instructions now match the renamed Integration section of the Emporiqa dashboard.
