=== KaiCalls AI Intake ===
Contributors: kaicalls
Tags: leads, contact form, lead capture, crm, ai
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Capture leads from your WordPress forms straight into your KaiCalls account, where Kai follows up by text, email, and call — automatically, 24/7.

== Description ==

KaiCalls AI Intake connects your WordPress site to KaiCalls so every form
submission becomes a lead in your KaiCalls dashboard automatically — where Kai,
your AI receptionist, follows up by text, email, and phone call without you
lifting a finger.

A WordPress contact form is usually where interest goes to wait. Someone fills
it out at 11pm, the email sits in an inbox, and by the time anyone replies the
lead has already called a competitor. This plugin closes that gap: the moment a
visitor submits, the lead lands in KaiCalls and Kai starts the follow-up
conversation — day or night, weekends and holidays included.

**What the plugin does**

* **Drop-in lead form** via the `[kaicalls_ai_intake_form]` shortcode — add it to
  any page or post in seconds. Collects name, email, phone, and message.
* **Secure API-key connection** to your KaiCalls business. Your keys are stored in
  WordPress and never exposed to site visitors; the secret key is sent only in a
  server-to-server request.
* **"Recent AI Intake Leads" dashboard widget** on your WordPress admin home —
  see your most recent leads and how many you captured this week, without leaving
  WordPress.
* **Works alongside the forms you already have.** Keep Contact Form 7, WPForms,
  Gravity Forms, Elementor forms, or any custom form — point their submissions at
  the KaiCalls intake endpoint with your keys and the lead still reaches Kai.

**What happens after a lead comes in**

Once a submission reaches KaiCalls, it appears in your dashboard under Leads with
the source `wordpress_form`. From there Kai can:

* Send an instant text and email acknowledging the enquiry.
* Place an outbound call to qualify the lead while interest is hot.
* Score the lead and notify you of the hottest ones.
* Run any follow-up workflow or cadence you have configured.

**Who it's for**

* Small businesses that want every website enquiry answered immediately, even
  after hours.
* Service businesses (home services, legal, medical, trades) where a fast
  callback wins the job.
* Agencies running WordPress for clients who want to add call-and-text follow-up
  to any site by installing one plugin and pasting a pair of keys — no custom
  development.

You need a KaiCalls account. Generate your WordPress **Public Key** and **Secret
Key** from your KaiCalls dashboard under **WordPress** (the WordPress Integration
page) → **Generate New API Keys**. New to KaiCalls? Start at
https://www.kaicalls.com.

== External services ==

This plugin connects to the KaiCalls service (https://www.kaicalls.com) to verify
your account and to deliver leads captured on your site. It is required for the
plugin to function — without a KaiCalls account and keys, no data is sent.

The plugin contacts the following KaiCalls API endpoints:

* `POST https://www.kaicalls.com/api/v1/wordpress/auth/verify` — when you save
  your keys on the settings page, to confirm the connection. Sends your Public
  Key and Secret Key only.
* `POST https://www.kaicalls.com/api/v1/wordpress/intake` — when a visitor
  submits the lead form (or your existing form posts to KaiCalls). Sends the
  data the visitor entered: name, email address, phone number (if provided), and
  message, authenticated with your keys.
* `GET https://www.kaicalls.com/api/v1/wordpress/dashboard-widget` — when the
  "Recent AI Intake Leads" dashboard widget loads, to retrieve a summary of your
  recent leads. Sends only your keys.

No data is sent to any third party other than KaiCalls, and nothing is sent
until you have connected the plugin with your own KaiCalls keys.

KaiCalls Terms of Service: https://www.kaicalls.com/terms-of-service
KaiCalls Privacy Policy: https://www.kaicalls.com/privacy-policy

== Installation ==

**1. Get your KaiCalls API keys**

1. Sign in to your KaiCalls dashboard at https://www.kaicalls.com.
2. Open **WordPress** in the left-hand navigation (the WordPress Integration page).
3. (Optional) Enter your site URL so you can identify the connection later.
4. Click **Generate New API Keys**.
5. Copy the **Public Key** (starts with `wp_pk_`) and the **Secret Key** (starts
   with `wp_sk_`). The secret key is shown only once — copy it before you leave
   the page.

**2. Install the plugin**

* From WordPress: go to **Plugins → Add New**, search for "KaiCalls AI Intake",
  click **Install Now**, then **Activate**. Or upload the zip from
  https://www.kaicalls.com/downloads/kaicalls-ai-intake.zip via **Plugins → Add
  New → Upload Plugin**.

**3. Connect your keys**

1. Go to **Settings → AI Intake** in your WordPress admin.
2. Paste your **Public Key** and **Secret API Key**.
3. Click **Save & Test Connection** — you should see **Connection successful!**.

**4. Add the lead form**

* Add the shortcode `[kaicalls_ai_intake_form]` to any page or post and publish.
  Submit a test enquiry, then confirm the lead appears in your KaiCalls dashboard
  (or in the "Recent AI Intake Leads" widget on your WordPress dashboard).

== Frequently Asked Questions ==

= Where do I get my API keys? =
In your KaiCalls dashboard: open **WordPress** in the left navigation (the
WordPress Integration page) and click **Generate New API Keys**. You receive a
Public Key (`wp_pk_…`) and a Secret Key (`wp_sk_…`). Paste both into **Settings →
AI Intake** in WordPress.

= What's the difference between the Public Key and the Secret Key? =
The Public Key (`wp_pk_…`) identifies which KaiCalls business a request belongs
to. The Secret Key (`wp_sk_…`) authenticates it — treat it like a password. The
plugin only ever sends the secret in a server-to-server request from your
WordPress host to KaiCalls; it is never printed in the page a visitor sees.

= I lost my Secret Key. What do I do? =
The secret is shown only once when you generate it. If you no longer have it,
generate a new pair of keys on the KaiCalls WordPress Integration page and paste
the new keys into Settings → AI Intake. The old keys can be revoked from the
dashboard.

= Do I need a KaiCalls account? =
Yes. The plugin sends leads to your KaiCalls business and requires a Public Key
and Secret Key generated from your KaiCalls dashboard. Without keys, no data is
sent. You can create an account at https://www.kaicalls.com.

= How much does it cost? =
The plugin is free, and the WordPress integration is included on every KaiCalls
plan at no extra charge. KaiCalls plans are flat monthly with no per-minute
overage. See https://www.kaicalls.com/pricing for current plans.

= How do I add the lead form to a page? =
Add the shortcode `[kaicalls_ai_intake_form]` to any page or post. It renders a
form with Name, Email, Phone, and Message fields. Name, Email, and Message are
required; Phone is optional.

= Does it work with my existing contact form (Contact Form 7, WPForms, Gravity Forms, Elementor)? =
Yes. Instead of the shortcode, send your form's submissions to the KaiCalls
intake endpoint with your keys as a Bearer token:

`POST https://www.kaicalls.com/api/v1/wordpress/intake`
`Authorization: Bearer wp_pk_xxx:wp_sk_xxx`
Body (JSON): `{ "name": "...", "email": "...", "phone": "...", "message": "..." }`

The public and secret keys are joined with a colon (`publicKey:secretKey`) after
`Bearer `. KaiCalls returns `{ "success": true, "leadId": "..." }` on success.
Most form plugins can do this with a webhook/HTTP-request add-on, or you can wire
it in a few lines of PHP.

= What data leaves my site? =
Only the lead data a visitor enters — name, email, phone, and message — plus your
API keys, sent to KaiCalls over HTTPS. Nothing is sent until you have connected
the plugin with your own keys. See the "External services" section above for the
exact endpoints.

= Where do my leads show up? =
In your KaiCalls dashboard under **Leads**, with the source `wordpress_form`. A
summary of the five most recent leads (and a count for the past week) also
appears in the "Recent AI Intake Leads" widget on your WordPress admin dashboard.

= What does Kai do with a lead once it arrives? =
Kai can text and email the lead immediately, place an outbound qualifying call,
score the lead, notify you of the hottest ones, and run any follow-up workflow or
cadence you've set up in KaiCalls — automatically, around the clock.

= The dashboard widget says "Plugin not configured." Why? =
You haven't saved valid keys yet. Go to **Settings → AI Intake**, paste your
Public Key and Secret Key, and click **Save & Test Connection** until you see
**Connection successful!**.

= "Save & Test Connection" says the connection failed. How do I fix it? =
Re-copy both keys from the KaiCalls WordPress Integration page (a stray space or a
truncated key is the usual cause), confirm the Public Key starts with `wp_pk_`
and the Secret Key with `wp_sk_`, and make sure your server can reach
https://www.kaicalls.com over HTTPS (some hosts block outbound requests by
default). If it still fails, generate a fresh pair of keys and try again.

= A visitor submitted the form but no lead appeared. What should I check? =
Confirm the page actually contains `[kaicalls_ai_intake_form]`, that Settings →
AI Intake shows **Connection successful!**, and that the visitor filled in the
required Name, Email, and Message fields. The "Recent AI Intake Leads" widget is
cached for up to an hour, so a brand-new lead may take a few minutes to appear in
the widget even though it is already in your KaiCalls dashboard.

= Is the connection secure? =
Yes. All requests are made over HTTPS. The secret key is sent only in
server-to-server requests from your WordPress host to KaiCalls and is never
exposed in page source or to site visitors. Form submissions are protected by
WordPress nonces, and the dashboard widget data is only available to logged-in
administrators.

= Can I use one set of keys on multiple sites? =
You can, but generating a separate key pair per site (entering each site's URL
when you create the keys) makes it easier to identify and revoke a single site's
access later without affecting your other sites.

= What happens when I uninstall the plugin? =
Deleting the plugin removes its stored settings (your saved keys) and the cached
widget data from WordPress. It does not delete any leads already captured in your
KaiCalls account, and it does not revoke your keys — revoke those from the
KaiCalls dashboard if needed.

= Where is the WordPress plugin source code? =
The public source repository is https://github.com/KaiCalls/kaicalls-wordpress.
It includes the plugin files, this readme, and the WordPress.org submission notes.

= Where can I get help? =
Setup guide: https://www.kaicalls.com/help/wordpress · Troubleshooting:
https://www.kaicalls.com/help/wordpress/troubleshooting · Developer / REST docs:
https://www.kaicalls.com/docs/api/wordpress · Email: support@kaicalls.com.

= What should an AI agent verify before saying setup is complete? =
Verify the plugin is active; Settings → AI Intake shows "Connection successful!";
a page contains `[kaicalls_ai_intake_form]`; a test submission succeeds; and the
lead appears in KaiCalls (Leads, source `wordpress_form`) or in the "Recent AI
Intake Leads" dashboard widget.

== Screenshots ==

1. The AI Intake settings page where you connect your KaiCalls keys.
2. The lead capture form rendered by the `[kaicalls_ai_intake_form]` shortcode.
3. The "Recent AI Intake Leads" dashboard widget.

== Changelog ==

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 1.0.0 =
Initial public release.
</content>
</invoke>
