Solved

How to get dynamic value from external service?

  • 17 December 2021
  • 4 replies
  • 57 views

Badge

Is there any way to set up so value specified is in email template is somehow dynamic? We have loyalty program installed on the shopify site and monthly bases we want to send customer how many points you earned this month but not sure if this can be possible. I know I can update the custom properly from external service then sometimes I want to get for the number /monthly/annual/daily/ etc. If it’s possible I want to have url like http://mydomain.com?getCustomerPoinits?email=email@test.com?dateStart=2021-10-01&dateEnd=2021-10-31 and have the result in the email. Can I do something like this with Klaviyo?

icon

Best answer by Dov 20 December 2021, 16:32

View original

4 replies

Userlevel 7
Badge +45

Hi @SK101,

Thanks for sharing this question with us in the community.

The short answer is, yes! With that said, Klaviyo’s ability to populate information dynamically from a third-party platform, relies on the platform sending that data to Klaviyo. Typically this information is sent to Klaviyo as a custom property and we can populate it dynamically from there. For more information I recommend reading through the post below which fleshes out this concept in a little more detail:

I hope that is helpful and thanks for being a member of our community!

Badge

I am more thinking about the data generated by feed.  The endpoint for my feed will be mydomain.com/points?start=20211201&end=20211120&user=emailaddress. Can the data in the email can be used in the email and how long can Klaviyo wait until sending the email? I am just afraid if it takes long time to fetch the data Klaviyo will send the email without any data.

Userlevel 7
Badge +45

Hi @SK101,

I am more thinking about the data generated by feed.  The endpoint for my feed will be mydomain.com/points?start=20211201&end=20211120&user=emailaddress. Can the data in the email can be used in the email and how long can Klaviyo wait until sending the email? I am just afraid if it takes long time to fetch the data Klaviyo will send the email without any data.

If I understand correctly, you’re asking if we can use the information contained after the domain name i.e. points?start=20211201&end=20211120&user=emailaddress in a data feed and convert that to display a start day of X and an end date of Y in a Klaviyo email in a certain format? If that is correct, then we cannot achieve that. Instead, I recommend looking into the specifics outlined in our article on data feeds to better understand how we can pull data into our emails using data feeds. In short, you can use Django variables to format dates and display dates however, the dates themselves would have to be included as discrete categories in your web feed.

Here is an example feed, you can see “created_at” or “updated_at” to reference how dates should be formatted in feeds: 

 

Alternatively, you may find it easier to pass us dates to profiles using the Identify API and from there, use the resources I outlined in my original post/reply to populate those custom properties into your emails.

To address your question on the speed of feeds populating, for campaigns, Klaviyo will fetch each feed once per send, and store the returned content. Even if you're sending to thousands of recipients, Klaviyo won't make thousands of requests to your servers.

Badge

>To address your question on the speed of feeds populating, for campaigns, Klaviyo will fetch each feed >once per send, and store the returned content. Even if you're sending to thousands of recipients, >Klaviyo won't make thousands of requests to your servers.

Thanks. In the past customers received the email without the content filled. I thought there is some limitation on how much Klaviyo can wait. It could be the problem with my data feed. 

 

Anyways thank you very much for your quick response. 

Reply