Skip to main content
Solved

Showing block if someone does not have proporty

  • February 16, 2023
  • 3 replies
  • 214 views

Forum|alt.badge.img+2

Hi,

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.

Best answer by Ashley I.

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:

  1. Create a campaign or flow message
  2. Add an image/text block
  3. Upload the Value A image/text to the block
  4. Click Display Options from the image block’s customization menu
  5. Click Create Logic
  6. Add this condition: person|lookup:'PropertyName' == 'ValueA’ 
    1. Note: Input your Property Name and Variable name in place of the  placeholder text above, but keep the outside quotations as written
  7. Click Save Changes 
  8. 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:

  • Customer who chose “Value A” 
  • Customer who chose “Value B”
  • And customers with no preference/other preference


You can read more about How to show or hide template blocks and sections based on dynamic variables (new editor) in this Help Center article, or if you are using the Classic Editor there is additional documentation provided here: How to show or hide template blocks based on dynamic variables (classic editor)

--

Hope this helps!

-- Ashley Ismailovski

View original
Did this topic or the replies in the thread help you find an answer to your question?

3 replies

JessFosnough
Expert Problem Solver IV
Forum|alt.badge.img+23
  • Expert Problem Solver IV
  • 195 replies
  • February 16, 2023

Hi @Bas3009,

This syntax has worked for me in the past:


not person|lookup:'Klant'

 

Hope that helps!

 


Ashley I.
Partner - Platinum
Forum|alt.badge.img+39
  • 2025 Champion
  • 242 replies
  • Answer
  • February 16, 2023

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:

  1. Create a campaign or flow message
  2. Add an image/text block
  3. Upload the Value A image/text to the block
  4. Click Display Options from the image block’s customization menu
  5. Click Create Logic
  6. Add this condition: person|lookup:'PropertyName' == 'ValueA’ 
    1. Note: Input your Property Name and Variable name in place of the  placeholder text above, but keep the outside quotations as written
  7. Click Save Changes 
  8. 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:

  • Customer who chose “Value A” 
  • Customer who chose “Value B”
  • And customers with no preference/other preference


You can read more about How to show or hide template blocks and sections based on dynamic variables (new editor) in this Help Center article, or if you are using the Classic Editor there is additional documentation provided here: How to show or hide template blocks based on dynamic variables (classic editor)

--

Hope this helps!

-- Ashley Ismailovski


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • February 16, 2023

@Ashley I. Thanks you! That works!

@JessFosnough Have not tried but thx for the quick response