=== Yaraa AI Sales Agent ===
Contributors:      yaraai
Plugin Name:       Yaraa AI Sales Agent
Plugin URI:        https://yaraai.com
Tags:              AI sales agent wordpress, AI chatbot for lead generation wordpress, AI chat plugin for woocommerce, Lead Generation, 24/7 customer support
Author:            Yaraa
Author URI:        https://yaraamanager.com
Requires at least: 5.8
Requires PHP:      7.4
Tested up to:      6.9
Stable tag:        1.0.7
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

AI-powered sales agent chat widget that engages visitors, captures leads, and provides intelligent conversations 24/7.

== Description ==

**What is a Yaraa AI Sales Agent?**

Your 24/7 AI Sales Agent for Lead Generation & Conversions.

✅ Yaraa AI is a powerful **AI sales agent for WordPress** that helps you generate leads, engage visitors, and increase conversions automatically.

✅ It works as a smart **contact form alternative**, replacing traditional forms with real-time AI conversations that capture and qualify leads instantly.

✅ Instead of losing visitors to static forms, Yaraa engages them the moment they land on your website — answering questions, understanding their needs, and guiding them toward booking meetings or taking action.

✅ This **AI lead generation tool** runs 24/7, helping you convert more visitors into customers without manual follow-ups.

✅ Perfect for businesses looking to improve **website conversion rates**, automate sales, and turn traffic into real results.

**Why Choose Yaraa AI Sales Agent?**

Yaraa AI helps you turn website visitors into qualified leads automatically — without relying on forms or manual follow-ups.

* **Real-time conversations** – Engage visitors instantly when they land on your website
* **Better lead generation** – Capture and qualify leads through natural conversations
* **Contact form alternative** – Replace static forms with a smarter, interactive experience
* **24/7 availability** – Never miss a lead, even outside business hours
* **Higher conversions** – Guide visitors to take action with personalized responses
* **Easy WordPress integration** – Add an AI sales agent to your site in minutes

With Yaraa AI, your website doesn’t just collect information — it actively sells for you.

**Key Features:**

* **AI-Powered Conversations** — Intelligent chatbot that understands context and responds naturally to visitor questions
* **Automatic Lead Capture** — Seamlessly collects visitor information during conversations without interrupting the flow
* **Real-Time Engagement** — Instant responses to website visitors around the clock
* **Easy Setup Wizard** — Get started in minutes with our guided 4-step setup process
* **Domain Verification** — Secure connection between your WordPress site and Yaraa AI services
* **Customizable Widget** — Match your brand with customizable appearance settings
* **Customizable Lead Form** — Configure lead capture form messages and fields
* **GoHighLevel Integration** — Connect with GHL for advanced CRM and marketing automation
* **Multi-Platform Support** — Deploy across WordPress, Wix, Webflow, and more
* **Secure Authentication** — Enterprise-grade security with Keycloak authentication
* **Comprehensive Dashboard** — Monitor conversations, leads, and analytics from WordPress admin
* **Conversation Management** — View, search, and manage all visitor conversations
* **Lead Management** — View, edit, delete, and export leads to CSV
* **Reports & Analytics** — Visitor analytics by country, city, landing page, and time
* **AI Agent Training** — Train the AI agent on your website pages for accurate responses
* **Text & Voice Support** — Support for both text and voice-based conversations

**How It Works:**

1. **Install & Activate** — Install the plugin from WordPress.org and activate it
2. **Accept Terms & Consent** — Review and accept the third-party service terms, privacy policy, and data transmission consent
3. **Create Account or Login** — Sign up for a free Yaraa AI account or login to existing account
4. **Complete Setup Wizard** — Follow the simple 4-step wizard to configure your AI agent
5. **Go Live** — Your AI sales agent starts engaging visitors immediately

**Perfect For:**

* Small businesses wanting to capture more leads
* E-commerce stores looking to improve customer engagement
* Service providers seeking automated appointment inquiries
* Coaches and consultants wanting 24/7 availability
* Agencies managing multiple client websites

== Installation ==

**Automatic Installation (Recommended):**

1. Log in to your WordPress admin panel
2. Navigate to Plugins → Add New
3. Search for "Yaraa AI Sales Agent"
4. Click "Install Now" and then "Activate"
5. Go to Yaraa AI menu in your admin sidebar
6. Review and accept the Terms & Consent page
7. Follow the setup wizard to connect your account

**Manual Installation:**

1. Download the plugin zip file from WordPress.org
2. Log in to your WordPress admin panel
3. Navigate to Plugins → Add New → Upload Plugin
4. Choose the downloaded zip file and click "Install Now"
5. Click "Activate Plugin"
6. Go to Yaraa AI menu and accept the Terms & Consent
7. Complete the setup wizard

**After Installation:**

1. Click on "Yaraa AI" in your WordPress admin menu
2. You will be redirected to the Terms & Consent page — review and accept all terms
3. Create a new account or login with existing credentials
4. Complete the 4-step setup wizard (Train Agent → Lead Form → Deploy)
5. Your AI sales agent is now live on your website!

== Frequently Asked Questions ==

= Do I need a Yaraa AI account to use this plugin? =

Yes, you need a Yaraa AI account to use the plugin. You can create an account directly from the WordPress admin during the setup process. Account creation is free.

= Is this plugin free to use? =

Yes, this plugin is completely free and fully functional with no locked features, no trial periods, and no usage limits.

= Does this plugin connect to an external service? =

Yes. This plugin requires connection to the Yaraa AI external service (aiservice.yaraamanager.com) to provide AI chatbot functionality. AI processing, conversation management, and analytics are performed on external servers and cannot be done locally. Upon activation, you will be asked to review and accept the terms before any data is transmitted. See the "Third-Party Services" section below for full details.

= What data is sent to the external service? =

During admin setup: your email, name, and site URL. During AI training: URLs of pages you select. During visitor interactions: chat messages, visitor-provided info (name, email, phone), IP address, browser, OS, and approximate location. During reporting: domain ID and date filters. All data is transmitted over HTTPS. No data is sent until you accept the consent page and configure the plugin.

= Will this slow down my website? =

No. The chat widget loads asynchronously and is optimized for performance, ensuring minimal impact on your page load speed.

= Can I customize the chat widget appearance? =

Yes, you can customize various aspects of the widget including position and behavior through the plugin settings.

= Does it work with page builders? =

Yes! Yaraa AI Sales Agent works seamlessly with all major page builders including Elementor, Beaver Builder, Divi, WPBakery, and Gutenberg.

= Can I use this on multiple websites? =

Yes, you can deploy Yaraa AI agents across multiple websites. Each domain needs to be verified and configured in your Yaraa AI dashboard.

= What is GoHighLevel integration? =

GoHighLevel (GHL) integration allows you to connect your Yaraa AI agent with GoHighLevel CRM for advanced lead management, automation workflows, and marketing campaigns.

= How do I disconnect my account? =

Go to Yaraa AI in your WordPress admin and click the "Disconnect" button. This will remove the connection but preserve your setup progress.

= Can I revoke my consent? =

Yes. You can revoke your consent at any time by visiting the consent page (admin.php?page=yaraa-consent). Revoking consent will disable all plugin functionality and stop data transmission to the external service.

= Do I need to update my privacy policy? =

Yes. Since this plugin collects visitor data through the chatbot, you should update your website's privacy policy to disclose the use of Yaraa AI and the data it collects from visitors.

= Where can I get support? =

For support, please visit our website at yaraai.com or contact our support team through the plugin's Help & Support section.

= Is my data secure? =

Yes, all data is transmitted securely using HTTPS encryption. Authentication is handled through enterprise-grade Keycloak security. Your data is stored securely on Yaraa AI servers.

== Screenshots ==

1. Terms & Consent - Review and accept terms before using the plugin
2. Setup Wizard - Easy 4-step configuration process
3. Dashboard - Overview of your AI agent status and quick actions
4. Chat Widget - AI sales agent engaging with website visitors
5. Domain Settings - Configure and verify your domain connection
6. Conversations - View and manage all visitor conversations
7. Leads Management - View, edit, and export captured leads
8. Reports - Analytics and visitor insights
9. GoHighLevel Integration - Connect with GHL for advanced features
10. Help & Support - Access documentation and support resources

== Changelog ==

= 1.0.7 =
* Fix avatar Image upload issues

= 1.0.6 =
* Fix CSS conflict issues

= 1.0.5 =
* Fix CSS conflict issues, add cross icon on chatbot welcome label, fix console errors

= 1.0.4 =
* Fix tag sync issue

= 1.0.3 =
* Description Updated

= 1.0.2 =
* Fixed changelog date issue
* Version synchronization update

= 1.0.1 =
* Internal version update

= 1.0.0 =
* Initial release
* AI-powered chat widget integration
* User authentication with Keycloak
* Terms & consent page for third-party service acceptance
* 4-step setup wizard
* Domain verification system
* AI agent training on website pages
* Customizable lead capture form
* Conversation management with message history
* Lead management with edit, delete, and CSV export
* Dashboard with analytics charts
* Reports with visitor analytics by country, city, time, and landing page
* GoHighLevel integration support
* Help and support documentation
* Multi-platform deployment support (WordPress, Wix, Webflow, HTML)

== Upgrade Notice ==

= 1.0.0 =
Initial release of Yaraa AI Sales Agent. Install now to start engaging visitors with AI-powered conversations!

== Third-Party Services ==

This plugin **requires** connection to external services to function. AI processing, conversation management, and analytics are performed on external servers and cannot be done locally by the plugin.

Upon activation, the plugin displays a mandatory Terms & Consent page. **No data is transmitted to any external service until the administrator explicitly reviews and accepts the terms, privacy policy, and data transmission consent.**

= Yaraa AI Service =

* **What it is:** This plugin sends and receives data from the Yaraa AI service, an external API that provides AI-powered conversations, lead capture, and analytics on your website. AI processing, conversation management, and analytics are performed on external servers and cannot be done locally.
* **Service API URL:** https://aiservice.yaraamanager.com
* **Service Provider:** Yaraa AI (https://yaraai.com)
* **What data is sent and when:**
  * **During admin setup:** Administrator email address, name, and site URL (sent when creating an account or logging in)
  * **During AI training:** URLs of website pages selected by the administrator (sent when the admin initiates AI training)
  * **During visitor chat interactions:** Visitor chat messages, name, email, phone (only if voluntarily provided by the visitor), IP address, browser type, operating system, and approximate geographic location (sent in real-time during each chat message exchange)
  * **During reporting and analytics:** Domain ID and date range filters (sent when the admin views reports or dashboard)
  * **During settings updates:** Chatbot configuration, lead form settings, widget appearance settings, and domain configuration (sent when the admin saves settings)
  * **During widget loading:** The frontend chat widget fetches AI agent configuration and avatar settings from https://aiservice.yaraamanager.com/api (sent each time the widget loads on a page)
  * **During voice interactions:** Voice audio data (sent when a visitor uses voice chat features)
* **Terms of Service:** https://yaraai.com/terms-condition/
* **Privacy Policy:** https://yaraai.com/privacy-policy/

= Yaraa Authentication Service (Keycloak) =

This plugin uses a Keycloak-based authentication service hosted at auth.yaraamanager.com for secure user login and account management. Keycloak is open-source identity and access management software (https://www.keycloak.org) self-hosted on Yaraa AI infrastructure. The domain auth.yaraamanager.com is owned, operated, and self-hosted by Yaraa AI.

**Service Used:** Keycloak OpenID Connect Authentication
**Service URL:** auth.yaraamanager.com
**Service Provider:** Yaraa AI (https://yaraai.com)
**Data Sent:** Login credentials (email and password), authentication tokens (access token and refresh token), and user profile information (name, email).
**When Data is Sent:** Data is sent when the site owner logs in, signs up, refreshes an expired session, or retrieves their user profile from the WordPress admin panel.
**Purpose:** To provide secure user authentication, session management, and account creation for the plugin's admin features.

**Authentication:** The plugin authenticates with the Keycloak service using OAuth 2.0 / OpenID Connect protocol.
* **Access Token:** An access token is used to authenticate API requests to the Yaraa AI service. This token has a limited lifespan.
* **Refresh Token:** When the access token expires, a refresh token is used to request a new access token without requiring the user to re-enter their credentials. The refresh token is automatically used by the plugin to ensure seamless operation.

**API Endpoints Used:**

The plugin communicates with the Keycloak service at https://auth.yaraamanager.com using standard OpenID Connect protocol endpoints as defined in the OpenID Connect specification (https://openid.net/specs/openid-connect-core-1_0.html). Specifically, the plugin uses the Token endpoint (to obtain and refresh access tokens during login and signup) and the Userinfo endpoint (to retrieve the authenticated user's profile information such as name and email). These are server-side API endpoints that only accept authenticated requests and are not public web pages.

**OpenID Connect scopes requested and their purpose:**

* **openid** — Required base scope for OpenID Connect authentication; returns a unique user identifier (sub claim)
* **profile** — Read access to basic user profile information (name, preferred username)
* **email** — Read access to the user's email address and email verification status

Please note that the plugin automatically manages the token refresh process, so users do not need to take any additional action once the initial login is complete.

**Terms of Service:** [https://yaraai.com/terms-condition/](https://yaraai.com/terms-condition/)
**Privacy Policy:** [https://yaraai.com/privacy-policy/](https://yaraai.com/privacy-policy/)

= GoHighLevel Marketplace =

This plugin optionally connects to the GoHighLevel Marketplace, the OAuth authorization platform operated by [HighLevel Inc.](https://www.gohighlevel.com). It is used to initiate the OAuth 2.0 authorization flow so the site owner can securely grant this plugin permission to access their GoHighLevel account. This integration is entirely optional and only activated if the site owner manually connects their GoHighLevel account from the Integrations settings page.

* **What it is:** GoHighLevel Marketplace is the OAuth authorization platform operated by HighLevel Inc. It is used to initiate the OAuth 2.0 authorization flow so the site owner can securely grant this plugin permission to access their GoHighLevel account.
* **What data is sent and when:** When the site owner clicks "Connect" on the Integrations page, their browser is redirected to marketplace.gohighlevel.com. During this redirect, the plugin sends the OAuth client ID, redirect URI, requested permission scopes, and a CSRF state parameter. This only happens once during the initial authorization setup.

**OAuth scopes requested and their purpose:**

* **contacts.readonly** — Read access to contacts in GoHighLevel to check for existing leads
* **contacts.write** — Write access to create or update contacts in GoHighLevel when new leads are captured
* **locations.readonly** — Read access to GoHighLevel location/account information to identify the connected account
* **conversations.write** — Write access to create new conversations in GoHighLevel for synced leads
* **conversations/message.write** — Write access to send messages within GoHighLevel conversations

**Terms of Service:** [https://www.gohighlevel.com/terms-of-service](https://www.gohighlevel.com/terms-of-service)
**Privacy Policy:** [https://www.gohighlevel.com/privacy-policy](https://www.gohighlevel.com/privacy-policy)

= LeadConnector API =

This plugin optionally connects to the LeadConnector API, the backend API service operated by [HighLevel Inc.](https://www.leadconnectorhq.com). It is used to exchange OAuth authorization codes for access tokens, refresh expired tokens, and sync lead and conversation data between the plugin and the GoHighLevel CRM. This integration is entirely optional and only activated if the site owner manually connects their GoHighLevel account from the Integrations settings page.

* **What it is:** LeadConnector is the API service operated by HighLevel Inc. It is used to exchange OAuth authorization codes for access tokens, refresh expired tokens, and sync lead and conversation data between the plugin and the GoHighLevel CRM.
* **What data is sent and when:** OAuth client credentials (client ID and client secret), authorization code, grant type, and redirect URI are sent via a server-side POST request when the site owner completes OAuth authorization and whenever the access token needs to be refreshed. Lead data (name, email, phone number) and conversation data captured by the Yaraa AI chatbot are sent when the site owner triggers a sync to GoHighLevel.

**Authentication:** The plugin authenticates with GoHighLevel using OAuth 2.0.
* **Access Token:** An access token is used to authenticate API requests. This token expires after 24 hours.
* **Refresh Token:** When the access token expires, a refresh token is used to request a new access token without requiring the user to reauthenticate. The refresh token is automatically used by the plugin to ensure seamless operation.

Please note that the plugin automatically manages the OAuth token refresh process, so users do not need to take any additional action once the initial authentication is complete.

**Terms of Service:** [https://www.leadconnectorhq.com/terms2](https://www.leadconnectorhq.com/terms2)
**Privacy Policy:** [https://www.leadconnectorhq.com/privacy-policy](https://www.leadconnectorhq.com/privacy-policy)

= External Links =

The plugin admin pages contain outbound links to the following external websites. These are static HTML links only — no data is transmitted when visiting these pages.

* **Plugin documentation:** https://mojoomlasoftware.github.io/ai-sales-agent-documentation/ — hosted on GitHub Pages, for user reference only
* **Support contact form:** https://docs.google.com/forms/d/e/1FAIpQLSdb-dzIUmvVl_Icvcu4YWsLHAndxsaJMgg8C45vhTxH3wCMMA/viewform — a Google Form for submitting support requests

= Data Transmission Details =

* All data is transmitted over HTTPS (encrypted in transit)
* No data is sent until the administrator accepts the consent page and configures the plugin
* The frontend chat widget does not load until the administrator has completed setup and deployment
* Visitor data is only collected when visitors actively interact with the chatbot

= Service Terms and Privacy =

* **Yaraa AI** (yaraai.com, aiservice.yaraamanager.com, auth.yaraamanager.com):
  * Terms & Conditions: https://yaraai.com/terms-condition/
  * Privacy Policy: https://yaraai.com/privacy-policy/
* **GoHighLevel Marketplace** (marketplace.gohighlevel.com):
  * Terms of Service: https://www.gohighlevel.com/terms-of-service
  * Privacy Policy: https://www.gohighlevel.com/privacy-policy
* **LeadConnector API** (services.leadconnectorhq.com):
  * Terms of Service: https://www.leadconnectorhq.com/terms2
  * Privacy Policy: https://www.leadconnectorhq.com/privacy-policy
* **Support:** support@yaraai.com

By accepting the consent page and using this plugin, you agree to the terms and privacy policies of these external services. You are responsible for informing your website visitors about the data collected by this plugin and for complying with applicable data protection laws (GDPR, CCPA, etc.) in your jurisdiction.