=== RecomAI Sales Agent ===
Contributors: recomai,
Tags: chatbot, ai, woocommerce, customer-support, automation
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Integrate your WordPress and WooCommerce site with RecomAI's powerful AI chatbot platform to drive sales and automate support.

== Description ==

RecomAI is an advanced AI-powered e-commerce personalization platform designed to boost sales and enhance customer experiences on platforms like Shopify, WooCommerce, and Magento. It combines intelligent product recommendations, an AI chatbot for real-time support, and features like AI skin analysis to guide shoppers, automate interactions, and increase conversions.

Built by Destinova AI Labs, RecomAI helps e-commerce brands turn visitor interactions into revenue by providing personalized suggestions, handling queries 24/7, and optimizing average order value (AOV). Whether you are looking to automate your support or drive more sales through intelligent recommendations, RecomAI is the ultimate AI assistant for your store.

= AI Chatbot & Voice Agent =

* **24/7 GPT-Powered Chatbot (Reco):** High-performance AI assistant that handles support queries, order tracking, and sales assistance autonomously in over 100 languages with real-time streaming responses.
* **AI Voice Agent:** Real-time voice conversations powered by WebSocket audio streaming — visitors can talk to the AI assistant using their microphone and hear spoken responses, just like a phone call.
* **Hybrid Human Handoff:** Seamlessly transitions complex conversations from the AI to human support agents when needed, with live agent typing indicators.
* **Multilingual Support:** Communicate with your global audience seamlessly with support for interactions in over 100 languages.

= Sales & Conversions =

* **AI Product Recommendation Engine:** Delivers real-time, behavior-based product suggestions to shoppers, including personalized customer-specific recommendations.
* **AI Sales Assistant (Upsell & Cross-sell):** Automatically suggests premium upgrades and matching accessories to maximize cart value and AOV.
* **AI Auto Nudge Popups:** Contextual, non-intrusive popups triggered on product pages designed to drive conversions and reduce cart abandonment.
* **Proactive Campaigns:** Configure targeted campaigns that trigger automatically based on shopper behavior and browsing context.
* **Product Summarizer:** Uses AI to help shoppers quickly understand key product benefits and specifications.

= Lead Capture & Integrations =

* **Lead & Data Collection:** Captures visitor name, email, phone, and preferences through configurable pre-chat forms to build your marketing list.
* **Question Chaining:** Guide visitors through multi-step conversation flows to qualify leads and collect structured information.
* **Seamless WooCommerce Integration:** Automatically sync your product catalog for accurate, AI-powered recommendations.

= Personalization & Intelligence =

* **Cart-Aware Recommendations:** The chatbot reads the visitor's current cart contents to provide contextually relevant suggestions.
* **Order Tracking:** Built-in order tracking tab that lets customers check their order status directly within the chatbot widget.

= Customization & Branding =

* **Fully Customizable Widget:** Configure chat height, width, alignment, margins, colors, header background, fonts, and chat launcher icon & label to match your brand.
* **Starter Messages & Quick Menu:** Set up pre-defined questions and quick-access menu items to guide visitors.
* **Home Tab & Bottom Navigation:** Tabbed interface with Home, Chat, and Track tabs for organized visitor experiences.

== External Services ==

This plugin relies on the **RecomAI** platform, a SaaS service developed and operated by Destinova AI Labs, to deliver its AI chatbot functionality. A RecomAI account is required to use this plugin. No data is sent to RecomAI until the store administrator has signed in and enabled the chatbot.

= RecomAI REST API (https://api.recomai.one/api) =

The plugin's server-side PHP code and the chatbot widget communicate with the RecomAI REST API:

* **Authentication (admin only):** When a store administrator signs in, signs up, verifies an email OTP, or resets a password from the plugin settings page, the plugin sends the provided credentials (email, password, OTP, phone number, store URL, and store name) to the RecomAI authentication endpoints.
* **Chatbot configuration (admin only):** After login, the plugin retrieves the chatbot embed token and widget configuration from the API using the administrator's email and authentication token.
* **WooCommerce connection (admin only):** When the administrator connects WooCommerce, the plugin sends WooCommerce REST API consumer keys and the store URL to the RecomAI API so that products can be synced for AI-powered recommendations.
* **Chat messages (storefront):** When a visitor sends a message through the chatbot widget, the message text, chatbot auth key, chat session ID, current store URL, and (if available) the Shopify/WooCommerce customer ID and cart contents are sent to the API. Responses are streamed back via Server-Sent Events (SSE).
* **Visitor registration (storefront):** When a visitor submits the pre-chat form, their name, email, phone number, and message are sent to the API to create a chat session.
* **Auto-nudge recommendations (storefront):** When a visitor views a product page, the product name and store owner ID are sent to the API to fetch contextual cross-sell suggestions.
* **Customer recommendations (storefront):** For logged-in customers, the customer ID, store URL, and auth token are sent to fetch personalized product recommendations.
* **Cart click tracking (storefront):** When a visitor clicks a product recommendation, the click event data is sent to the API for analytics.

= RecomAI Socket.IO (https://api.recomai.one) =

The chatbot widget establishes a persistent Socket.IO (WebSocket) connection to `https://api.recomai.one` for real-time features:

* **Live support chat:** When the conversation is handed off to a human agent, messages from the agent are received in real time, and visitor messages and typing indicators are sent over this connection.
* **Session management:** The chat session ID is emitted on connection to associate the socket with the active conversation.
* **Support mode toggle:** The server can switch the conversation between AI and human-support modes in real time.
* **Message feedback:** When a message rating is submitted, the feedback is synchronized via this connection.

This connection is only established when the chatbot widget is loaded on the storefront and the chatbot is enabled.

= RecomAI Voice API (wss://api.recomai.one/api/voice) =

If the AI Voice Agent feature is enabled, the chatbot widget opens a WebSocket connection to `wss://api.recomai.one/api/voice` for real-time voice conversations:

* **Microphone audio:** When a visitor initiates a voice call, the browser captures microphone audio (with the visitor's permission), encodes it as base64 PCM16 at 24 kHz, and streams it to the server.
* **AI audio responses:** The server streams back AI-generated audio responses (base64 PCM16) which are played through the visitor's speakers.
* **Transcripts:** The server sends real-time transcripts of both the visitor's speech and the AI's spoken responses.
* **Data sent:** The chatbot ID and auth key are sent as query parameters when the connection is established. During the call, only encoded audio data is transmitted.

The voice connection is only opened when the visitor explicitly clicks the voice call button and grants microphone permission. No audio is captured or transmitted at any other time.

= RecomAI AWS S3 Storage (https://ai-bot-knowledge-bucket.s3.ap-south-1.amazonaws.com) =

The chatbot widget and administrative dashboard store and retrieve files from an Amazon S3 bucket managed by Destinova AI Labs:

* **Chatbot Assets:** The chatbot widget downloads custom branding assets, logos, chat icons, and user-uploaded media from this bucket.
* **Knowledge Base Documents:** When a store administrator uploads files (such as PDFs, DOCX, or text files) to train the AI's knowledge base via the RecomAI dashboard, these files are stored in and retrieved from this S3 bucket.
* **Visitor Media Uploads:** If features like file uploads in support chat or AI skin analysis (facial scan images) are utilized, visitor-submitted media is sent to this bucket for secure storage and AI analysis.

= RecomAI Dashboard (https://app.recomai.one) =

The plugin links to the RecomAI web dashboard for chatbot management and onboarding. The administrator's authentication token is passed as a URL parameter when redirecting to the dashboard. No visitor data is sent to this URL.

* **Service provider:** Destinova AI Labs
* **Service URL:** https://recomai.one
* **Terms of Use:** https://www.recomai.one/ai-terms
* **Privacy Policy:** https://www.recomai.one/privacy-policy

= Google Fonts API (https://fonts.googleapis.com) =

The chatbot widget may load custom font families from the Google Fonts CDN. This occurs only when a store administrator has configured a non-system font for the chatbot interface through the RecomAI dashboard. No visitor data is transmitted to Google Fonts; only the requested font family name is included in a standard stylesheet URL.

* **What is loaded:** A Google Fonts CSS stylesheet for the configured font (e.g., `https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap`).
* **When it is loaded:** Only when the chatbot widget is active on the storefront and the store admin has selected a non-system font. If the default system font is used, no request is made to Google Fonts.
* **Data sent:** None. This is a standard read-only CDN request for a CSS file; no personal or visitor data is transmitted.
* **Reason for use:** Loading web fonts from Google Fonts CDN is a permissible exception under WordPress Plugin Directory guidelines for font families from Google or their approved CDN.

* **Service provider:** Google LLC
* **Service URL:** https://fonts.googleapis.com
* **Privacy Policy:** https://policies.google.com/privacy


== Frequently Asked Questions ==

= What is ReComAI? =

RecomAI is an advanced AI-powered e-commerce personalization platform designed to boost sales and enhance customer experiences. It combines intelligent product recommendations, an AI chatbot for real-time support, and features like AI skin analysis to guide shoppers, automate interactions, and increase conversions.

= How does ReComAI work? =

RecomAI works by analyzing shopper intent through browsing behavior, chat interactions, and data like facial scans (for skincare). It uses GPT-powered AI to generate real-time personalized recommendations, automate responses via its chatbot, and apply smart logic-based suggestions to guide purchases.

= Is ReComAI legit? =

Yes, ReComAI is a legitimate platform trusted by over 100 active Shopify stores and has influenced more than $2 million in merchant revenue. It's developed by the DPIIT-registered startup Destinova AI Labs and is available on the official Shopify App Store with a 5-star rating. The platform complies with data privacy regulations like GDPR and CCPA.

= Does ReComAI slow down my site? =

No, RecomAI is designed for high-speed performance. It uses a lightweight integration script that ensures your site's loading speed and user experience remain top-notch.

= Do I need a RecomAI account? =

Yes, this plugin serves as a bridge to the RecomAI SaaS platform. You will need to sign up at RecomAI to activate the chatbot functionality.

= Is it free? =

The plugin itself is free to install. RecomAI offers various plans, including a Forever Free plan for smaller stores and a 14-day free trial for premium features.

= What happens if the AI can't answer a question? =

ReComAI supports a hybrid model where it can automatically offer to hand over the conversation to a human support agent if it encounters a complex query it cannot resolve.

== Screenshots ==

1. The RecomAI Chatbot admin dashboard.
2. The AI Chatbot widget on a WooCommerce store front.
3. WooCommerce product synchronization and connection status.
4. Advanced store analytics and AI insights within the dashboard.

== Changelog ==

= 1.0.1 =
* Initial public release.
* Added WooCommerce automated authorization flow.
* Fixed guidelines compliance issues.

