iachat/app/models/concerns
Muhsin Keloth 35d0a7f1a7
feat: Add liquid template support for WhatsApp template parameters (#12227)
Extends liquid template processing to WhatsApp `template_params`,
allowing dynamic variable substitution in template parameter values.

Users can now use liquid variables in WhatsApp template parameters:

```
{
  "template_params": {
    "name": "greet",
    "category": "MARKETING",
    "language": "en",
    "processed_params": {
      "body": {
        "customer_name": "{{contact.name}}",
        "customer_email": "{{contact.email | default: 'no-email@example.com'}}"
      }
    }
  }
}

```

When the message is saved, {{contact.name}} gets replaced with the
actual contact name.

Supported Variables

- {{contact.name}}, {{contact.email}}, {{contact.phone_number}}
- {{agent.name}}, {{agent.first_name}}
- {{account.name}}, {{inbox.name}}
- {{conversation.display_id}}
- Custom attributes: {{contact.custom_attribute.key_name}}
- Liquid filters: {{ contact.email | default: "fallback@example.com" }}
2025-08-21 16:44:51 +05:30
..
.keep
access_tokenable.rb
account_cache_revalidator.rb
activity_message_handler.rb fix(revert): "fix: Send CSAT survey only when agent can reply in conversati… (#11634) 2025-05-29 16:52:33 -06:00
assignment_handler.rb
auto_assignment_handler.rb
availability_statusable.rb
avatarable.rb
cache_keys.rb
channelable.rb
content_attribute_validator.rb
conversation_mute_helpers.rb
featurable.rb
json_schema_validator.rb
label_activity_message_handler.rb
labelable.rb
liquidable.rb feat: Add liquid template support for WhatsApp template parameters (#12227) 2025-08-21 16:44:51 +05:30
llm_formattable.rb
message_filter_helpers.rb
out_of_offisable.rb
priority_activity_message_handler.rb
pubsubable.rb
push_data_helper.rb
reauthorizable.rb
reportable.rb
sla_activity_message_handler.rb
sort_handler.rb
sso_authenticatable.rb
team_activity_message_handler.rb
user_attribute_helpers.rb