=== CYBIX Messenger ===
Contributors: cybix
Tags: live chat, ai chatbot, customer support, messenger, whatsapp
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered live chat for your site, with the full CYBIX inbox inside wp-admin: BIX answers instantly from your own knowledge base, your team takes over when it matters.

== Description ==

CYBIX Messenger puts the CYBIX chat widget on every page of your WordPress site.
Visitors talk to BIX, an AI agent trained on your own website content; a human
teammate takes over whenever it matters. Optionally the plugin passes the
signed-in WordPress user's display name and email through, so conversations
arrive attached to a person rather than an anonymous visitor.

All branding — name, colours, greeting, position, launcher video — is managed
in your CYBIX dashboard and goes live on your site automatically, without
touching this plugin again.

With a site key the plugin also brings CYBIX into wp-admin: a CYBIX menu that
opens your whole inbox without a separate CYBIX login, a dashboard widget and
an admin-bar counter showing how many conversations are open and waiting for
a reply.

**This plugin relies on the CYBIX service.** A [CYBIX](https://cybix.app)
account is required (a free 14-day trial is available, no card needed).

= External services =

This plugin loads the CYBIX widget script from your CYBIX host (cybix.app by
default, or your own domain on a white-label plan) on every front-end page
while the messenger is enabled. When a visitor uses the chat, their messages —
and, if you enable "Pass the signed-in user", the signed-in user's display
name and email address — are sent to that CYBIX host to power the conversation.
With a site key configured, wp-admin asks the CYBIX host for conversation
counts (cached for a minute) and for a short-lived sign-in code whenever an
administrator opens the CYBIX inbox page.

* Service: CYBIX — https://cybix.app
* Terms & privacy: https://cybix.app/help/security-privacy

= Features =

* AI agent (BIX) answers from your own crawled knowledge base
* Human handoff: "talk to a human" routes the chat to your team inbox
* The full CYBIX inbox inside wp-admin, no second login
* Dashboard widget and admin-bar badge with open / awaiting-reply counts
* Recognised returning visitors and signed-in WordPress users
* WooCommerce: billing phone, order count, total spent and last order travel
  with the signed-in customer, so BIX answers order questions with context
* Support tickets straight from the chat
* Works with page caching — the loader is a static script tag
* White-label ready: point the plugin at your own domain

== Installation ==

1. Upload the zip under Plugins → Add New → Upload Plugin, and activate it.
2. Open CYBIX → Settings and check the widget id and site key. A zip
   downloaded from your CYBIX dashboard while signed in has both filled in;
   otherwise copy them from Messenger widget → Install.
3. Optional: leave "Pass the signed-in user" on so conversations arrive with a
   name and email.
4. Open CYBIX → Inbox, or use the CYBIX widget on the WordPress dashboard.

== Frequently Asked Questions ==

= Where do I find the widget id? =

In the CYBIX dashboard under Messenger widget → Install. The first widget is
called "default"; each extra one has its own id.

= Who can use the inbox, and what is the site key? =

Each team member connects their own CYBIX account from CYBIX › Settings; the
inbox then acts as that person with their CYBIX role. By default users with
`edit_posts` see the CYBIX menu (filter `cybix_inbox_capability`). The
site-wide key only feeds the dashboard and admin-bar counters for users who
have not connected yet, and is shown to administrators only.

= The inbox page shows the CYBIX sign-in form instead of my inbox =

Your browser blocks third-party cookies inside iframes (some Safari and
Firefox settings). Use "Open in a new tab" at the top of the inbox page — that
signs you in the same way, without the iframe.

= Does it work with page caching? =

Yes. The loader is a static script tag; only the optional signed-in-user
snippet is per-request, and it is printed inline.

= Can I change the colours or greeting here? =

No — on purpose. Branding lives in the CYBIX dashboard so a change there goes
live on every installed site at once, without re-installing anything.

= Is visitor data sent anywhere? =

Chat messages go to your CYBIX host to power the conversation. With "Pass the
signed-in user" enabled, the signed-in user's display name and email are sent
along. Nothing else is collected by this plugin. See the External services
section above.

== Screenshots ==

1. The messenger on a website: BIX answers instantly, in the visitor's language.
2. Plugin settings — only a widget id; all branding lives in the CYBIX dashboard.
3. The CYBIX dashboard where colours, greeting, launcher video and AI behaviour are managed.

== Upgrade Notice ==

= 1.3.0 =
The inbox in wp-admin now runs under each user's own CYBIX account. Open
CYBIX › Settings and click "Connect my CYBIX account" once; the site key
keeps feeding the dashboard counters.

= 1.2.0 =
Adds the CYBIX inbox to wp-admin. Paste a site key under CYBIX → Settings to
switch it on; the widget keeps working unchanged without one.

= 1.1.0 =
Branding fields moved to the CYBIX dashboard. After updating, manage colours
and greetings there — your existing widget id keeps working unchanged.

== Changelog ==

= 1.3.0 =
* Per-user accounts: every team member connects their own CYBIX account
  (one click, sign-in on cybix.app, back to wp-admin). The inbox acts as
  that person; the site key is only used for the counters.
* Browsers that block cookies in embedded pages get an "Allow CYBIX in this
  window" button instead of a dead sign-in form.
* CYBIX menu visible to editors (filter `cybix_inbox_capability`).

= 1.2.0 =
* New CYBIX admin menu with the full inbox embedded, signed in through a
  short-lived hand-off code — no separate CYBIX login.
* Dashboard widget and admin-bar badge with open / awaiting-reply counts.
* Site key setting; the settings page moved from Settings to the CYBIX menu
  (old links redirect).
* WooCommerce customers arrive with order history; the pass-through of the
  signed-in user now actually reaches the messenger (it was set but unread).

= 1.1.0 =
* Branding fields removed: all appearance settings now load live from the
  CYBIX dashboard, so this plugin only needs the widget id.
* Script is enqueued through the WordPress script API with defer.

= 1.0.0 =
* First release.
