Skip to main content
Solved

Dynamic content in Flow based on date in person custom field


Forum|alt.badge.img+2

Hi 

I’d like to show a section depending of the custom property “last_purchased_date property” (send via API in a date format) of my profiles. 

I’d like to show the section for people where last_purchased_date is at least 60 days from today. 

 

I tried this but it doesn’t work :

{% today '%Y-%m-%d' as today %} {{ today|days_before:15|format_date_string|date:'M d' }} and person.last_purchase_type == booking

Thanks,

Best answer by Dov

Hi @winawina,

Thank you for your reply.

I recommend referencing Django’s documentation to find a tag that would equate to “days_before” (as far as I can tell, Django only offers days_later). In absence of this tag, I recommend segmenting your audiences (What somebody has done > placed order > at least 60 days ago) and sending campaigns to those segments. I know this is not the preferred method, but it would be the most viable in absence of the tag.

I hope that’s helpful and thanks for being a community member.

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • August 29, 2022

Hi @winawina,

Thanks for sharing this with the community.

You can try using the timesince filter. Alternatively, if you’re using a flow to send out this information, simply using a 60 day time-delay followed by an email containing the tag for “last_purchased_date property”. Or, create a segment: What somebody has done > placed order > at least 60 days ago and including the tag for “last_purchased_date property” and use the segment as a trigger for your flow, or simply send a campaign to that segment, are other ways to approach this.

I hope that’s helpful.


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 1 reply
  • August 29, 2022

Hi @Dov , 
Thanks for your answer. 

It seems we can’t use Timesince for what we are trying to achieve (info here). 
Unfortunately we don’t use flows so we really need the filter to work in the newsletter .. 
The segment can be an option but we wanted to avoid doing a lot of different campaigns to better measure results as we already have to do it in 2 langs. 


Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • August 30, 2022

Hi @winawina,

Thank you for your reply.

I recommend referencing Django’s documentation to find a tag that would equate to “days_before” (as far as I can tell, Django only offers days_later). In absence of this tag, I recommend segmenting your audiences (What somebody has done > placed order > at least 60 days ago) and sending campaigns to those segments. I know this is not the preferred method, but it would be the most viable in absence of the tag.

I hope that’s helpful and thanks for being a community member.

 


Forum|alt.badge.img+1
  • Contributor I
  • 2 replies
  • June 12, 2024
Dov wrote:

Hi @winawina,

Thanks for sharing this with the community.

You can try using the timesince filter. Alternatively, if you’re using a flow to send out this information, simply using a 60 day time-delay followed by an email containing the tag for “last_purchased_date property”. Or, create a segment: What somebody has done > placed order > at least 60 days ago and including the tag for “last_purchased_date property” and use the segment as a trigger for your flow, or simply send a campaign to that segment, are other ways to approach this.

I hope that’s helpful.

Hi Dov,

I am running into a similar situation. In my case I want to create “if” statements if a customer contains a specific category in their “interested category” custom property, or if they have signed up in the last 90 days. I have a flow that sets a custom property called “created” to the date they sign up to the list. However, it appears that timesince isn’t supported in Klaviyo?