=== 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.3
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 the lead. Needs a ChannelRelay account: free 14-day trial, then $49/month.

== 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 run
on the ChannelRelay service, so **a ChannelRelay account is required** — the widget
stays off until you enter a tenant ID.

**Price:** free for 14 days with no card. After that it is $49 a month, or the
chat box switches off. During the trial it reads up to 25 pages of your site and
answers up to 100 visitor questions a day.

Getting a tenant ID takes a couple of minutes: click **Get a Tenant ID** on the
settings screen, confirm your email, and paste the ID you are shown. Sign-up reads
your public pages for you.

= 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.
* The **Get a Tenant ID** button is a link to the ChannelRelay sign-up page with
  your site's address in the URL. Nothing is sent unless you click it.

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. Click **Get a Tenant ID**, confirm your email, and paste the tenant ID you are shown.
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? =

Click **Get a Tenant ID** on the settings screen. Enter your website, business
name and the email leads should go to, then click the confirmation link we send.
The page shows your tenant ID and reads your public pages straight away.

= What does it cost? =

Free for 14 days, no card needed. After that it is $49 a month. If you do not
subscribe, the chat box is hidden from your site when the trial ends and nothing
is charged.

= 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.3 =
* Sign up for a tenant ID yourself from the settings screen (free 14-day trial).
* The settings screen shows when a trial ends, and why the chat box is hidden if it has.

= 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.
