Forum Discussion
nesting 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!
You haven't closed the catalog initialization operation properly. You're missing a "%" before the last closing curly bracket. The code below should work.
{% catalog_items Content {{event_properties.${ID}}} %}{{ items[0].prettyname }}
- ArsoExpert
You haven't closed the catalog initialization operation properly. You're missing a "%" before the last closing curly bracket. The code below should work.
{% catalog_items Content {{event_properties.${ID}}} %}{{ items[0].prettyname }}
Related Content
- 2 months ago
- 5 months ago
- 2 months ago