iachat/spec/factories/channel
Pranav 9fb3053007
fix: Add support for named parameter templates in WhatsApp (#11198)
The expected payload on WhatsApp Cloud API is the following. 
```json
{ 
  "template": {
    "name": "TEMPLATE_NAME",
    "language": {
      "code": "LANGUAGE_AND_LOCALE_CODE"
    },
    "components": [
         "<NAMED_PARAMETER_INPUT>",
         "<POSITIONAL_PARAMETER_INPUT>"
     ]
  }
}
```
Named templates expect a `parameter_name`

```json
{
   "type": "body",
    "parameters": [
      {
        "type": "text",
        "parameter_name": "customer_name",
        "text": "John"
      },
      {
        "type": "text",
        "parameter_name": "order_id",
        "text": "9128312831"
      }        
    ]
}
```

In this PR, we would check if the template is a name template, then we
would send the `parameter_name` as well.

Reference: https://github.com/chatwoot/chatwoot/issues/10886
2025-03-28 14:07:03 -07:00
..
channel_api.rb Feature: API Channel (#1052) 2020-07-21 12:15:24 +05:30
channel_email.rb fix(refactor): Cleanup the specs and the logic for FetchIMAP job (#8766) 2024-02-10 14:03:50 -08:00
channel_instagram.rb feat: Added Instagram channel migration (#11181) 2025-03-26 11:12:32 +05:30
channel_line.rb feat: Line Channel (#2904) 2021-09-11 01:31:17 +05:30
channel_sms.rb chore: Provider APIs for SMS Channel - Bandwidth (#3889) 2022-02-03 15:22:13 -08:00
channel_telegram.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
channel_whatsapp.rb fix: Add support for named parameter templates in WhatsApp (#11198) 2025-03-28 14:07:03 -07:00
channel_widget.rb Chore: Web widget Inbox Tech Debts (#738) 2020-04-19 23:40:28 +05:30
facebook_pages.rb Chore: Web widget Inbox Tech Debts (#738) 2020-04-19 23:40:28 +05:30
instagram_channel.rb fix: Automatically remove expired story mention (#5300) 2022-12-08 15:55:24 +03:00
twilio_sms.rb feat: Support Twilio Messaging Services (#4242) 2022-07-08 18:20:07 +05:30
twitter_profiles.rb Chore: Web widget Inbox Tech Debts (#738) 2020-04-19 23:40:28 +05:30