Hey Fam,Β
Β
This tip is a βnice-to-haveβΒ to help the user experience in the welcome flow that uses a dynamic coupon which expires after X amount of days.
Β
Iβd say 99% of brands are using an welcome discount to incentivize visitors to get on their email list.Β So, naturally, that first email should answer the question - whatβs my coupon code?!
Β
Yes, you could use a static coupon thatβs the same for all your subscribers (ie. WELCOME15), but a few issues I have with that:
- It could be EASILY shared amongst friends (Iβve done it) and found by services like Honey
- If you want to incentivize urgency, will someone believe a generic coupon code is actually going to expire (yes, my view is skewed because this is what we do for a living)
- Does it really make the subscriber feel special that itβs a code really for them? Probably not
Okay, so whatβs the tip?
Hereβs our setup:
- Dynamic code generated by Klaviyo
- Expires after X amount of days (letβs say 7)
- Reminder email after 6 days that the coupon will expire
Almost everyone reads that first email.Β The 6th day email, not so much. Then we started getting messages that people didnβt know it expired on βJune 5thβ.
Β
Now, we had βcode expires in 7 daysβ on that first email, but that may be too much work for the customer to figure out what day it was.Β Instead, we used the Klaviyo date variable to show which day it actually expires.Β
Β
Hereβs what it looks like (and that date is dynamic!)

Β
Hereβs the code that takes care of it (snippet from a Klaviyo help article):
Β
Calculating a future date
If youβd like to display a future date relative to the day a message is sent, apply the days_later filter to the today variable outlined above, like this:Β
{% today "%Y-%m-%d" as today %} {{ today|days_later:5 }}This variable will display the date five days after a message is sent. So, if the message was sent on March 18, the date displayed would be 2021-03-23.Β
This filter can be combined with the formatting filters outlined above to use a different date format. Take this code as an example:Β
{% today '%Y-%m-%d' as today %} {{ today|days_later:15|format_date_string|date:'M d' }}If the message was sent on March 18, this would render as Mar 23.Β
Β
Some would say it doesnβt matter to have the code expire, since youβll most likely give to a first time customer anyways (and we always will).Β But, what it does is to train your subscriber to BELIEVE what you say in your emails.Β So, when you do actually have an offer that expires, they know to have some urgency on it.Β
Β
If youβre using the date variable in any other ways, would love to see some examples in the comments or DM me!