Solved

Data Feed Variables in Subject Line or Preheader

  • 21 October 2021
  • 2 replies
  • 48 views

Badge

Is it possible to use variables from a data feed in a Campaign subject line or preheader? 

 

We have have a custom web feed from our blog that populates the body of an email template that we use for campaigns, but I haven’t been able to figure out how to insert the blog title into the subject line or preheader.

 

If it helps, here’s what we’re using to populate the email and I’d like to use the item.title in the SL or PH:

<p>{% with feed=feeds.LawnFawnBlog %} </p>

<h2>{% for item in feed.rss.channel.item|slice:"1" %}<span style="font-size:18px;"><a href="{{ item.link }}">{{ item.title }}</a> </span></h2>
<em>By {{ item|lookup:"dc:creator" }} on {{ item.pubDate|cut:":00 +0000" }}</em>

<p>{{ item.description|safe }}</p>

<p>{{ item|lookup:"content:encoded"|safe }} {% endfor %}</p>

<p>{% endwith %}</p>

 

icon

Best answer by david.to 22 October 2021, 16:55

View original

2 replies

Userlevel 6
Badge +5

Hello @elyssa,

Great question!

Although you can use dynamic variables to personalize a subject line to address your recipients, the subject line does not support variables and syntax from a web feed/data feed associated with the email template. At present the subject line will support dynamical variables to reference profile properties or event data. Because web feeds are activated within the template itself, they would not carry over to the subject line for use. 

You also can find a number of various dynamic variables you can use within your email’s subject line from the How to Format Date Variables in Templates Help Center article. 

I do believe this is a great suggestion and that it would benefit a number of our Community members and clients who want more customization out of our template builder and will be sharing this feedback with our Product Team!

Thanks for being a part of our Klaviyo Community!

David

Badge

That would be awesome, thanks for your help and passing it along to the product team!

Reply