# Changelog

All notable changes to the Excel Campaign plugin are documented here.

---
## [2.0.0] - 2026-05-19

### Added

* **Dynamic Delay Range**
    * **Function:** Implements a dynamic, fluctuating wait time (in seconds) between each individual message delivery.
    * **Benefit:** Destroys rigid sending patterns by introducing unpredictability (e.g., a 12-second delay for the first message, 28 seconds for the second, and 15 seconds for the third). This fluid behavior accurately mimics manual human typing, making your WhatsApp numbers significantly safer from Whatsapp bans.

* **Delivery Hours Window**
    * **Function:** Limits message sending to run only during user-defined daily operating hours. Outside the allowed schedule, all broadcasts will pause automatically and resume once the permitted time range begins again.
    * **Benefit:** Maintains communication etiquette and human-like patterns by ensuring messages are only delivered during standard active hours (e.g., `08:00-12:00` and `13:00-16:00`). If the current time moves past this window, the queue automatically halts and safely resumes the next morning.

* **Auto Pause by Message Count**
	* **Function:** Automatically forces the broadcast system to take a temporary break after sending a specific predefined number of messages. After the break duration ends, message sending will automatically continue with the next queue.
	* **Benefit:** Excellent for cooling down your WhatsApp number's activity rate. For example, if configured to send 100 messages and pause for 30 minutes, the engine will safely rest before automatically resuming the remaining queue.

* **Auto Pause by Duration Time**
    * **Function:** Forces the broadcast engine to pause automatically after running continuously for a specified number of minutes. Once the pause period ends, the next messages will automatically resume sending.
.
    * **Benefit:** Prevents non-stop, mechanical sending patterns that easily trigger WhatsApp's automated spam detection. For instance, if set to 120 minutes, the engine will automatically halt for 30 minutes after every 2 hours of active broadcasting to mimic natural usage rhythms.

### Fixed

* **Timezone Synchronization & Dynamic Timestamps**
    * **Fixed Dynamic User Timezone:** Resolved an issue where message logs and queues were stored in default UTC instead of the user's specific timezone. The system now dynamically grabs the custom timezone from the user profile settings to log exact execution timestamps (`created_at` and `updated_at`).
	* **Robust Delivery Window Parsing:** Fixed a critical bug in the Node.js engine validation logic where the system repeatedly marked campaigns as "outside delivery hours" if users entered time formats using dots (e.g., `09.00-10.00`) instead of colons. The system now safely normalizes all dot formats into standard colon formats (`09:00-10:00`) upon saving in the Laravel Controller, ensuring fluid background engine execution.

---
## [1.5.0] — 2026-05-13

### Added

* **New Feature: Spintax Engine:**
    * **Dynamic Message Spinning:** Supports the curly brace format `{Hello|Hi|Good Morning}`. The system will randomly pick a variation for every single message sent.
    * **Nested Spintax Support:** Advanced support for nested patterns like `{Hi {Chief|Boss}|Hello {Bro|Friend}}`, allowing for more complex and natural-sounding message variations.
    * **Human-Like Fingerprint:** Every outgoing message now carries a unique "textual fingerprint," significantly reducing the risk of being flagged by WhatsApp’s spam detection algorithms.
* **Real-time Campaign Details:**
    * Live progress indicators on the campaign detail page.
    * The queue table now updates statuses (**Sending/Sent/Failed**) dynamically in the background—no page refresh required.
---

## [1.2.0] — 2026-05-11

### Added
- **Campaign Search**: Added search functionality allowing users to filter campaigns by name, significantly improving navigation for accounts with large datasets.
- **Campaign Reporting System**: Introduced a dedicated reporting feature on the campaign details page, allowing users to export data in **Excel** and **PDF**/ **Print** formats.
- **Detailed Export Metrics**: Exported reports now include sequential numbering, recipient phone numbers, all dynamic variables, exact dispatch timestamps, and final delivery statuses.
- **Contextual Report Headers**: Added the message template preview above the data table in reports for better context and auditing.
- **Dynamic Status Filtering**: Added a modal dialog to filter reports by status (All, Sent, Failed, Paused, Pending) before generation.
- **Original Format Mapping**: Exported Excel files now mirror the user's original upload structure for better data re-usability.

### Improved
- **UI/UX Enhancement**: Migrated native browser alerts and confirms to jquery-confirm library for a more professional visual consistency and robust asynchronous interaction handling.

---

## [1.1.0] — 2026-05-10

Feature additions and automated notification features.

### Added
- **WA Notification System**: Added ability to send automated completion reports to admin numbers after a campaign finishes.
- **Webhook Integration**: Added support for outgoing webhooks to external URLs after a campaign finishes.
- **Enhanced Message Management**: Added Edit, Delete, Pause, and Resend features for each individual message within the campaign queue.
- **Campaign Management**: Delete all campaigns.
---

## [1.0.0] — 2026-02-08

Initial release of the Excel Campaign plugin.

### Added
- **Excel Import**: Bulk upload recipients and variables via .xlsx files.
- **Variable Parsing**: Support for dynamic placeholders (e.g., `[columnX]`) within message templates.
- **Flexible Delivery**: Send campaigns immediately or schedule them for later.
---