=== Sangar Studio AI Chatbot ===
Contributors: sangarstudio
Tags: chatbot, ai, openai, leads, customer journey
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sangar Studio AI Chatbot is an interactive lead generation chatbot builder for WordPress websites.

== Description ==

Design premium interactive conversation flows directly within WordPress using a powerful visual editor. Combine a structured Customer Journey builder with optional OpenAI (GPT-4o-mini) intelligence fallback to engage visitors, answer FAQs, and capture high-converting leads automatically.

Key Features:
* **Visual Customer Journey Builder**: An intuitive drag-and-drop workspace (powered by Drawflow) to manage static branches and paths.
* **OpenAI Hybrid Intelligence**: Seamless optional fallback to GPT-4o-mini when conversation departs from defined paths.
* **Direct HubSpot & Webhook Sync**: Instantly push captured lead records (name, email, phone) directly into HubSpot or external automation platforms like Zapier/Make.
* **Proactive Engagement Prompts**: Drive engagement using customized automated chat bubble prompts.
* **Lead Analytics & Charting**: Track visitor counts, conversion rates, and daily lead acquisition trends via visual dashboard line charts.

== External Services ==

This plugin relies on or integrates with external third-party web services to provide artificial intelligence capabilities and contact synchronization. These integrations are completely optional but require your own API keys/tokens to function:

* **OpenAI API** (https://api.openai.com)
  - Purpose: Generates intelligent fallback conversational responses when the user departs from the defined visual Customer Journey.
  - Data Sent: Sends the user's text message input and the conversation's step context. No user profile metadata or database information is transmitted.
  - When Sent: Sent dynamically each time a visitor submits a chat message, but only when AI Fallback is enabled and active.
  - Privacy Policy: https://openai.com/policies/privacy-policy
  - Terms of Service: https://openai.com/policies/terms-of-use

* **HubSpot API** (https://api.hubapi.com)
  - Purpose: Automatically synchronizes and saves captured leads as contacts directly in your HubSpot CRM dashboard.
  - Data Sent: Transmits lead contact fields including First Name, Last Name, Email address, and Phone number.
  - When Sent: Sent instantly on demand when a new lead is captured via the chatbot interface and the HubSpot CRM integration option is configured.
  - Privacy Policy: https://legal.hubspot.com/privacy-policy
  - Terms of Service: https://legal.hubspot.com/terms-of-service

== Installation ==

1. Upload the `sangar-studio-ai-chatbot` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to the 'Sangar Studio AI Chatbot' menu to configure your settings.

== Frequently Asked Questions ==

= Do I need an OpenAI API Key? =
No, the chatbot works perfectly with just the Customer Journey. The AI fallback is optional.

= Where are the leads stored? =
Leads are stored in your WordPress database and can be viewed in the 'Estadísticas y Leads' tab.

== Screenshots ==

1. The chatbot interface on a website.
2. The visual customer journey builder.
3. The leads and analytics dashboard.

== Changelog ==

= 1.2.3 =
* Added full WordPress 7.0 compatibility.
* Integrated natively with the WordPress 7.0 Abilities API (safely supported on WP 6.9+), exposing the chatbot conversation processor as a discoverable, tool-callable system ability.
* Fully verified compatibility with PHP 8.3 and PHP 8.4 recommended guidelines for WordPress 7.0.

= 1.2.2 =
* Resolved 403 Forbidden errors by removing frontend REST API nonce checks to guarantee compatibility with all page caching plugins.
* Integrated custom Google Maps location buttons with styled icons in local chat triggers.
* Implemented double-fallback bilingual (English & Spanish) logic to prevent blank chat flows.

= 1.2.1 =
* Added option to customize or eliminate the chatbot header emoji/icon.
* Added a professional pre-configured neutral conversational flow by default.

= 1.2.0 =
* Initial release.
* Added Visual Journey Builder.
* Added Lead Capture Analytics.
