Skip to main content

Just wanted to share with you the output of an hour of work involving Klaviyo support. Because it doesn’t seem to be well documented. And it’s not been tested rigourously enough so that’s my disclaimer. 

For the show/hide conditional logic on a text block, we can use 

person|lookup:'first_name'

as the criteria. On the first version of this block we will then write the paragraph with 

Hey {{ first_name|default:''|title }},

as the start. Then we will duplicate the block and put this code below in its conditional settings.

first_name=""

This time we will start the sentence out as if there is no first name. 

If this works properly, then I prefer it to the built-in method because we can address the sublteties of grammar this way. 

Hey @mrt2060 

Thank you so much for sharing work with the community! This is exactly the kind of content we love to see, members helping other members succeed! @ebusiness pros @AlexandraPalau @Bobi N. @Bobby @retention @KatherineB @Omar @bluesnapper @Ashley I. are some of our Community Champions who work with a lot of different brands. Maybe the champs can help test this out and validate for the rest of the community to use?


Welcome to the community @mrt2060 and thanks for sharing.

There are instances where I don’t want to use a fallback (or It just won’t work well as you’ve stated). So I create text blocks each with display logic which is what I think you have done.

I do this with opening salutation/firstname but I also use it to show/hide other blocks in email e.g unused discount code, free shipping based on cart value etc 

To confirm:

person|lookup:'first_name' only displays the block if the first name is populated. 

person|lookup:'first_name' = "" only displays the block if the first name is NOT populated. 

Which is what you’ve identified,

Thanks for the shout-out @stephen.trumble 

Regards

Andy


Reply