=== Cliedesk Connector ===
Contributors: cliedesk
Tags: helpdesk, support, woocommerce, customer service, connector
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect this WordPress or WooCommerce site to a Cliedesk helpdesk that runs on another site.

== Description ==

Use this plugin when your helpdesk (Cliedesk with Cliedesk Pro) runs on one site and your shop or product site is another one. After you connect the two:

* Helpdesk agents see this shop's orders and customers next to each conversation.
* The helpdesk's AI agent can refund an order or resend an order email for the customer of the conversation. The helpdesk's limits and approvals apply, and a refund is never more than what is left to refund.
* Purchases, renewals, refunds and cancellations are sent to the helpdesk as product access events. Events wait and are sent again when the helpdesk cannot be reached.
* Public pages and posts you choose can be searched by agents.
* The helpdesk's chat widget can show on this site.

All calls between the two sites are signed with keys that only the two sites know. Each call is valid for 5 minutes and only once. Disconnecting the site in the helpdesk stops all access at once.

== Installation ==

1. Install and activate the plugin.
2. In the helpdesk, open Settings > Connected sites and press Connect a site. Enter this site's address, choose its products and copy the pairing code.
3. On this site, open Settings > Cliedesk Connector. Enter the helpdesk address and the pairing code, and press Connect. The code works once, for 15 minutes.

== Frequently Asked Questions ==

= Does it need WooCommerce? =

No. Without WooCommerce, the helpdesk can still search your pages and show the chat widget. Orders, refunds and access events need WooCommerce.

= Where are the keys kept? =

On this site, encrypted in the database with a key made from your site's WordPress salts. If you change the salts, connect the site again.

= Does it slow down my site? =

No. Your visitors' pages load nothing from this plugin unless you turn on the chat widget in the helpdesk. Events are sent in the background.

= What is removed when I delete the plugin? =

The connection, the keys, the settings, the plugin's two database tables and its scheduled jobs.

== External services ==

This plugin connects to one service only: the Cliedesk helpdesk at the address you enter on the settings page. That helpdesk is a WordPress site that you or your company control. The plugin does not contact any other server, and it sends nothing until you connect it.

After you connect, it sends this data to that address:

* The site's address, once, when you connect it.
* The plugin's version and whether WooCommerce is active, every 15 minutes.
* Order and customer details (name, email, products, amounts and order status), when an agent looks them up.
* Product access events (email, name, product, plan and dates), when an order or subscription changes.
* The title, address and plain text of the public content you choose on the settings page.

If the helpdesk turns on the chat widget for this site, visitors' browsers load the widget script from the helpdesk address.

== Privacy ==

Customer data goes only to the helpdesk you connect. Add this to your privacy policy: WordPress suggests text for it under Settings > Privacy. Events that could not be sent are deleted after 14 days at most, and all waiting events are deleted when the site is disconnected.

== Changelog ==

= 1.0.0 =
* First version.
