I have a loyalty program that is integrated with Klaviyo and is successfully passing its variables to customer profiles. For some reason, I can see the loyalty points variable values in Klaviyo but I can’t get the value to show in my email campaigns. Is it just a syntax issue?
My steps…
Look up myself as the test subject to confirm the loyalty points custom property I want to display is present and has a valid value. In this case, the property is labeled “KR_PTS” and it is showing a value of 50. So far so good. Ideally, I’d like to set up a show/hide conditional I want to display a text block for anyone that has this value present in their profile and the value is greater than 0 (show if they have 1 or more points).
Create a campaign email with a text block with conditional formatting containing the following: person|lookup:'KR_PTS' > 0
Insert a text block with the following syntax: {{ person|lookup:'KR_PTS' }}
Send a test message to myself at the same email address in my profile.
Result: The text box is hidden because the logic didn’t meet the criteria to display. If I remove the show/hide logic and send. Instead of showing the value 50, it instead says “None” (confirms why it was originally hidden).
Do I just have the wrong syntax or is there another issue I’m missing?
In my profile, custom property for KR_PTS shows a value of 50:
In my campaign email, setting the show/hide logic on my text block (show text block if KR_PTS is greater than 0):
Set the variable to display the value of KR_PTS in my text block:
Result in email:
Page 1 / 1
It looks like you're on the right track, but there are a few things you might need to adjust to get this working correctly in Klaviyo. Here’s a step-by-step approach to troubleshoot and correct the issue:
1. Confirm Custom Property Naming and Syntax
Ensure that the custom property name is exactly correct. In Klaviyo, property names are case-sensitive and need to be exact. Double-check that "KR_PTS" matches the exact property name in your profile.
2. Use Correct Lookup Syntax for Conditional Logic
In Klaviyo, the syntax for using properties in conditional logic can be a bit specific. Instead of using person|lookup:'KR_PTS', try:
For Conditional Logic (to show/hide content):
{% if person.KR_PTS > 0 %} <!-- Content to display when KR_PTS is greater than 0 --> {% endif %}
This will ensure that the text block displays only if the condition is met.
For Displaying the Value:
To display the value of KR_PTS in your email, use:
{{ person.KR_PTS }}
Make sure there are no extra spaces or syntax errors in your code.
3. Verify Data Availability in Profiles
Ensure that the KR_PTS property is not only present but also correctly associated with the test profile you're using. Sometimes properties might appear in a profile but not be correctly populated for all segments or test data.
4. Review Email Testing
When you send a test email, make sure the test profile you are using indeed has the KR_PTS property and its value set correctly. Sometimes, test emails may pull from different profile data or segments, which can cause discrepancies.
5. Debugging
Try adding a temporary debug text block to confirm the value is being pulled correctly. For example, you can use:
{{ person.KR_PTS | default: "Value not found" }}
This will show "Value not found" if the property isn't retrieved correctly, helping you understand if the issue is with data retrieval or with the conditional logic.
Summary
Verify Syntax: Make sure your syntax matches the examples provided.
Check Profile Data: Ensure the KR_PTS property is set and available in the test profile.
Use Correct Liquid Syntax: Implement the correct conditional logic and property display syntax.
If you follow these steps and make the necessary adjustments, you should be able to get your loyalty points to display correctly in your Klaviyo email campaigns.
I don’t understand where I’m going wrong. I can see in my own personal Klaviyo profile that there is a custom property variable named “KR_PTS” and the value is “50”, but to keep it as simple as possible for troubleshooting, removing block conditionals or anything fancy, even a simple request to just show the value of the variable isn’t working. I’ve confirmed the email address in my profile is exactly the same as the address used when sending the test email and there’s no issue with the email arriving in my in box. The syntax in my email setup is as below but only returns “None”.
In my personal profile details in Klaviyo under “Custom properties”:
Script I’m putting in my campaign email text block (copy/pasted from my profile to ensure exact match):
{{ person|lookup:'KR_PTS' }}
Result in the test send:
I’m stumped.
Definitely not a syntax issue. I’ve looked up all these help threads, their documentation, USED THE PERSONAL PROPERTY INJECT TOOL, asked GPT, and nothing works. Major bug on their end they consider “solved”.