liquid
41 TopicsLiquid 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 RajSolved871Views1like3CommentsLiquid 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?Solved861Views0likes6CommentsLiquid 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.838Views1like6CommentsChanging 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!Solved786Views0likes4CommentsPersonalization 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 thanksSolved729Views1like6CommentsI'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 - YouTube713Views10likes6CommentsHow 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!Solved659Views0likes5CommentsData Feeds and Vouchers personalization
For those of you who work with Data Feeds — specifically Voucher type — If I have 1,000 vouchers, and use in an email to send to 5,000 people, after the first 1,000 are used, Is this possible — will it continue sending if there are more users than vouchers? (I can't find documentation on data feeds and it's marked as 'beta' in my dashboard) if so, what will the feed code — {% voucher('MyFeedCode') %} return for the remaining users? Null? Empty? Empty array? In a nutshell, I'm wondering if I can send a set amount of vouchers in a campaign and personalize content to say 'sorry, maybe next time' if I've run out of codes. Any help is appreciated.588Views0likes5CommentsLiquid Code to Exclude Generic Emails such as Yahoo and Hotmail
Hello (and help) I am trying to build liquid code that will exclude users who have non-business email addresses (yahoo, gmail, hotmail etc) and include users with certain words in their job titles I am using the following which is not working. Any ideas where it is going wrong? Much appreciated {% if{{custom_attribute.${job_level}}} matches regex “director” or {{custom_attribute.${job_level}}} matches regex “ceo” or {{custom_attribute.${job_level}}} matches regex “SVP” or {{custom_attribute.${job_level}}} matches regex “Head of” and {{custom_attribute.${email_address}}} does not match regex “yahoo” or {{custom_attribute.${email_address}}} does not match regex “gmail” or {{custom_attribute.${email_address}}} does not match regex “aol” or {{custom_attribute.${email_address}}} does not match regex “hotmail” Message to users {% endif %}Solved577Views0likes4CommentsPLEASE BRING IT/BRING IT BACK: Color Coding in JSON and Liquid
Hi Braze, As of yesterday/today, I noticed that the Webhook Editor no longer supports color-coded liquid. I think having that color support is huge, especially for beginners who are writing Liquid for the first time. The color-code is the only reason I remain on the old HTML editor version. Are there any plans to bring back any sort of color-coding for Liquid in all other channels? Any new color support for JSON? Thank you!Solved527Views1like4Comments