=== LiveBot – AI Chatbot ===
Contributors: itexservices
Tags: chatbot, ai, live chat, customer support, woocommerce
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI chatbot that answers your visitors from your website's content and hands the conversation over to a person when needed.

== Description ==

LiveBot is an AI chat for websites and online stores. It learns from the content of your website, answers visitors' questions around the clock and, when it does not know the answer or the visitor wants a person, hands the conversation over to your operator.

This plugin puts the LiveBot chat window on your WordPress site without editing any code. You paste your website key, switch the chat on, and you are done.

**What you get**

* Answers drawn from your own website, documents and FAQ, not from the general internet.
* Handover to a live operator in the web console, the Windows app or the Android app.
* If no operator is available, the visitor can leave a message with their e-mail.
* Chat window in the language of the page (Czech and English).
* WooCommerce store features, each with its own switch: order status (shown only after the customer gives the order number and the matching e-mail), shipment tracking and product search.
* Option to hide the chat window in the cart and at checkout.

**You need a LiveBot account.** LiveBot is a paid service with a 14-day free trial, no credit card required. Plans and prices: https://www.livebot.cz/en/pricing

== External services ==

This plugin connects your website to the LiveBot service, operated by ITex Services s.r.o. (Czech Republic). The plugin does nothing until you enter your website key and enable the chat window in Settings → LiveBot.

When the chat window is enabled:

* Every public page of your website loads the script `https://www.livebot.cz/widget.js`. The script shows the chat button and, once a visitor opens the chat, loads the chat window from `https://www.livebot.cz`. Your website key and the address of the page are sent with these requests.
* When a visitor writes in the chat, the text of the conversation, the page address, the language and technical data (IP address, browser and device information) are sent to LiveBot so that the bot can answer. If the visitor leaves a message for an operator, their name and e-mail are sent as well.
* The chat stores in the visitor's browser the identifier of the ongoing conversation and the sound preference. It does not use advertising cookies.

**WooCommerce store features.** If you enable order status, shipment tracking or product search and connect the store in your LiveBot account, LiveBot servers call this site's REST API (`/wp-json/livebot/v1/`) when a visitor asks the bot about an order or a product. The request must carry the connection code shown in Settings → LiveBot. For an order, the site returns data only when the order number and e-mail match: order number, status, date, total, currency, shipping method and, if enabled, carrier, tracking number and tracking link. No address or phone number is shared. Product search returns name, price, availability, category and link. A switched-off feature returns no data.

The plugin itself does not send any data from the WordPress administration to LiveBot.

* Service: https://www.livebot.cz/en
* Terms of service: https://www.livebot.cz/en/terms
* Privacy policy: https://www.livebot.cz/en/privacy
* Data processing terms: https://www.livebot.cz/en/data-processing

== Installation ==

1. Install and activate the plugin.
2. Create a LiveBot account at https://www.livebot.cz/en/signup (or log in to your existing one) and add your website.
3. In your LiveBot account open Widget / installation and copy the website key (it starts with `wb_live_`).
4. In WordPress go to Settings → LiveBot, paste the key, tick "Show the chat window on the website" and save.

The bot's knowledge, appearance, operators and conversations are managed in your LiveBot account.

== Frequently Asked Questions ==

= Is the plugin free? =

The plugin is free. The LiveBot service is paid, with a 14-day free trial.

= Where does the bot get its answers? =

From the content of your website and from documents you add in your LiveBot account. It does not make up prices or conditions that are not in your content.

= Does it work with WooCommerce? =

Yes. The chat works on any WooCommerce store. In Settings → LiveBot you can switch on order status, shipment tracking and product search, then paste the store address and connection code into your LiveBot account (System integrations → WordPress – LiveBot plugin). The bot shows an order only after the customer gives both the order number and the e-mail used for the order; the check runs in your store. No WooCommerce REST API key is needed.

= The chat window does not appear. =

Check that the key is filled in and the chat window is enabled in Settings → LiveBot, and that your domain is added to the website in your LiveBot account. If you use a caching or optimization plugin, clear its cache.

= Can a developer extend the plugin (for example for a carrier plugin)? =

Yes, with WordPress filters. The plugin works with standard WooCommerce data; anything non-standard is added through these filters:

* `livebot_order_tracking` – add shipments from a carrier plugin: return items with `carrier`, `number` and `url`.
* `livebot_find_order` – find an order by a custom order number. The e-mail check always runs afterwards.
* `livebot_order_data` – change or add order fields sent to the bot.
* `livebot_product_search_args` – change the product query (arguments of `wc_get_products()`).
* `livebot_product_data` – change product fields sent to the bot, or return `false` to skip a product.
* `livebot_show_widget` – return `false` to hide the chat window on a page.

Code examples for each filter: https://www.livebot.cz/en/wordpress-plugin

= Does it slow down my website? =

The script loads asynchronously and the chat window itself is loaded only when a visitor opens the chat.

== Screenshots ==

1. Chat window on a website.
2. Plugin settings.

== Changelog ==

= 1.1.0 =
* WooCommerce store features with separate switches: order status, shipment tracking, product search.
* Connection code for LiveBot instead of a WooCommerce REST API key; only data of enabled features is shared.
* Developer filters: livebot_order_tracking, livebot_find_order, livebot_order_data, livebot_product_search_args, livebot_product_data, livebot_show_widget.
* Czech translation of the settings.

= 1.0.0 =
* First release: chat window on the website, language setting, option to hide the chat in the cart and at checkout.
