Skip to main content

I have a metric-triggered flow in which the subject lines are dynamically populated via event variables. So the subject lines are set up as `{{event.subject_line}}`. When I post an event that has something like `subject_line: “Hey, {{first_name}}”` in the event payload, the subject line in the sent email looks exactly like that - it says “Hey, {{first_name}}”, without populating that name. Is there any way to make this work as desired (i.e. the first name set in the profile would actually be inserted)?

Hi @kristinab,

 

Use `person.first_name` for profile properties! You can use profile properties in metric-based flows, but you need to use `person` rather than `event`.

You can use both `event` and `person` within a metric based flow.

 

Cheers,

Kevin.


Thanks for the response Kevin!

Just to make sure I’m being clear, I’m attempting to use `{{first_name}}` as part of the value of the `event.subject_line` key - so there’s a nesting situation here that doesn’t appear to be working properly. I will try `{{person.first_name}}` instead, but I’m not sure that’s going to change anything.


@kristinab,

I’m so sorry–I totally misread your comment.

I have no idea if this is going to work and my assumption is it will not work. Regardless, I think you would need the `person.` anchor if it does work at all…

 

Let us know what happens!


Thanks again! Will do some testing and see if I can find a way to make it work :) 


In case anyone is curious - I haven’t found a way to make this work (yet).


@kristinab,

The Klaviyo editor has the option to allow you to select the variable you need for first name.

I would suggest you to use this when adding variables just to be sure.

Now, since not all profiles have their first name populated I suggest to always have fallbacks when you're using variables. Make sure you're using the First name variable you've stored in Klaviyo.

{{ first_name|default:"FALLBACK TEXT HERE" }}

 

 

Omar Lovert // Polaris Growth // Klaviyo Master Platinum Partner

We help with e-commerce growth through CRO, Klaviyo and CVO


If the event property itself has django variable tagging, e.g. {{ first_name }}, I don’t think you’d be able to have two levels of variable replacement, iu.e. where it first fetches, say, “Hey, {{first_name}}” from the event body, and then replaces {{ first_name }} with the actual profile name.

You’d have to include the already rendered name in the event body. 


Reply