iachat/spec/services/whatsapp
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
..
providers feat: handle Channel errors (#11015) 2025-03-06 20:09:47 +05:30
incoming_message_service_spec.rb fix: Avoid processing reactions, ephemeral, request_welcome or unsupported messages (#8780) 2024-01-25 11:40:18 +04:00
incoming_message_whatsapp_cloud_service_spec.rb fix: Check valid params exists in WhatsAapp payload (#6780) 2023-03-30 12:10:59 +05:30
send_on_whatsapp_service_spec.rb fix: Add support for named parameter templates in WhatsApp (#11198) 2025-03-28 14:07:03 -07:00