=== Uvunio – Chatbot, Inbox & Bulk Messaging ===
Contributors: uvunio
Tags: whatsapp, chatbot, inbox, bulk messages, customer support
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Answer WhatsApp messages from WordPress, send bulk messages to your contacts and automate replies with a chatbot. Uses the official Cloud API.

== Description ==

Uvunio turns your WordPress dashboard into a WhatsApp customer service desk. It connects to the **official WhatsApp Business Platform (Cloud API by Meta)**, so your number is safe: no QR codes, no unofficial libraries, no risk of being banned.

= Inbox =

* Read and answer every conversation from **Uvunio > Inbox**, like in WhatsApp Web.
* Text, images, documents, audio and locations. Send files from your Media Library.
* Delivery and read ticks for every message.
* The 24-hour rule is handled for you: when the window is closed you can only send an approved template, and Uvunio shows you the template form with its variables.
* Several team members can work at the same time (administrators and shop managers by default).
* When a person answers, the chatbot pauses itself in that conversation.

= Bulk messages =

* Pick the recipients by **tags**, search or one by one, and add loose phone numbers.
* Send approved templates (with variables, header images and URL buttons) or free text to customers who wrote in the last 24 hours.
* Sending is spread over time with a configurable speed to protect your number's quality rating.
* Follow the progress live: sent, delivered, read and failed, with the reason of each failure. Retry the failed ones with one click.
* Contacts who answer **STOP** are unsubscribed automatically and never receive bulk messages again.

= Chatbot =

* Keyword answers (contains / exact / starts with / catch-all) with priorities.
* Menus with **buttons** (up to 3), **lists** (up to 10) or numbered options that lead to other answers.
* Images and documents in answers, and placeholders like {name}.
* Welcome answer for new contacts and a fallback when nothing matches.
* Business hours with a "we are closed" message.
* "Talk to a person" action: pauses the bot, marks the conversation and emails your team.
* Actions to tag contacts and save their consent.

= Contacts =

* Contacts are created automatically when someone writes to you.
* Tags, notes and consent status (opt-in) for every contact.
* CSV import (with automatic column detection) and export.
* Integrated with the WordPress personal data export and erase tools.

= Chat button =

* Floating click-to-chat button for your website (position, colour, text, mobile/desktop).
* `[uvunio_button]` shortcode to place a chat button inside any page.

= Uvunio Pro =

Uvunio is complete and free. If you need more, Uvunio Pro (paid licence, sold at uvunio.com) adds an AI assistant that answers with your business information, scheduled and personalised bulk messages, WooCommerce customer segments and order notifications, campaign statistics and Twilio as an alternative provider.

== External services ==

This plugin connects to third-party services. Nothing is sent until you configure the connection.

**WhatsApp Business Platform – Cloud API (Meta Platforms, Inc.)**
Used to send messages, mark messages as read, download the files your customers send, load your message templates and check your connection. Requests go to `https://graph.facebook.com/` and include the recipient phone number, the message content and your access token. Meta sends incoming messages and delivery statuses to the webhook of your site (`/wp-json/uvunio/v1/webhook`), signed with your app secret.
Terms: https://www.whatsapp.com/legal/business-terms/ – Privacy policy: https://www.whatsapp.com/legal/privacy-policy

**wa.me click-to-chat links (WhatsApp)**
The optional chat button links to `https://wa.me/` with your phone number and the prefilled message. No data is sent until a visitor clicks the button.
Terms: https://www.whatsapp.com/legal/terms-of-service – Privacy policy: https://www.whatsapp.com/legal/privacy-policy

== Installation ==

1. Install and activate the plugin.
2. Go to **Uvunio > Settings > WhatsApp connection** and follow the steps shown there:
   * Register as a Meta developer (developers.facebook.com/async/registration) if you never did.
   * In the App Dashboard create an app with the use case "Connect with customers through WhatsApp".
   * Copy the Phone number ID, the WhatsApp Business Account ID, a permanent access token (system user) and the app secret.
   * Paste the Callback URL and the Verify token from Uvunio in **Connect on WhatsApp > Configuration** and subscribe to the `messages` field.
3. Press **Test connection** and **Sync templates**.
4. Review the example answers in **Uvunio > Chatbot**.

Your site must be reachable through HTTPS for Meta to deliver incoming messages.

== Frequently Asked Questions ==

= Do I need a WhatsApp Business API account? =

You need a Meta developer app with the WhatsApp product and a phone number registered in the WhatsApp Business Platform. Creating it is free; Meta charges per template message according to its pricing.

= Can I use my current WhatsApp or WhatsApp Business app number? =

A number registered in the Cloud API cannot be used at the same time in the WhatsApp mobile apps, except with Meta's "coexistence" onboarding for WhatsApp Business app numbers. Many businesses use a new number for the API.

= Why can't I write freely to a customer? =

WhatsApp only allows free messages within 24 hours of the customer's last message. Outside that window you must use a template approved by Meta. Uvunio shows the template form automatically.

= Does it send messages to WhatsApp groups? =

No. Bulk messages are sent individually to each contact, which is what the official API allows and what your customers expect.

= Is it safe for my number? =

Uvunio only uses the official API. To keep a good quality rating, send bulk messages only to people who agreed to receive them, keep the sending speed moderate and honour unsubscribe requests (Uvunio does this automatically).

= Where are messages stored? =

In your own WordPress database (tables starting with `uvunio_`). Files sent by customers stay on Meta's servers and are shown through your site while Meta keeps them (about 30 days).

== Screenshots ==

1. Inbox with conversations, ticks and the bot status.
2. Bulk message builder with tag filters and templates.
3. Chatbot answers with buttons and menus.
4. Connection settings with step by step help.

== Changelog ==

= 1.0.0 =
* First release.
