# Changelog

***

***

### <mark style="color:green;">\*\*Version 1.6.0 \*\*</mark>



#### ✨ New Features

* **Campaigns Isolation**\
  Each WhatsApp number can now run its own Campaigns, enabling truly isolated automation per number.

#### 🛠 Improvements

* **Dashboard Refresh**\
  Redesigned home screen with quick-action cards for common tasks.
* **Performance Boost**\
  Optimized database queries and background jobs for up to **40% faster** response times.
* **Security Hardened**\
  Updated OAuth token handling and tightened CSRF protections.

#### 🐞 Bug Fixes

* Addressed a rare crash when uploading very large media templates.
* Fixed incorrect timezone handling in scheduled campaigns on non-UTC servers.
* Resolved sporadic “Permission Denied” errors during file cleanup routines.

***

### <mark style="color:green;">\*\*Version 1.5.9 \*\*</mark>



#### ✨ New Features

* **Campaigns with Dedicated Numbers**\
  Assign one or more dedicated WhatsApp numbers to each campaign for clear sender identity and improved deliverability.

#### 🛠 Improvements

* **Sync Reliability**\
  Fortified template and number sync logic to handle intermittent network failures gracefully.
* **UI Tweaks**\
  Cleaner campaign creation flow with grouped fields and real-time validation.
* **File Storage Cleanup**\
  Automatically archive chat file folders older than 30 days to reduce disk usage.

#### 🐞 Bug Fixes

* Fixed an edge-case where campaign scheduling skipped numbers marked as “inactive.”
* Resolved a layout glitch in the template picker when loading over 50 templates.
* Corrected “mark as read” not updating the chat list badge in certain browsers.

***

### <mark style="color:green;">**Version 1.5.8**</mark>



## ✨ New Features

* ✅ **Multi-WABA Support**\
  Now supports **multiple WhatsApp Business Accounts (WABAs)**. Previously, the module was limited to a single account.
* ✅ **WABA Isolation for Templates & Numbers**
  * **Templates** are now associated with their respective **WhatsApp Business Account IDs**, ensuring clear separation and accurate loading.
  * **Phone Numbers** are also tied to WABA IDs, providing structured multi-account management.
* ✅ **Organized Chat File Storage**\
  Uploaded files related to chat messages are now stored inside folders named after their **interaction IDs** for cleaner file management.
* ✅ **Improved Sync Logic**\
  Numbers and templates are now synced with cleaner structure and validation.
* ✅ **Template Filtering by Number**\
  Only templates belonging to the **selected number’s WABA** are shown in the chat interface for improved relevance.

## 🧭 Upcoming Features

* ⚙️ **Bots & Campaigns Isolation**\
  Future updates will allow each WhatsApp number to have **its own Bots and Campaigns**, supporting personalized automation.

### <mark style="color:green;">**Version 1.5.7**</mark>

### Enhancements

* Modified **Media Management** of chats for better performance and organization.
* **Interaction Directory** structure introduced for improved modular design.
* Media files can now be **attached during template creation**, enabling richer message content.
* **Zero-variable templates** are now supported for:
  * Sending immediate messages.
  * Initiating conversations without requiring dynamic data.

### Fixes

* Resolved **media deletion issues** to ensure proper cleanup of unused files.
* Fixed bug with **bot media attachments per chat**, ensuring media displays consistently.
* Corrected template logic to:
  * Support **attachments with zero-variable templates**.
  * Properly send **media in initiate conversation** templates.

***

### <mark style="color:green;">**Version 1.5.6**</mark>

✨ **New Features**

* **Connection Manager UI:**
  * Redesigned the WhatsApp Cloud configuration page with a modern Tailwind CSS layout.
  * Compact, responsive design for better usability.
* **Connect & Disconnect Feature:**
  * Full manual and embed mode support.
  * Validates Access Token, Business ID, App ID, and App Secret.
  * Automatic server-side validation and caching for connection status.
* **Token Details Preview:**
  * Visual panel shows:
    * Token validity (✅❌)
    * App name, system user type
    * Expiry dates (human-readable)
    * Data access expiration
* **Phone Number Insights:**
  * Real-time display of:
    * Phone display name
    * Verification status
    * Quality rating (GREEN / ORANGE / RED)
    * Tier level (e.g., STANDARD)
* **Webhook Management (Upgraded):**
  * Full webhook automation now available.
  * Requires **App ID** and **App Secret** to securely generate an **App Access Token** (`App ID|App Secret`).
  * Automatically registers or updates webhook with Meta API without manual steps.
  * Displays live webhook status (✅ Registered / ❌ Not Registered).
* **OAuth Scope Validation:**
  * Checklist for required permissions:
    * `pages_show_list`
    * `business_management`
    * `whatsapp_business_management`
    * `whatsapp_business_messaging`
    * `pages_messaging`
    * `whatsapp_business_manage_events`
  * Visual indicators (✅ or ❌) based on token permissions.
* **Dynamic Data Panels:**
  * Showcasing:
    * Business Name
    * Namespace
    * Category
    * Business Link
  * Embedded signup status and connection method toggle.
  * 3-column responsive layout.

***

🛠️ **Manual Connection Guide Updated**

* Step-by-step instructions embedded for reconnecting manually:
  * Input your Business ID, Access Token, App ID, and App Secret.
  * Click "🔗 Connect Now" to:
    * Verify token validity and permissions
    * Fetch linked phone numbers
    * Auto-register webhook
* 🎲 Generate or reuse Verify Tokens easily.
* Important notes provided for OAuth scopes and Meta account selection.

_ℹ️ Why App ID & App Secret?_

> We use your App ID and App Secret **only once** to create a secure App Access Token.\
> This allows automatic webhook registration with Meta, without manual setup.

***

🎨 **UI/UX Enhancements**

* ✅❌ Emoji indicators for permission and token health.
* Copy-to-clipboard feature for OAuth Redirect URI.
* New badge system for App and Token metadata.
* Improved loading spinners and success/error feedback during form actions.
* Optional JSON debug viewer for developers.

***

### <mark style="color:green;">**Version 1.5.5**</mark>

**Improvements**

* **Refined Chat Sidebar:**
  * Optimized layout for mobile and small screens with responsive Tailwind classes.
  * Reduced layout shifts by ensuring consistent widths/heights in chat items and sidebar filters.

**Fixes**

* **Loading Spinner Alignment:**
  * Resolved an issue where the loading spinner overlapped with other UI elements on smaller screens.
* **Pin/Unpin Consistency:**
  * Fixed pin/unpin button states, ensuring pinned chats display the correct highlight background color (yellow) and icon color (yellow-500).
* **Overflow & Spacing Bugs:**
  * Addressed minor spacing issues in the chat sidebar and filter panel.
  * Fixed an overflow problem that occasionally clipped the last chat item.

### <mark style="color:green;">**Version 1.5.4**</mark>

**New Features**

* **Bulk Contact Import:**
  * Added functionality to import contacts from a CSV file.
  * Automatically assigns selected groups to imported contacts.
  * Handles contact duplicates by checking phone numbers and assigning groups accordingly.

**Improvements**

* **Group Syncing:**
  * Introduced a function to ensure unique group assignments for contacts, eliminating duplicate group entries.
  * Added an auto-sync feature for contact group assignments to maintain data integrity.

**Fixes**

* **Duplicate Contacts:**
  * Added a fix to ensure unique contacts by phone number, removing duplicates from the database.
  * Improved error handling for contact creation and group assignment during the import process.
* **Database Integrity:**
  * Improved database transactions during bulk import to ensure data consistency and prevent partial data imports.

**Misc**

* Enhanced user experience by providing feedback on successful or failed imports through flash messages.
* Updated documentation for the new import and sync features.

### <mark style="color:green;">**Version 1.5.3**</mark>

**New Features**

* **AI Response Button**:\
  Added a new button to trigger AI-generated responses. This feature can be manually enabled in the settings by configuring `whatsapp_openai_token` and `whatsapp_openai_status` to `"manual"`.
* **AI Response Integration**:\
  Integrated AI response functionality for text messages in the WhatsApp module, enabling dynamic replies based on interaction history and AI prompts.

#### Improvements

* **AI Reply Enhancement**:\
  Refined the logic in the AI reply function to ensure accurate responses are sent based on the message type and interaction history.

### <mark style="color:green;">**Version 1.5.2**</mark>

_**New Features:**_

1. _Tag Management for Chats_
   * _Description:_ Organize chats efficiently by adding, editing, or deleting tags.
   * _Example:_ Tag a conversation as "High Priority" or "Follow-Up" for quick filtering and better workflow management.
2. _Enhanced Permissions_
   * _Description:_ Admins can now assign precise, fine-grained permissions for each WhatsApp module to control user actions.
   * _Example:_ Allow team members to view campaigns but restrict access to creating or editing them.
3. _Bot Duplication_
   * _Description:_ Quickly duplicate existing bots to save time when creating similar bots with slight modifications.
   * _Example:_ Duplicate a lead generation bot to create a new version tailored for a specific region or product line.
4. _Quick Replies Management_
   * _Description:_ Manage predefined responses for faster communication and consistent messaging.
   * _Example:_ Set up quick replies like "Thank you for contacting us. We'll get back to you shortly!" for easy reuse.
5. _Groups & Bulk Contacts in Campaigns_
   * _Description:_ Bulk import contacts from CSV files and link them with multiple groups for targeted campaigns.
   * _Example:_ Import a CSV of VIP clients and link them to "Priority Customers" and "Holiday Discounts" groups for tailored messaging.
6. _Simple Template for Initial Client Interaction_
   * _Description:_ Initiate conversations using simplified templates without headers or variables for a more straightforward experience.
   * _Example:_ Send a message like "Hello, how can we assist you today?" to start a conversation without additional formatting.
7. _Pin and Tag Chats_
   * _Description:_ Pin important chats to the top and tag conversations for quick access.
   * _Example:_ Pin an ongoing project discussion and tag it as "Urgent" for immediate reference.
8. _Lazy Loading for Chats and Messages_
   * _Description:_ Optimized chat performance with a "Load More" functionality, reducing initial load times for long conversations.
   * _Example:_ Quickly load recent messages in a chat and access older conversations only when needed.

***

_**Improvements:**_

1. _Optimized Data Fetching in Interactions_
   * _Description:_ Enhanced data filtering and retrieval processes for faster performance and seamless user experience.
   * _Example:_ Interactions now load more quickly, allowing users to view and act on customer queries with minimal delays.

***

_**Security:**_

1. _Enhanced Input Validation_
   * _Description:_ Improved input validation across modules to ensure data integrity and prevent unauthorized access.
   * _Example:_ Users entering invalid campaign data are immediately alerted to fix errors, ensuring system stability and security.

**Version 1.5.1**

```scminput
New Features:

Added support for multiple template formats:
Image Templates: Images can now be included in templates using an HTML <img> tag, allowing for responsive image display.
Video Templates: Added support for embedding videos in templates with a <video> tag, providing the ability to play videos directly within the message.
Document Templates: Documents can now be included via a download link, enabling users to attach files as part of the template.
```

**Version 1.5.0**

```
- New Feature Introduced: Interactive Messages
Advanced handling for interactive messages, including buttons, lists, and flows, enhancing user engagement and interaction.

- Catalogue Templates Support Added
Added support for catalogue templates, allowing for the display of products and services in a structured format.

- Flow Templates Support Added:
Introduced flows templates to facilitate dynamic user interactions and streamline conversation paths.

- Enhanced Error Logging
Improved error logging capabilities for better tracking and resolution of issues related to message sending and processing.

-Dynamic Parameter Handling
Dynamic extraction of parameters from interactive message responses, enabling richer and more responsive user interactions.

-Improved Media Message Extraction
Added support for extracting and formatting media messages (images, videos, documents, etc.) for more versatile message delivery options.

- Improved Error Clarity
Implemented functionality to provide detailed reasons for any messages that fail to send, as reported by the WhatsApp API (Meta). This feature ensures clarity and transparency, helping to mitigate concerns about the module's reliability by clearly indicating why a message was not sent.

-Cron Job Management
Introduced a user-friendly interface for managing and configuring cron jobs directly from the admin dashboard, ensuring timely execution of automated tasks related to message campaigns and interactions.
```

**Version 1.4.1**

```
- Faster Message & Chat Loading: Performance optimizations for quicker message and chat access.
- Delete Chat Option: Added the ability to delete entire chat threads.
- Chat Contacts Number Preview: Now displays contact numbers in chat previews for easier identification.
- Enhanced Loading Mechanism: Improved system architecture for faster, smoother chat and message loading.
```

**Version 1.4.0**

```
- Improved code performance (webhook)
```

**Version 1.3.9**

```
- Improved trigger logic for bots to include exact matches and keyword containment
- Refined conditions for office timings and out-of-office responses
- Fix: Addressed language line errors in the system
- Fix: Improved error handling and logging for bot triggers
```

**Version 1.3.8**

<pre><code>-Menu Bot support added (Coming Soon)
-Flow Bot support added (Coming Soon)
-Interactive Buttons Bot: Sends interactive buttons for the user to choose from. 
-List Bot (Coming Soon): Will present an interactive list of options. 
<strong>-Quick Reply Bot (Coming Soon): Will send quick reply buttons for user responses. 
</strong><strong>-Sticker Bot: Responds with stickers. 
</strong>-Contact Bot: Shares contact information.
</code></pre>

**Version 1.3.7**

```
-Enhancements
```

**Version 1.3.6**

```
-Enhanced File Upload Handling
-Media Bots Added: Automatic responses with various media types, including images, videos, documents, and audio
-Location Bots Added: Bots that can respond with location information
-Interactive Buttons Bots Added: Included bots that send interactive buttons regarding user selections
-Sticker Bots Added: Bots that send stickers as responses
-Contact Bots Added: Bots that share contact information
-Interactive Menu Bots (Coming soon): Bots that will allow  users to interact with options of a menu
-Flow Bots (Coming soon): Bots that will provide a sequential flow of options for user interaction
```

**Version 1.3.5**

```
-Code improvements & bug fixes
-Improved error handling for WhatsApp Cloud API calls (Incorrect permissions etc)
-Enhanced logging for phone number data
-Database management imporvements
-Added comprehensive logging for better debugging of phone number and message data processing
-Minor UI/UX improvements
```

**Version 1.3.4**

```
-Code improvements
```

**Version 1.3.3**

```
-Code improvements
```

**Version 1.3.2**

```
-Bug fixes
```

**Version 1.3.1**

```
-Added sortin filters (Active, Unread, Expired, All Chats) at Chat Interface
```

**Version 1.3.0**

```
-WhatsApp Numbers Manager function added
-Unread and Read status added
-Lead Status & Assigned Filters added
-Quick Lead Access
-Added Reply action in messages
-New Chat client interface added
-Minor Improvements
```

**Version 1.2.6**

```
-Templates functionality added
-Messages and Autoreplies functionality added
-Campaigns functionality added
-Activity log added
-Minor Improvements
```

**Version 1.2.5**

```
-OpenAI Integration (automatic reply in chats)
```

**Version 1.2.4**

```
-Functionality Improvements
```

**Version 1.2.3**

```
-Multi-number support, you can now use multiple WA numbers under the same Business Account ID
-Interface improvements
-Settings interface updated
```

**Version 1.2**

```
-UI Improvements
```

**Version 1.1**

```
-Mobile responsiveness fixes
```

**Version 1.0**

```
-Initial version
```

\\
