I am utilizing Klaviyo to send transactional emails such as Validate Email (when user creates an account) and Reset Password. I am also using my own custom HTML template for these emails. I have been able to test the flow in Postman by creating a custom event and a metric triggered flow. I then use the Track API call to trigger the event and my email is being sent successfully. My next step is to make sure I can add a dynamic link that will expire in 7 days inside of my custom HTML email template.
So far I have looked into the following docs:
I feel like I’m on the right track but can’t put the pieces together. Can someone point me in the right direction to populate this link dynamically? Thank you!
Best answer by alex.hongView original
Welcome to the Community!
This sounds like something that would require use of Track API. From there, you could try include a link as a url property in the event data payload if you want to add a dynamic link to your templates.
After you get a dynamic variable, you can use it inside your custom html code's
hrefattribute of a link element and apply the necessary style to create a button that takes users to that URL. However, if you wanted to create a link with an expiration date, Klaviyo has no control over it; instead, it is determined by the configuration of the website to which the link takes users.
As a note about Community/Support as well:
Once more, the above information is just intended to be used as a pointer because we are unable to give you the exact code required here for your custom template. If you need any further help with this, I would advise you to reach out to your theme developer but if you do not have one on your team, you may be interested in connecting with one of our Klaviyo partners: