=== Upselia – AI Sales Assistant ===
Contributors: jesus2lopez
Tags: woocommerce, chat, ai, sales assistant, abandoned cart
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.3.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Valeria, an AI sales assistant for your WooCommerce store: recommends products, answers questions and recovers abandoned carts.

== Description ==

**Upselia** adds Valeria to your WooCommerce store: a sales assistant that talks to your customers, understands what they are looking for, asks the right questions (budget, size, colour…) and recommends products from your own catalogue.

Everything is managed from your WordPress admin:

* **One-click connection** — press “Connect with Upselia”, log in (or create your account) and you are back, connected. No codes to copy.
* **Your catalogue, always up to date** — products, variations (size, colour…), brands, sale prices and stock are copied automatically in the background and updated when they change.
* **Sales from the chat and from emails** — Upselia knows which paid orders came from a chat conversation or from an email, without receiving your customers’ personal data.
* **Abandoned carts** — the recovery email link rebuilds the cart, even on another device.
* **Discounts with your own coupons** — choose one of the coupons you created in WooCommerce and Valeria offers it with the same conditions. Upselia never creates discounts for you.
* **The Upselia panel inside WordPress** — set up Valeria, automatic emails and campaigns, see contacts and conversations, your plan and invoices without leaving your admin.

The plugin does not slow down your store: all communication with Upselia happens in the background (Action Scheduler) and, if Upselia is unavailable, your store works as usual (the chat just does not show).

= Requirements =

* WooCommerce 8.0 or later.
* An Upselia account (you can create it while connecting). Upselia is a paid service; see the plans at [upselia.es](https://upselia.es).

== External services ==

This plugin connects your store to **Upselia** (https://upselia.es), the service that runs the Valeria assistant. It is required for the plugin to work.

Nothing is sent to Upselia until you press “Connect with Upselia”.

* **Chat widget** — the script `https://chat.upselia.es/widget.js` is loaded on your store’s pages (only while connected and where you choose to show the chat). The visitor’s messages to Valeria are sent to Upselia so it can answer. The widget stores a chat session identifier in the visitor’s browser (localStorage and the `ups_sid` cookie, 30 days) to keep the conversation and to know if an order came from the chat.
* **AI provider** — to write Valeria’s answers, Upselia sends the chat messages to OpenAI (https://openai.com), which acts as Upselia’s data processor and does not use them to train its models. The plugin itself never contacts OpenAI. OpenAI terms: https://openai.com/policies/terms-of-use — privacy policy: https://openai.com/policies/privacy-policy
* **Connection** — when you press “Connect with Upselia”, your browser goes to `https://panel.upselia.es/conectar` with your store address. Your store then exchanges a one-time code for its own key (`https://panel.upselia.es/api/conectar/canjear`).
* **Catalogue** — product data (name, description, price, sale price, categories, tags, brand, attributes, SKU, stock, availability, URL and image) is sent to `https://panel.upselia.es/api/tienda/catalogo` when you connect, once a day and whenever a product changes.
* **Orders** — for orders placed after connecting: order number, status, total, currency, purchased product IDs and the chat session identifier are sent to `https://panel.upselia.es/api/tienda/pedido`. No customer personal data (name, email, address, phone) is ever sent.
* **Discount** — if you choose one of your coupons for Valeria to offer, its code and conditions (percentage, minimum amount, excluded categories and products) are sent to `https://panel.upselia.es/api/config`, and again when you change that coupon.
* **Store status and domain check** — the plugin asks `https://panel.upselia.es/api/tienda/estado` for your chat settings every few hours and, to prove the store is yours, asks `https://panel.upselia.es/api/tienda/verificar-dominio` to call your site, which answers with a signature (never the key).
* **Technical versions** — every request your store makes to `https://panel.upselia.es` includes the versions of WooCommerce, WordPress, PHP and this plugin, so Upselia knows which versions it has to support. No personal data is included.
* **Privacy text** — the paragraph about the chat for your privacy policy is downloaded from `https://panel.upselia.es/api/privacidad-tienda` once a week.
* **Panel** — the Upselia panel shown in your admin requests your Upselia data (settings, contacts, conversations, plan, invoices) from `https://panel.upselia.es/api/…` through your own site. The panel’s code, fonts and logo are included in the plugin; nothing is loaded from other sites.
* **Disconnecting** — when you disconnect or delete the plugin, `https://panel.upselia.es/api/tienda/desconectar` is called so the store’s key stops working.

Upselia terms of service: https://upselia.es/terminos
Upselia privacy policy: https://upselia.es/privacidad

== Installation ==

1. Install and activate the plugin (WooCommerce must be active).
2. Go to **Upselia** in your WordPress menu.
3. Press **Connect with Upselia**, log in or create your account, and confirm.
4. Done: Valeria appears in your store and your products are copied in a couple of minutes.

== Frequently Asked Questions ==

= Do I need an Upselia account? =

Yes. If you do not have one, you can create it during the connection.

= Is my customers’ personal data sent to Upselia? =

The plugin never sends your customers’ name, email, address or phone. Upselia only receives what visitors write to Valeria in the chat (for example, an email they choose to leave) and, for orders, the order number, status, amount and products.

= What happens if Upselia is down? =

Your store keeps working normally. The chat does not show and changes are sent when Upselia is back.

= How do I disconnect my store? =

In **Upselia**, press “Disconnect” at the top. You can also disconnect it from your Upselia account. If you delete the plugin, the store is disconnected too.

== Screenshots ==

1. Connect your store with one button.
2. Your Upselia dashboard inside WordPress: sales from the chat and from emails.
3. Discount: choose one of your own coupons and decide when Valeria may offer it.
4. Valeria in your store: she recommends the right product with its real price.
5. Chat on the store: bubble colour, pulse, and the pages where it appears.
6. Automated emails: abandoned cart, price drop, back in stock and after purchase.
7. Valeria on mobile.

== Credits ==

The panel includes the fonts Inter and Plus Jakarta Sans, both under the SIL Open Font License 1.1.

== Changelog ==

= 2.3.5 =
* The “store disconnected” notice only appears on the Dashboard and the Plugins screen, and can be dismissed.

= 2.3.4 =
* Large catalogs copy several times faster, and your Upselia dashboard shows the progress (“350 of 1,200 products”).
* If Upselia cannot accept your catalog, the plugin now tells you why instead of failing silently.

= 2.3.3 =
* The chat script is now loaded deferred, so it never delays your store pages.
* Prices in the chat are shown in your store currency.

= 2.3.2 =
* The Upselia dashboard inside WordPress is now fully translated into English, and coupon details are shown in your admin language.

= 2.3.1 =
* Products are now sent with their parent categories too (for example “Backpacks” as well as “Day hiking”), so Valeria finds them by any of them.

= 2.3.0 =
* The plugin tells Upselia which versions of WooCommerce, WordPress and PHP the store runs (technical data only), so new versions are supported sooner.

= 2.2.2 =
* New look for the chat: default colour, and the bubble’s pulse and the red “1” can be turned off from “Chat on the store”.
* Fix: the panel’s fonts and logo are now included in the plugin (they were requested from the store and not found).
* Fix: the coupon summary shows the store’s currency.
* The WordPress admin never waits for Upselia when loading the privacy text or when a coupon changes.

= 2.2.1 =
* Connect your email tool (Klaviyo, Mailchimp, Brevo, ActiveCampaign or a webhook) from the Upselia dashboard inside WordPress.

= 2.2.0 =
* Privacy: option to add the Upselia paragraph to your privacy policy automatically (or copy it from your Upselia dashboard).

= 2.1.0 =
* Security: Upselia now checks that the connected store really is yours before showing the chat on it (automatic, nothing to do).

= 2.0.0 =
* One-click connection with a per-store key that can be revoked (no more copying the store code).
* The whole Upselia panel inside WordPress.
* Catalogue copy in the background: variations, brands, attributes, sale prices and stock, updated when they change.
* Orders reported from the server with their status (paid, cancelled, refunded) to know the sales from the chat and from emails.
* Abandoned cart links that rebuild the cart.
* Discount based on your own WooCommerce coupons (Upselia never creates coupons).
* WooCommerce only (Easy Digital Downloads, Ecwid and WP eCommerce removed).
* Security: saving a product no longer replaces the whole catalogue and no longer waits for Upselia.

= 1.0.0 =
* First version.

== Upgrade Notice ==

= 2.3.2 =
Completes the English translation of the Upselia dashboard.

= 2.3.1 =
Valeria finds products by their parent categories too.

= 2.3.0 =
Sends the WooCommerce, WordPress and PHP versions to Upselia (technical data only).

= 2.2.2 =
Fixes the fonts and logo of the Upselia panel inside WordPress.

= 2.2.1 =
Lets you connect your email tool from the Upselia dashboard.

= 2.2.0 =
Adds the privacy policy paragraph for the chat.

= 2.1.0 =
Recommended: the chat only works on domains verified by your Upselia account, and this version verifies yours automatically.

= 2.0.0 =
After updating, go to Upselia and press “Connect with Upselia”: version 1 store codes no longer work.
