Skip to main content
Question

Dynamic Variable not Working on some Profiles or sometime with all flow.


Forum|alt.badge.img+2

Why are our dynamic variables not working?
We are using a custom matrics and our emails are HTML designed.
We see it working in preview and test emails, but it's not working in the flow with some profiles. Here you can See in Screenshot. What’s the solution?

 

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

2 replies

zacfromson
Problem Solver III
Forum|alt.badge.img+4
  • 2025 Champion
  • 25 replies
  • March 4, 2025

Hi there - thanks for you questions. I’m happy to help! Here is what you can do to fix the issue. 

 

1. Verify Event Data is Being Passed Correctly

• Ensure that the event.model, event.make, and event.stock_id properties exist for all profiles receiving the email.

• Go to Metrics > View Profile of a user where the variable is not populating and check if the event data contains these properties.

 

2. Use the Correct Syntax for Variables

• Instead of {{ event.model|default:"" }}, try using:

{{ event.model|default:"[Model Not Available]" }}

• This ensures that if the variable is missing, a default value is displayed instead of breaking the template.

 

3. Check If the Flow is Using the Right Trigger

• If this email is triggered by an event, confirm that all profiles triggering the email have the correct event properties.

• If a profile does not have event.model, the fallback/default value should appear.

 

4. Test with Different Profiles

• Go to Preview & Test and choose different customers who should receive the email.

• If the test preview works but the live flow does not, some customers may not have the required event data.

 

5. Ensure Proper JSON Formatting in the Event Data

• If the event data is coming from an integration (e.g., Shopify, API, or webhook), ensure that the JSON structure correctly includes event.model and other variables.

 

6. Debug Using if Statements

• You can add an if statement to ensure the event data exists before displaying it:

{% if event.model %}
  {{ event.model }}
{% else %}
  Model not available
{% endif %}

• This prevents the template from showing empty brackets {{ event.model }} if the data is missing.

 

7. Try Hardcoding a Test Value

• Temporarily replace the dynamic variable with a static value to confirm if the email template itself is working correctly.

• If the static value displays but the dynamic one does not, the issue is with the data, not the template.

 

8. Re-Sync Data if Using a Third-Party Integration

• If the data is pulled from an external system, check if a sync delay or missing data issue is preventing the event properties from populating.


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+17
  • Problem Solver IV
  • 258 replies
  • March 4, 2025

Hello ​@G Mustafa ,

Your issue seems to be tied to Klaviyo’s event data handling in live automation. Since the dynamic variables like {{ event.model|default:"" }} work in previews but fail in actual flows for some profiles, it’s likely a data inconsistency problem. Some profiles may not have the expected event properties, causing blank placeholders.

 

First, check the event history for affected profiles. If the event.model or event.make field is missing in their event payload, Klaviyo has no data to pull from. If that’s the case, the problem isn’t in the email template but in how event data is being sent.

 

Next, verify if the flow is triggered by the right event. If an earlier or unrelated event starts the automation, Klaviyo might not have access to the needed variables. Try manually triggering the event for a test profile and checking if the data appears.

 

Another possibility is formatting issues in the custom metric. If the event data isn’t structured as expected, Klaviyo won’t recognize it. Look at the JSON payload being sent and confirm that the necessary properties exist.

 

Lastly, if the issue is with HTML parsing, test rendering the variables in a simple text block inside Klaviyo’s editor. If the text block shows values correctly but the HTML email doesn’t, there’s an issue with how Klaviyo is handling the Liquid syntax in your template.

Let me know if this help or need help checking it out