=== Ahmadraza360 Lead Manager ===
Contributors: ahmadraza360
Donate link: https://profiles.wordpress.org/ahmadraza360/
Tags: contact form 7, wpforms, crm, lead manager, submissions, contact form database, cf7 database, wpforms entries
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.0.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Capture, track, organize, and convert Contact Form 7 and WPForms submissions inside a fast, self-hosted WordPress CRM portal.

== Description ==

Developed by **AHMAD RAZA** (**ahmadraza360**), **Ahmadraza360 Lead Manager** is an enterprise-grade, lightweight, and self-hosted CRM solution designed specifically for WordPress website owners, agencies, and businesses.

Never lose a potential customer or form inquiry again. While Contact Form 7 and free versions of form builders only send email notifications (which often end up in spam folders or get lost), **Ahmadraza360 Lead Manager** automatically intercepts and saves every single submission into a secure, dedicated database structure on your own server.

---

### 🌟 Why Choose Ahmadraza360 Lead Manager?

* **100% Self-Hosted & Private**: Your leads remain entirely on your own server. No third-party data tracking, no external API dependencies, and zero monthly SaaS fees.
* **Optimized Database Architecture**: Built with dedicated custom tables (`wp_ahmadraza360_lm_submissions`, `wp_ahmadraza360_lm_fields`, `wp_ahmadraza360_lm_notes`, `wp_ahmadraza360_lm_activity_log`) ensuring lightning-fast search queries without bloating your standard `wp_posts` or `wp_postmeta` tables.
* **Automated Instant Email Alerts & Auto-Responders**: Instant email notifications sent to administrators whenever a new lead arrives, plus automated confirmation/welcome emails dispatched to the customer.
* **Instant Action Tools**: Directly communicate with leads, launch email responses, assign operators, and track the full communication lifecycle.

---

### 🚀 Key Features

#### 1. Zero-Config Form Interception
* Works out of the box with **Contact Form 7** (`wpcf7_submit`) and **WPForms** (`wpforms_process_complete`).
* Automatically detects form submissions in real-time without requiring complex webhooks or API keys.

#### 2. Automated Email Alerts & Customer Auto-Responders
* **Admin Lead Alerts**: Automatically dispatches a formatted instant email notification to the site administrator when a new lead is captured.
* **Customer Auto-Responder**: Sends an automated confirmation receipt to the lead acknowledging their submission.
* **Custom Email Templates**: Configure subject lines, admin recipients, and dynamic merge tags (`{lead_name}`, `{lead_email}`, `{form_title}`) directly in Settings.

#### 3. Intelligent Field Mapping & File Backups
* Automatically identifies standard fields: *Full Name*, *Email Address*, *Phone Number*, *Subject*, and *Message Body*.
* Dynamically preserves every custom form field, select box, radio button, and checkbox without manual configuration.
* Safely uploads and stores file attachments in dedicated secure folders with one-click admin previews.

#### 4. Visual KPI Analytics & Performance Charts
* Interactive dashboard powered by bundled local Chart.js.
* Track total leads, daily/weekly acquisition velocity, top performing forms, and submission device breakdowns.

#### 5. Unified Leads CRM Management Table
* Comprehensive lead table with live search and multi-parameter filtering (by status, date range, and form source).
* Color-coded status lifecycle tracking: **New**, **Contacted**, **In Progress**, **Converted**, **Closed**, and **Spam**.
* Bulk actions support to update statuses, assign team managers, or delete spam entries simultaneously.

#### 6. Lead Detail Sheet & Activity Timeline
* Rich customer profile modal displaying complete submission metadata, IP address, page URL, and submission timestamps.
* Internal team notes feed for sales reps and administrators to collaborate.
* Complete chronological activity log tracking all changes made to the lead.
* Built-in direct email responder and telephone quick actions.

#### 7. Enterprise Data Import & Export (CSV & JSON)
* **Export Engine**: Export filtered leads to CSV or JSON formats for offline analysis, backup, or importing into external CRMs.
* **Import Wizard**: Built-in smart column mapper to easily migrate existing CSV and JSON datasets into your CRM database.

#### 8. Privacy, GDPR & Security Focused
* Optional IP address masking and anonymization.
* Configurable automated data retention schedules to purge old entries automatically.
* Clean database uninstaller that removes all plugin tables and files upon uninstallation if selected.

---

== Installation ==

1. Log in to your WordPress Admin dashboard.
2. Navigate to **Plugins > Add New** and search for `Ahmadraza360 Lead Manager`, or upload the `.zip` archive.
3. Click **Install Now** and then **Activate**.
4. Access **Ahmadraza360 Lead Manager** from your WordPress admin navigation sidebar or click **Settings** on the Plugins page.
5. That's it! All incoming form submissions from Contact Form 7 and WPForms will now be captured automatically in your CRM dashboard.

---

== Frequently Asked Questions ==

= Does this plugin work automatically after activation? =
Yes! Once activated, Ahmadraza360 Lead Manager immediately starts capturing all incoming submissions from Contact Form 7 and WPForms without needing any extra configuration.

= Does the plugin send email notifications for new leads? =
Yes! In the plugin Settings under "Email Templates", you can enable automated instant email alerts for administrators and automated confirmation emails sent to the customer with customizable templates.

= Does Ahmadraza360 Lead Manager slow down my website? =
Not at all. The plugin utilizes dedicated, indexed relational database tables instead of standard WordPress postmeta. This ensures zero performance impact on your frontend site speed and ultra-fast backend queries.

= What happens if email notifications from my forms fail? =
Even if your server email (wp_mail / SMTP) fails to deliver an email notification, Ahmadraza360 Lead Manager securely saves the lead in your database first. You will never lose a client inquiry again.

= Can I use custom form fields with Contact Form 7 and WPForms? =
Yes. The plugin dynamically parses all custom fields, dropdown menus, radio buttons, and checkboxes, storing them neatly in the lead details view.

= Where are file uploads and attachments stored? =
File attachments submitted through forms are saved securely inside `/wp-content/uploads/ahmadraza360-lead-manager/attachments/` and are accessible via direct preview links in the Lead Detail sheet.

= Can I import leads from CSV or JSON files? =
Yes. The built-in Import Wizard supports both CSV and JSON formats with an intelligent column mapper that allows you to easily import and map contacts into your database.

= Can I export my leads to Excel or CSV? =
Yes. You can filter leads by date range, status, or form source and export them to standard CSV or JSON format with a single click.

= Is my lead data secure and GDPR compliant? =
Yes. All data is stored locally in your own database. The plugin includes optional IP anonymization and customizable data retention cleanup schedules.

= Is Ahmadraza360 Lead Manager free? =
Yes, Ahmadraza360 Lead Manager is 100% free and open source under the GPLv2 license.

---

== Screenshots ==

1. Dashboard Analytics: Overview of lead generation metrics, weekly velocity chart, and form source distribution.
2. Lead Submissions CRM Table: Unified leads grid with search, multi-filter dropdowns, status pills, and bulk operations.

---

== Changelog ==

= 1.0.2 =
* Added full WordPress admin sidebar submenu navigation under Lead Manager (Dashboard, Leads CRM, Import Wizard, Export Data, Settings, System Guide).
* Fixed Dashboard Top Performing Forms & Landing Pages table card layout and responsiveness.
* Added detailed email notification and auto-responder feature documentation.

= 1.0.1 =
* Fixed Settings tab navigation switcher for Contact Form 7, WPForms, Email Templates, and GDPR & Privacy tabs.
* Enhanced Import Wizard with full JSON & CSV file upload support, preview, and auto column mapping.
* Polished table headers, checkbox alignment, and action toolbar.
* Added direct Dashboard and Settings action links on the WordPress Plugins screen.
* Refined branding typography and capitalized plugin title to Ahmadraza360 Lead Manager.

= 1.0.0 =
* Initial official production release on WordPress.org.

---

== Upgrade Notice ==

= 1.0.2 =
Upgrade to v1.0.2 for complete sidebar submenu navigation, responsive dashboard card layouts, and full email notification alerts.
