iachat/app/javascript/dashboard/components/widgets/conversation
Muhsin Keloth 99997a701a
feat: Add twilio content templates (#12277)
Implements comprehensive Twilio WhatsApp content template support (Phase
1) enabling text, media, and quick reply templates with proper parameter
conversion, sync capabilities, and feature flag protection.

###  Features Implemented

  **Template Types Supported**

  - Basic Text Templates: Simple text with variables ({{1}}, {{2}})
  - Media Templates: Image/Video/Document templates with text variables
  - Quick Reply Templates: Interactive button templates
- Phase 2 (Future): List Picker, Call-to-Action, Catalog, Carousel,
Authentication templates

  **Template Synchronization**

- API Endpoint: POST
/api/v1/accounts/{account_id}/inboxes/{inbox_id}/sync_templates
  - Background Job: Channels::Twilio::TemplatesSyncJob
  - Storage: JSONB format in channel_twilio_sms.content_templates
  - Auto-categorization: UTILITY, MARKETING, AUTHENTICATION categories

 ###  Template Examples Tested


  #### Text template
```
  { "name": "greet", "language": "en" }
```
  #### Template with variables
```
  { "name": "order_status", "parameters": [{"type": "body", "parameters": [{"text": "John"}]}] }
```

  #### Media template with image
```
  { "name": "product_showcase", "parameters": [
    {"type": "header", "parameters": [{"image": {"link": "image.jpg"}}]},
    {"type": "body", "parameters": [{"text": "iPhone"}, {"text": "$999"}]}
  ]}
```
#### Preview

<img width="1362" height="1058" alt="CleanShot 2025-08-26 at 10 01
51@2x"
src="https://github.com/user-attachments/assets/cb280cea-08c3-44ca-8025-58a96cb3a451"
/>

<img width="1308" height="1246" alt="CleanShot 2025-08-26 at 10 02
02@2x"
src="https://github.com/user-attachments/assets/9ea8537a-61e9-40f5-844f-eaad337e1ddd"
/>

#### User guide

https://www.chatwoot.com/hc/user-guide/articles/1756195741-twilio-content-templates

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-08-29 16:13:25 +05:30
..
advancedFilterItems feat: Add support for frontend filtering of conversations (#11111) 2025-03-24 19:39:04 -07:00
components chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
ContentTemplates feat: Add twilio content templates (#12277) 2025-08-29 16:13:25 +05:30
contextMenu chore: Add new tab and copy link to conversation context menu (#12089) 2025-08-04 15:22:20 -07:00
conversation chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
conversationBulkActions chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
conversationCardComponents chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
EmptyState chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
helpers chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
linear chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
WhatsappTemplates refactor: Consolidate WhatsApp template components and improve naming (#12299) 2025-08-26 15:20:53 +05:30
CannedResponse.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
ConversationBasicFilter.vue fix: Fix the translation issue on conversation filter reload (#11513) 2025-05-19 11:18:06 -07:00
ConversationBox.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
ConversationCard.vue chore: Replace Thumbnail with Avatar in conversation card (#12112) 2025-08-07 09:50:24 +05:30
ConversationHeader.vue chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
ConversationSidebar.vue chore: Improve layout styles (#12025) 2025-07-30 13:49:27 -07:00
EmailTranscriptModal.vue chore: Remove old buttons from Vue2 design (#11159) 2025-03-31 17:51:38 -07:00
FilterItem.vue chore: Update chat list header UI (#10573) 2024-12-12 10:12:07 +05:30
MessagePreview.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
MessageSignatureMissingAlert.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
MessagesView.vue fix: Unread badge style issue (#11846) 2025-06-30 22:22:40 -07:00
MoreActions.vue fix: Update design to fix the crowded header (#11633) 2025-05-29 18:45:28 -06:00
OnboardingFeatureCard.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
OnboardingView.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
PriorityMark.vue chore(v4): Update colors (#10700) 2025-01-16 15:27:23 +05:30
ReplyBox.vue feat: Add twilio content templates (#12277) 2025-08-29 16:13:25 +05:30
ReplyEmailHead.vue chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
ReplyToMessage.vue chore: Update buttons in conversation screens - 2 (#11134) 2025-03-21 21:54:54 +05:30
ShopifyOrderItem.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
ShopifyOrdersList.vue feat(apps): Shopify Integration (#11101) 2025-03-19 15:37:55 -07:00
TagAgents.vue feat: Add the ability to mention team in private message (#11758) 2025-07-02 19:57:59 +05:30
TagTools.vue feat: New Scenarios page (#11975) 2025-07-30 19:34:27 +05:30
VariableList.vue fix: Variable search item not showing after braces/commas (#11864) 2025-07-03 19:39:36 +05:30