Skip to main content
Solved

Variables not working in notification message

  • December 8, 2022
  • 2 replies
  • 320 views

Forum|alt.badge.img+2

Hello,

 

I’ve set up a notification message when someone enters a list and flow. I want to add variables on the message that the profile provides in the form.

However, the variables doesn’t show up in the message. This is what I have:

 

Deze aanmelding is gedaan door {{ first_name|default:"" }} uit {{ person|lookup:"Locatie"|default:"" }}.

{{ first_name|default:"" }} werkt voor {{ person.organization|default:"" }} ({{ person|lookup:"Website"|default:"geen website doorgegeven" }}).

De zorginstelling betreft: {{ person|lookup:"Zorginstelling"|default:"" }}

De functies die zij willen opvullen zijn: {{ person|lookup:"Functie"|default:"" }}

Zij willen starten in: {{ person|lookup:"Startperiode"|default:"" }}

Voor een periode van: {{ person|lookup:"Periode"|default:"" }}

Voor het contract type: {{ person|lookup:"Intensiteit"|default:"" }}

 

Does anyone know why this would not work?

 

Thanks,

Thomas

Best answer by Brian Turcotte

Hello @ThomasOos and welcome back to the Community!

 

May I ask how you are inserting the dynamic tags into the email? Are you typing them out manually? Or are you using the “Add Personalization” feature in the text editor:

If you aren’t using the “Add Personalization” feature, I would recommend using that, since you will be able to select the desired variable from the dropdown and it will insert the correct dynamic tag, avoiding any potential syntactical errors. Here’s our full syntactical guide to dynamic variable tags.

 

Also, how are you testing your emails? More specifically, are you sending emails to your own test account to check?

 

Some subscribers may not have filled out the form with certain information, and some of your profiles may not contain those profile properties. As my colleague Alex mentioned in this post, only profiles who have filled out the form and are confirmed to have values for these properties will receive the populated tag:

 

To that end, you can enter text between the quotations after default:"" in each tag in order to substitute a filler for when profiles don’t have a value for the property. For example, if your email starts with “Hi { first_name|default:"there" }}!”, it will read “Hi there!” for profiles with no First Name value, and “Hi [name]!” for profiles with a First Name value. 

 

Finally, may I ask if all of the dynamic tags are failing, or just specific ones? This will help myself and other Community members acquire some further context about the issue.

 

Thanks for using the Community!

- Brian

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

2 replies

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • December 9, 2022

Hello @ThomasOos and welcome back to the Community!

 

May I ask how you are inserting the dynamic tags into the email? Are you typing them out manually? Or are you using the “Add Personalization” feature in the text editor:

If you aren’t using the “Add Personalization” feature, I would recommend using that, since you will be able to select the desired variable from the dropdown and it will insert the correct dynamic tag, avoiding any potential syntactical errors. Here’s our full syntactical guide to dynamic variable tags.

 

Also, how are you testing your emails? More specifically, are you sending emails to your own test account to check?

 

Some subscribers may not have filled out the form with certain information, and some of your profiles may not contain those profile properties. As my colleague Alex mentioned in this post, only profiles who have filled out the form and are confirmed to have values for these properties will receive the populated tag:

 

To that end, you can enter text between the quotations after default:"" in each tag in order to substitute a filler for when profiles don’t have a value for the property. For example, if your email starts with “Hi { first_name|default:"there" }}!”, it will read “Hi there!” for profiles with no First Name value, and “Hi [name]!” for profiles with a First Name value. 

 

Finally, may I ask if all of the dynamic tags are failing, or just specific ones? This will help myself and other Community members acquire some further context about the issue.

 

Thanks for using the Community!

- Brian


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • December 14, 2022

Hello Brian,

Thank you for your explanation, but I think all of this is done right.

For the notification, there is no such button as “Add personalisation”.

See the screenshot below:

 

I did check them with a normal e-mail and copied them in this field, so they should be alright. Also, when I check a preview ‘Preview directly in Klaviyo’, it all works and the fields are showing. However, if I actually send the email as preview, it’s all empty. So I’m actually not sure if it really works or not.

I guess I have to find out when this is in action with real customers. I’ll update it here.