=== ChannelRelay – Chat Widget That Emails You the Lead ===
Contributors: channelrelay
Tags: chat widget, chatbot, lead capture, live chat, lead generation
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Answers visitor questions from your own pages and emails you when they leave contact details. Requires a ChannelRelay account.

== Description ==

ChannelRelay is a WordPress chat widget for a service business whose website gets
the same questions every week (services, area, hours) while the owner is out on a
job. The chatbot answers from your own pages, and when a visitor leaves a name and
a phone number or email, it emails you the lead (and can send it to a webhook).

This plugin only loads the chat widget. The assistant and its knowledge base are
set up for you at channelrelay.io, so **a ChannelRelay account is required** — the
widget stays off until you enter the tenant ID you are sent.

This plugin is the install step. Getting an account, adding your site content,
and tuning the assistant happen at [channelrelay.io](https://channelrelay.io).
After onboarding you receive a **tenant ID** — enter it on the settings screen,
tick "Show the widget", and save.

= What it does on your site =

* Enqueues one deferred `<script>` in the footer that loads the widget from the
  ChannelRelay API.
* Adds a settings screen under **Settings ▸ ChannelRelay** for the tenant ID,
  display name, accent colour, greeting and suggested questions.
* On that screen, checks that your tenant ID resolves and shows how many pages
  are in your knowledge base.
* Nothing else — no database tables, no tracking, no dashboard.

= External service =

This plugin connects your site to **ChannelRelay**, a third‑party hosted service.

* The widget script is loaded from the ChannelRelay API
  (`https://api.channelrelay.io` by default, or a URL ChannelRelay gives you).
* When a visitor sends a message, their message, an anonymous session identifier
  and (if they provide them) their contact details are sent to that API so the
  assistant can reply and route the lead.
* The visitor's IP address is used by the API only in hashed form for rate
  limiting; the raw address is not stored.
* From the admin settings screen the plugin makes one request to the API
  (`/v1/widget-config`) to confirm your tenant ID; this sends only the tenant ID.

Service: https://channelrelay.io
Terms of Service: https://channelrelay.io/terms
Privacy Policy: https://channelrelay.io/privacy

== Installation ==

1. Upload the `channelrelay` folder to `/wp-content/plugins/`, or install it from
   the Plugins screen.
2. Activate the plugin.
3. Go to **Settings ▸ ChannelRelay**.
4. Enter the tenant ID from your ChannelRelay welcome email.
5. Tick **Show the widget** and click **Save Changes**.

== Frequently Asked Questions ==

= Do I need a ChannelRelay account? =

Yes. The plugin only installs the widget; the assistant's knowledge comes from
your ChannelRelay account. Without a tenant ID the widget does not load.

= How do I get a tenant ID? =

Send your website address at [channelrelay.io](https://channelrelay.io). We read
your public pages, set up the assistant, and email you a private link to try it
together with your tenant ID. There is nothing to pay to try it.

= Does it answer phone calls or book appointments? =

No. It is a chat box on your website. It does not answer the phone, send texts or
book jobs. It can pass along a scheduling link you already use.

= What does the lead email contain? =

The visitor's name, how to reach them, a ZIP code if they gave one, and a short
note of what they asked.

= Does it slow down my site? =

The widget script is small, loaded with `defer`, and served from a global edge
network. It does not block page rendering.

= Where do leads go? =

To the email address on your ChannelRelay tenant, and to a webhook if you
configure one in ChannelRelay.

= Can I control which pages it appears on? =

Not yet in this version — it loads on every front-end page. Page targeting is
planned.

== Changelog ==

= 0.1.2 =
* Listing text now says plainly what the plugin does and that an account is required.
* Connection notice reads "1 page" correctly.

= 0.1.1 =
* Clearer plugin name and short description. No functional changes.

= 0.1.0 =
* First release: settings screen, tenant connection check, and footer widget loader.
