Liquid
49 TopicsHow to change the date format in an email using liquid
Hi everybody, greetings from Germany! I want to display the date format of a custom property in an email in a different way. In the propery, we save the date in this format: YYYY-MM-DD hh:mm:ss. I'd like to display the property in the email in this format: DD.MM.YYYY Does anybody know how I can achieve that? Thanks so much for your support!Solved963Views0likes7CommentsLiquid help to personalise dates as "today", "tomorrow" and yesterday
Hello friends, Hope you are all well. I need some liquid help from you. We are using a date from the canvas_entry_property i.e. {{canvas_entry_properties}}.${{creation_date}} and we want to use the {{creation_date}} to personalise our messaging for example "thanks your account is active with us since "yesterday", from "today", or from "tomorrow" else for future dates we want to call the {{creation_date}} with a filter to represent the date as 27 Apr etc. {{creation_date}} is in UTC format. Appreciate some guidance here Cheers RajSolved954Views1like3CommentsLiquid logic - using a conditional within forloop
Hi all! I'm running into an issue where my liquid logic is breaking my email... not sure if i'm doing something wrong or if what i'm trying to do isn't possible... I'm trying to use a conditional within a forloop using canvas entry properties... i've followed the template below but the email won't even send when i test it: {% for item in {{canvas_entry_properties.${array}}} %} {% if {{item.metric}} > 1 %} {{item.image}} {% endif %} {% endfor %} i know the conditional is breaking it because the email sends successfully when i remove it. anybody know what's going on here?Solved942Views0likes6CommentsI've created a beginner liquid 'for loops' tutorial. Would love some feedback.
Hi all I've started working on a series of videos to help unpack some liquid terms to help others and teach myself along the way. After recently needing 'for loops' to solve a problem I started by making a tutorial on those. Even though this video is a smidge more advanced, I plan to do quite a few videos, especially for beginners. Would love you to check it out, write comments, subscribe, and provide any feedback on ease to follow, length, or any thoughts at all. I want these to be a useful tool for all Braze (and liquid) users. Discover the power of liquid for loops in Braze: Beginner tutorial - YouTube922Views10likes6CommentsLiquid Country Help Please!
I am trying to create a piece of dynamic content that shows for multiple countries. I have created this code which worked a few weeks ago, but now isn't working: {% if {{${country}}} == 'ID' and 'AE' and 'TR' and 'EG' and 'SA' and 'PK' and 'BD' and 'MY' and 'NG' %} I have tried with or and that doesn't work either! Any help would be massively appreciated, thank you.873Views1like6CommentsChanging currency code to a symbol & title case conversion for multiple words
I'm new here so hi everyone - nice to meet you! I'm trying to figure out if I'm able to change a currency code to a symbol by using filters or similar. Is that possible? Also, is there a way to capitalize the first letter of each word in a string, rather than just the first word? Thank you!Solved859Views0likes4CommentsPersonalization with Liquid using purchase events on order level
Hello, I am trying to personalize an email based on purchase event on order level. Here it says that event properties schema could not be generated for purchase events, but that the nested data is supported by purchase events. Is nested objects even supported for purchase events on order level? This is the event that I am using: { "purchases": [ { "external_id": "2023_new", "product_id": "Completed Order", "currency": "USD", "price": 219.98, "properties": { "products": [ { "name": "Monitor", "category": "Gaming", "product_amount": 19.99 }, { "name": "Gaming Keyboard", "category": "Gaming ", "product_amount": 199.99 } ] }, "time": "2024-06-20T13:59:30+01:00" } ] } So can you please clarify how can we add liquid tag in order to display the name of the first product - "Monitor"? Looking forward for your reply! Many thanksSolved848Views1like6CommentsLoop through a catalog to display the product a user has as a custom attribute
Hello, So I am trying to display some Liquid logic into an email template. The idea is that I have a catalog named house_properties with fields: id, name and description. Each user has a custom attribute called user_product_id which we should use in the Liquid code to display the name of the product from the catalog if the two id's are the same. This is the Liquid code I have been using, but apparently is not working. Can someone please let me know what am I missing here? {% assign user_product_id = {{ custom_attribute.${user_product_id} }} %} <!-- Loop through each row in the catalog --> {% for row in house_properties %} <!-- Loop through each item in the current row --> {% for item in row %} <!-- Check if the item name contains the user's custom attribute --> {% if item.id == {{ custom_attribute.${user_product_id} }} %} {{ item.name }} {% endif %} {% endfor %} {% endfor %} Thank you in advance! Elena623Views0likes4CommentsA Beginners Guide to Braze Liquid Language
Hi All I've noticed there have been a few questions about basic liquid concepts in Braze, especially language localization. To support this, I have put together a complete beginner tutorial video for anyone wanting to get started with liquid specifically for Braze (which everyone should because it's magic 🪄). Topics I cover: - The basics (objects, filters, tags) - Adding first names - Capitalizing first names - Setting defaults when there are no first names - If / else statements - Basic language localization I have tried to include as many useful real-world examples as I could for beginners to get you going. I hope it is useful for this community and feel free to share it with anyone you know who is new to Braze. A Beginner's Guide to Braze Liquid: Mastering the Basics - YouTube 😊618Views3likes2Comments