I am creating a conditional content block in my e-mail. It is triggered by the property person.Klant
I am able to display specific content for persons having specific values of this property:
person.Klant == “Value A”
person.Klant == “Value B”
However some profiles in my list do not have this custom property at all. I would like to show specific content if then don’t have the person.Klant proporty. Have tried al kind of syntaxes but can’t get this working:
not person.Klant
person.Klant == “”
person|lookup:'Klant' != ''
Please help.
Page 1 / 1
Hi @Bas3009,
This syntax has worked for me in the past:
not person|lookup:'Klant'
Hope that helps!
Hi @Bas3009 ,
Welcome to the Community! Thank you for the excellent question about dynamic content blocks.
Whether you are using the Classic Editor or the New Editor for your email templates, Klaviyo makes it easy to display dynamic content to your subscribers based on Properties you have collected about them.
For your use case, you would need to display 3 different dynamic content blocks: 1 for Value A, 1 for Value B, and 1 for all others that do not equal Value A or Value B.
It sounds like you have already been successful in configuring dynamic content for the cases of Property = Value A and Property = Value B, but I’ll reiterate that process in case anyone reading along later is unfamiliar:
Create a campaign or flow message
Add an image/text block
Upload the Value A image/text to the block
Click Display Options from the image block’s customization menu
Click Create Logic
Add this condition: person|lookup:'PropertyName' == 'ValueA’
Note: Input your Property Name and Variable name in place of the placeholder text above, but keep the outside quotations as written
Click Save Changes
Click Done on the block
This block will show only to people who have selected “Value A” as their preference.
Next, add in the Value B image/text to a new block under the Value A content. Follow the same steps as before, but this time, use the condition person|lookup:'PropertyName' == 'ValueB'.
This block will only show to people who have selected “Value B” as their preference.
For where you are stuck, you will need to add a third content block to appear for anyone who hasn’t selected either “Value A” or “Value B” Use a more generic image/text, and this condition: person|lookup:'PropertyName' != 'ValueA' and person|lookup:'PropertyName' != 'ValueB'.
This block will show to people who have chosen something other than “Value A” or “Value B” or have never selected a preference.
Once you’ve configured each of the blocks, preview your message using 3 profiles. These profiles should be subscribers who meet one of each of the image criteria: