Forum Discussion
Can Liquid be passed in Custom Event Properties?
Hey Braze Community!
I’m trying to set up a Canvas campaign to deliver personalized notifications to users over a time period. The Canvas is triggered by a custom event with a payload like this
[
{
"external_id": "78647",
"app_id": "a5a9dfc3-0511-42d4-a2c6-1759645e30a8",
"name": "Purchase Milestone Reached",
"time": "2025-01-08T20:08:23.480Z",
"properties": {
"body": "Congrats on your new purchase!",
"deepLink": "https://www..google.com",
"deliveryId": 12345,
"liquidBody": "Congrats on your new purchase. Call {% catalog_items Purchase_PushNotifications {{custom_attribute.${organizationId}}} %} {{ items[0].PN_name | default: 'your representative' }} for a free upgrade.",
"milestoneType": "upgrade",
"notificationType": "PREMIUM",
"templateId": 107,
"title": "✨ Congratulation!"
},
"_update_existing_only": false
}
]
I’ve set up a message step in the Canvas to send iOS and Android notifications. To handle the notification content dynamically, I’m using the following Liquid logic:
{% if canvas_entry_properties.${liquidBody} %}
{{ canvas_entry_properties.${liquidBody} }}
{% else %}
{{ canvas_entry_properties.${body} }}
{% endif %}
The idea is that if the liquidBody property exists in the event payload, the notification should use it as the content. Otherwise, it should fall back to the body property.
The Issue
The liquidBody property contains a dynamic Liquid template, but when the notification is sent, the template is rendered literally as a string rather than being dynamically evaluated and resolved. For example, placeholders like {% catalog_items ... %} are not being processed; they appear in the notification as-is.
My Question
Is it currently possible in Braze to pass dynamic Liquid templates (e.g., the liquidBody property) through an event payload and have them evaluated dynamically in the final push notification?
If not, is there another way to achieve this? My goal is to generate these templates dynamically outside of Braze and have them rendered properly within notifications. I’d appreciate any suggestions or guidance on whether this is achievable, or if there are alternative approaches that might work better!
Thanks in advance for your help!
Related Content
- 3 months ago
- 8 months ago