If you want to show a particular block of your email to some of an email’s recipients, but not to all, you can use the email template editor’s show/hide feature to ensure that your email is personalized to the right group.
In this example, we’ll walk through how to use this feature to show different blocks based on a custom property, namely, someone’s shopping preferences.
Before You Start
While you can show/hide blocks based on customer activity and basic demographics that come into your Klaviyo account through general engagement, collecting information directly from your customers is crucial to sending highly personalized emails.
In this example, we're using an embedded form on our checkout page to gather preference and email frequency information about our customers.
Using this preference information, we’re going to personalize the creative work in a product release email.
Crafting the Email
After you’ve created the email as a campaign, email template, or flow email, click into the email to edit it. In this case, we’re going to use different image blocks depending on someone’s preferences.
To do this, we’ll drag in an image block, upload one of the images we want in the email, and select the question mark. We want this first image to only display to customers who have the set preference of "Work." Because of this, we will select On and set the Condition to:
person|lookup:’Bag Preference’ = ‘Work’.
To break this down, "person" refers to the profile within Klaviyo. "Lookup" simply looks into their account for the values you choose. On our signup form, we’re collecting a value called Bag Preference.
In this specific instance, if someone has selected "Work" as an option on the signup form, they will see this block. If they haven't seen the form or selected a different option, they won't see it.
Likewise, someone who has set the preference to Outdoors will receive an email with the following image.
You can repeat the same process, but you’ll need to add in an image for customers who have not filled out the form. To do that, insert a more general image and click the question mark as described above. The condition should be slightly different:
person|lookup:'Bag Preference' != 'Work' and person|lookup:'Bag Preference' !=
'Travel' and person|lookup:'Bag Preference' != 'Outdoors' and not person|lookup:'Bag
The last line will show the general image to customers who have never filled out the form and do not have a preference set.
Preview the Email
Before sending, preview the email with the various different conditions to ensure that your email will look as desired. For example, in the case that someone has not filled out the form, the email will look like the following.
You can use this same tactic to show text, images, links, and much more to your recipients, further personalizing and targeting your messaging.