Have you ever wondered how to only show certain content to select email recipients?
Well, show/hide blocks allow you to do just that! This function allows you to show content to some profiles based on their saved properties or events, and different content to other profiles based on their saved properties/events, all within one email. So, you don’t have to send multiple different emails to different audiences, if you don’t want to.
In the new email editor, select ‘Display Options’ for any section or specific block. Here, you will find the ‘show/hide logic’ entry. This is where we will add our logic of who will see this specific block.
To show a block based on a saved profile property, every show/hide logic statement will follow this structure: person|lookup:’Name of Property Here’ . Please ensure capitalization matches exactly to how the property looks on the profile. That statement, will simply show the blocks if the person viewing has that property saved on their profile, at all.
If you want to show the block based on a specific answer (or, value) that someone has for their saved property, then the logic would be as follows: person|lookup:'Name of Property Here' == 'Value you’re looking for' . Please remember to include two equal signs (==), regardless of the value.
So, if I wanted to show a block to only people that have green saved as the value, for the profile property Favorite Color, then it would look like this: person|lookup:'Favorite Color' == 'green'
Next, you can also use numeric values and show/hide blocks based on less/greater than for these values. The format of this would look like the following: person|lookup:'Property Name Here' > Numeric Value .
For example, if you wanted to show the block for viewers that have their age logged as greater than 20, the condition would be: person|lookup:'Age' > 20
With these conditions, the inequalities can be replaced with:
- person|lookup:'Age' > 20 = The Age property contains a number greater than 20
- person|lookup:'Age' >= 20 = The Age property contains a number greater than or equal to 20
- person|lookup:'Age' < 20 = The Age property contains a number less than 20
- person|lookup:'Age' <= 20 = The Age property contains a number less than or equal to 20
Numeric value show/hide conditions are great for tracking loyalty points as well.
Lastly, you can show/hide blocks based on a value in a list of values, for a profile property. For this, the conditional structure is: 'Value you’re looking for, can be more than one' in person|lookup:'Profile Property Name Here'
IE: If someone has multiple different colors listed as their favorite color for the profile property, then we can pull in anyone who has at least green listed by using: 'green' in person|lookup:'Favorite Colors'
If you wanted the block to show to anyone that has green and red listed as their favorite color (more than one value) then the condition would be: 'green, red' in person|lookup:'Favorite Colors'
Finally, you can do the inverse of the list option as well. So, if you want to show the block to everyone that does not have a certain answer listed. The conditional statement of this would be: not ‘value’ in person|lookup:'Profile Property Name Here'
So, if you wanted to show this block to everyone that does not have green listed as an answer in their profile property ‘Favorite Color’, this would be: not 'green' in person|lookup:'Favorite Colors' .
Show/Hide logic is great for customizing emails without having to create separate emails for audiences. This tool is powerful for personalizing content and reaching your viewers directly.
Instead of using show/hide blocks, you can also curate your content to your audience by using logic like if/else statements which I’ll go over next time!