Skip to main content

Hey!
So my brand uses an event date to send helpful tips via flows, but also uses that same date for inclusion/exclusion logic on campaigns. The date is different for every profile, and the typical date ranges from anywhere a year or two in the past through a year or two in the future.

I want to create a segment, for example, of users whose date is between 60 and 120 days from today, with ‘today’ being dynamic - ie, not a static September 24, 2024 through November 23, 2024.

Alternately, I can accomplish the same thing if I have a flow set up to update a profile property with this logic, ie if the user’s date is November 23, 2024, the flow would start a year before and then update either periodically or, ideally, daily so that today it’d say DaysUntil: 103, tomorrow it’d change to say 102, etc. From there I could simply pull a segment, then, of people who DaysUntil is between 60 and 120/ Creating this via a date-based flow trigger, though, would require creating both a time delay and a profile property update within the flow for each individual update, so again, not quite ideal.

I could be missing something obvious, too - hence posting here. Not sure if there’s an easier way I’ve overlooked!

Hello @eMeg 

 

You can do something like this:
 

 

In this example, i have used created attribute but you can change it to any other profile attribute.

The condition of in last x days and days in the next 120 days is relative to today’s date.


So close @Maxbuzz , but I need it to be sixty days from today through 120 days from today. So no past-facing dates.


Hey @eMeg! I’m not sure what you’re looking for is possible with BOTH conditions being a future range between two dates. I’ve been trying to think through how to accomplish this and I’m stumped.

Maybe one of our Champions, @ebusiness pros @Omar  @DavidV can offer some advice.


For the time being I’ve implemented a bit of a workaround, appending a property to existing profiles with the difference (in months or days) between the current date and the event date, and then setting up that flow that will automatically subtract/update that profile property as time proceeds. It’s not ideal, but it works for now. 


 Hi @eMeg,

Thank you for your question - this is a great one! And thanks for the tag @kaila.lawrence!

So - I read your question a few times and I keep coming back to the “event date” part of your original piece here. Can you be a little more specific with what the event date is? Is is the first purchase? Is this an actual event in Klaviyo (ie. it shows on the timeline on the right hand side of profiles?)

If it is, you should be able to simply create a flow that triggers when the event triggers and starts with a 60 day waitstep. An example of this would be a post-purchase flow which we often use to educate customers let’s say about a supplement or other replenishable.

I hope that makes sense - I might be misreading it - but keen to get a little more context on how the date gets there and I’m sure we can work this one out!

Thanks
David


thanks so much @DavidV , I think I was intentionally vague about the date to dodge competitors, but basically you can imagine it as the person’s graduation date, their cat’s adoption date, their baby’s christening, etc. So something that is not tied at all to any action they take on the site, and can vary widely for each person. This date is pretty key to our whole business (like, imagine we sell birthstone collars for the cats, or commemorative somethings for baptisms, etc).


Hi @eMeg,

Ahh this makes so much more sense now - sorry I thought these were “events” (like “Placed Order”) rather than specific dates on the customer profile. This makes sense! 

What you’re trying to achieve makes total sense, and Klaviyo right now does not support a “Between Date” option that runs based on today.

You could potentially achieve this by creating 6 segments - Jan+Feb, Mar+Apr, May+Jun etc. like this:

You’d have to update these segments each year, and you could have specified wait steps in the actual flow.

The alternative and probably more reliable long term option would be to build a small application for this. You could create something no-code by using an app like Zapier to integrate Klaviyo with Google Sheets (info here). You would need to:

  1. Create a zap to add customers that have the date property filled out (this one)
  2. Create some logic in a Google Sheet formula to get the specific value you need to update when you need it to. You could likely use the TODAY() function in Google Sheets, or any of the other functions on the right hand side of that documentation
  3. Create an event in Klaviyo that can trigger a Klaviyo flow with this zap

The alternative would be to build a fully custom app - but you can probably achieve this with Zapier with Google Sheets.

@kaila.lawrence tagging you back in too as this does include some product feedback - it would be super cool in the segment builder to have the option “between X days and Y dates from today” which would allow this type of use case to be fully controlled from within Klaviyo. 

I hope that helps - let me know if you have any follow up questions!

Thanks
David


Reply