iachat/app/views/api/v1/models
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
..
_account.json.jbuilder feat: Add support for minutes in auto resolve feature (#11269) 2025-05-07 00:36:15 -07:00
_agent_bot.json.jbuilder feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
_agent.json.jbuilder feat: Add APIs to manage custom roles in Chatwoot (#9995) 2024-08-23 17:18:28 +05:30
_app.json.jbuilder feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
_campaign.json.jbuilder feat: WhatsApp campaigns (#11910) 2025-07-16 09:04:02 +05:30
_contact_inbox.json.jbuilder feat: hide tokens and password on contact inbox payloads (#10888) 2025-02-20 21:22:12 -08:00
_contact.json.jbuilder feat: Add the ability to block/unblock contact via contact details page (#10899) 2025-02-13 14:59:35 -08:00
_conversation.json.jbuilder revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30
_csat_survey_response.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
_custom_attribute_definition.json.jbuilder feat: Support Regex validation for custom attributes (#7856) 2024-01-23 18:01:57 +04:00
_custom_filter.json.jbuilder fix: Revert the changes for SyncCustomFilterCountJob (#8238) 2023-10-27 10:45:48 -07:00
_dashboard_app.json.jbuilder feat: Allow users to create dashboard apps to give agents more context (#4761) 2022-06-01 11:13:10 +05:30
_hook.json.jbuilder fix: Update email alerts for Slack integration (#7739) 2023-08-17 11:46:37 -07:00
_inbox_slim.json.jbuilder chore: Fix issue with compose conversation form (#10991) 2025-02-27 21:45:20 +05:30
_inbox.json.jbuilder feat: Improve CSAT responses (#11485) 2025-05-16 14:18:52 +05:30
_macro.json.jbuilder chore: Macros enhancement (#5609) 2022-10-20 19:41:48 -07:00
_message.json.jbuilder revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30
_note.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
_portal_config.json.jbuilder chore: Add missing locale info in portal API (#5177) 2022-08-03 10:33:48 +05:30
_team.json.jbuilder chore: Improve search, list performance of contact/conversation APIs (#2696) 2021-07-23 18:39:24 +05:30
_user.json.jbuilder chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
_widget_message.json.jbuilder revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30