Liquid
49 TopicsBraze Connected Content Deep Dive (W/ Cat Facts!)
Cat Facts are back! There's so many cool use cases for Connected Content, and if you want to get started with some practice right away, the Free Public Cat Fact API is our go to! In this video, we test what happens if we use a broken URL, and where we can get some more error insights inside the Braze Dashboard. Did you know? - All cats need taurine in their diet to avoid blindness. Cats must also have fat in their diet as they are unable to produce it on their own. - Relative to its body size, the clouded leopard has the biggest canines of all animals’ canines. Its dagger-like teeth can be as long as 1.8 inches (4.5 cm). - Despite imagery of cats happily drinking milk from saucers, studies indicate that cats are actually lactose intolerant and should avoid it entirely.6Views0likes0CommentsBraze Tutorial: How To Send A 6-Month Renewal Reminder Email
Happy Friday everyone! A fun video we made last week on how to send a 6-month reminder email. Understanding the date filter and unix time really unlocks SO many different time-related use cases. And while it still feels hacky… “abort everyday except one” is still the solution for many use cases also 🙏🏻 Let us know any questions!45Views1like0CommentsUsing Liquid to identify users in a segment
I'd like to have an element of an email show or hide based on if a user is within a segment using - Is this possible with Liquid? I've been hitting a brick wall with this and any solution i've found seems unnecessary convoluted - Am I missing something here? Thanks in advance!77Views0likes2CommentsLiquid: Can I add a variable to abort_message() function
Is there a way to pass in a variable or attribute when using abort_message() function? I've checked the documentation but I can't see a way to do it. I've tested variations and can only get plain text to work. // this works abort_message('my abort reason') // this doesn't work {% assign abort_reason = 'reason1' %} abort_message({{reason1}}) abort_message('{{reason1}}')Solved57Views0likes3Commentsnesting liquid and using custom event properties in action trigger canvas
I'm building a action-triggered canvas that will send a message to a member to say "oh hey, you've looked at this content item recently, please leave a review about it by following this link". There's a custom event that will trigger the canvas and that custom event has a property for the ID of the content they've looked at. The contentID corresponds to an item in a Braze catalog we have, that allows us to cross reference a pretty name for it based on the ID. e.g. this Liquid generates the pretty name text, based on a hard-coded ID {% catalog_items Content 650ac023409211513f7bc7cf %}{{ items[0].prettyname}} where 'Content' is the name of the catalog '650ac023409211513f7bc7cf' is an id for the item 'prettyname' is the field in the catalog containing a pretty description What I need to figure out is how to pull and embed the contentID from the property of the triggering event that starts the canvas and use that to dynamically create the liquid to fetch the pretty name. I'm assuming it's something like this to get the property value out of the custom event that triggers the canvas {{event_properties.${ID}}} but when I replace my hard-coded ID with that, I get a Liquid error {% catalog_items Content {{event_properties.${ID}}}}{{ items[0].prettyname }} Guidance/help gratefully received!Solved95Views0likes2CommentsLiquid arrays personalization
Hello everyone I'm trying to implement this liquid code in one of my templates: {% assign combinedResults = canvas_entry_properties.${data}.results | concat: canvas_entry_properties.${data}.featuredResults %} {% assign results = combinedResults | sort: 'totalEstimatedCost.amount' | reverse %} The arrays canvas_entry_properties.${data}.results and canvas_entry_properties.${data}.featuredResults are two arrays that contain a list of offers, with each offer having a name, an ID, and a totalEstimatedCost.amount Using this Liquid code, I want to first create a third array called combinedResults that merges the offers from both canvas_entry_properties.${data}.results and canvas_entry_properties.${data}.featuredResults. Then, I want to sort this combined array so that the offers are displayed in descending order based on totalEstimatedCost.amount, from the highest to the lowest price However, the issue is that the displayed list first shows the two offers from the featuredResults array sorted in ascending order (from the smallest to the largest price), followed by the five offers from the results array sorted in descending order (from the largest to the smallest price). Do any of you know why this could happen? the structure of the original arrays is the same. Thank you in advance!98Views1like2CommentsHelp: Liquid logic, conditional messaging & nested custom attributes.
Hello! I need help understanding where i'm going wrong with my conditional messaging. Is it possible to search and dynamically pull a specific value from a nested profile using Liquid code in a Braze email? Example: Users have a nested custom attribute called 'Colour'. User 1 is associated with two profiles: Company A (nested profile [0]) and Company B (nested profile [1]). The value of 'Colour' for Company A is 'Green', while for Company B it is 'Purple'. How can I dynamically retrieve the 'Colour' value for a specific company (e.g., Company A)? Note: I haven't used [] indexing as I want to look across all associated profiles per user to filter down for the correct value (example above). And the testing code: {% assign found = false %} {% for Partner_Name in custom_attribute.Profiles %} {% if Partner_Name == "Onsi" %} Your partner ID is {{custom_attribute.${Profiles}.Partner ID}}. {% assign found = true %} {% endif %} {% endfor %} {% unless found %} You do not have a partner ID associated with this account. {% endunless %} Thank you for any help or suggestions you have!166Views4likes5CommentsHow 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!Solved916Views0likes7CommentsConnected content making 2 calls
Hi I have this connected-content in email template; but when I send out, its always making two POST API calls; I'm adding customers in a list in a survey module and every time my canvas sends out email; it adds customers twice. Is there any way to prevent this? Thanks //Waqas {% capture payload %} { "contactDetails": "{{${email_address}}}" } {% endcapture %} {% connected_content {{ url }} :method POST :headers { "Content-Type": "application/json", "X-API-KEY": "xxx" } :body {{payload}} :content_type application/json :no_cache :save add_response %}97Views0likes3CommentsAudience Path through event properties
Hello community! I need your help to set up a Canvas Flow: Context: In our subscription we are customising the unsubscribe flow based on the reason. We register this reason as an event property of the event that triggers the flow ( subscription cancel complete). Problem: It does not find the way to direct the users in a flow or another depending on the property of the event, since the ''audience path'' tool does not allow to split by event property. How would you do it? I could do it through conditions and liquid, but the flows are not exactly the same for all properties/reason. Thank you very much!Solved139Views1like4Comments