iachat/app/javascript/dashboard/components-next
Aman Kumar 0ea616a6ea
feat: WhatsApp campaigns (#11910)
# Pull Request Template

## Description

This PR adds support for WhatsApp campaigns to Chatwoot, allowing
businesses to reach their customers through WhatsApp. The implementation
includes backend support for WhatsApp template messages, frontend UI
components, and integration with the existing campaign system.

Fixes #8465

Fixes https://linear.app/chatwoot/issue/CW-3390/whatsapp-campaigns

## Type of change

- [x] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

- Tested WhatsApp campaign creation UI flow
- Verified backend API endpoints for campaign creation
- Tested campaign service integration with WhatsApp templates
- Validated proper filtering of WhatsApp campaigns in the store

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

## What we have changed:

We have added support for WhatsApp campaigns as requested in the
discussion.
Ref: https://github.com/orgs/chatwoot/discussions/8465

**Note:** This implementation doesn't exactly match the maintainer's
specification and variable support is missing. This is an initial
implementation that provides the core WhatsApp campaign functionality.

### Changes included:

**Backend:**
- Added `template_params` column to campaigns table (migration + schema)
- Created `Whatsapp::OneoffCampaignService` for WhatsApp campaign
execution
- Updated campaign model to support WhatsApp inbox types
- Added template_params support to campaign controller and API

**Frontend:**
- Added WhatsApp campaign page, dialog, and form components
- Updated campaign store to filter WhatsApp campaigns separately
- Added WhatsApp-specific routes and empty state
- Updated i18n translations for WhatsApp campaigns
- Modified sidebar to include WhatsApp campaigns navigation

This provides a foundation for WhatsApp campaigns that can be extended
with variable support and other enhancements in future iterations.

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-16 09:04:02 +05:30
..
Accordion feat: Allow customizing the responses, flows in Captain (#11385) 2025-04-29 15:42:15 -07:00
avatar chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
banner chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
breadcrumb feat: New Assistants Edit Page (#11920) 2025-07-12 17:02:10 +05:30
button chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
Campaigns feat: WhatsApp campaigns (#11910) 2025-07-16 09:04:02 +05:30
captain feat: New Assistants Edit Page (#11920) 2025-07-12 17:02:10 +05:30
checkbox feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
colorpicker chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
combobox chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
Contacts fix: Contact name editing did not allow spaces (#11931) 2025-07-14 10:27:50 +05:30
Conversation fix: Style issue with conversation header (#11655) 2025-06-03 15:21:30 +05:30
copilot chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
CustomAttributes feat(v4): Add new contact details screen (#10504) 2024-12-03 21:29:47 -08:00
dialog feat: Add Teleport component to fix RTL/LTR utility classes (#11455) 2025-05-12 11:49:23 -07:00
dropdown-menu chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
Editor chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
feature-spotlight feat: Add support for feature spotlight components (#11012) 2025-03-18 13:17:42 -07:00
filter feat: auto resolve label option and fixes (#11541) 2025-06-04 14:53:24 +05:30
flag feat: Flag icon component (#10564) 2024-12-10 11:53:24 +05:30
HelpCenter chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
icon feat: Voice channel creation Flow (#11775) 2025-06-25 14:21:03 -07:00
Inbox fix: v4 ui issues (#10652) 2025-01-08 18:17:50 +05:30
inline-input chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
input chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
Label chore(v4): Update colors (#10700) 2025-01-16 15:27:23 +05:30
message chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
NewConversation chore: Add cache to improve widget performance (#11163) 2025-03-24 16:04:49 -07:00
pagination chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
phonenumberinput fix: Accidental contact creation on country dropdown toggle (#11494) 2025-05-16 16:14:00 +05:30
selectmenu feat: Update conversation basic filter (#11415) 2025-05-06 12:44:23 +05:30
sidebar feat: WhatsApp campaigns (#11910) 2025-07-16 09:04:02 +05:30
spinner feat: Add Spinner to new components (#10303) 2024-10-16 17:53:46 -07:00
switch chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
tabbar chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
taginput feat(v4): Compose a new conversation from a phone number. (#10568) 2024-12-17 18:07:58 +05:30
textarea chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
CardLayout.vue feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
EmptyStateLayout.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
SidebarActionsHeader.story.vue feat: Update the UI to support the change for Copilot as a universal copilot (#11618) 2025-05-29 12:35:10 +05:30
SidebarActionsHeader.vue feat: Update the UI to support the change for Copilot as a universal copilot (#11618) 2025-05-29 12:35:10 +05:30
TeleportWithDirection.vue feat: Add Teleport component to fix RTL/LTR utility classes (#11455) 2025-05-12 11:49:23 -07:00