Skip to main content
Solved

How do I use "Today's Date" in show/hide logic?

  • November 14, 2023
  • 3 replies
  • 279 views

Forum|alt.badge.img+1

Hey there Klaviyo Community! 

 

I’m trying to create show/hide logic for a conditional block - I want the block to show ONLY if a date attribute on a customer profile is less than today’s date. 

 

This seems to work: 

person.DATE_ATTRIBUTE|default:'' < '2023-11-12'

 

but I’ve tried replacing the date with ‘%today%’ and other variations, but cannot get it to work. 

Best answer by In the Inbox

Hi @cottester 

Thanks for posting your question in the community.

The Show/Hide logic can only be based on event attributes within the flow the event triggers the message or a saved profile property. In this case, you would need to save Today’s Date as a profile property and then use the show/hide logic based on the profile where the date is saved. 

%TODAY% is a real-time dynamic element that can be used to personalize content in an email, but as far as I am aware, it will not work for the Show/Hide logic.

Are you using a flow or campaign for the show/hide logic? If you’re using a flow, maybe set the profile property with todays date first, and then you can use that profile property value with the show/hide element you want to create.

I hope that helps!

@In the Inbox 

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

3 replies

In the Inbox
Partner - Platinum
Forum|alt.badge.img+31
  • 2025 Champion
  • 294 replies
  • Answer
  • November 14, 2023

Hi @cottester 

Thanks for posting your question in the community.

The Show/Hide logic can only be based on event attributes within the flow the event triggers the message or a saved profile property. In this case, you would need to save Today’s Date as a profile property and then use the show/hide logic based on the profile where the date is saved. 

%TODAY% is a real-time dynamic element that can be used to personalize content in an email, but as far as I am aware, it will not work for the Show/Hide logic.

Are you using a flow or campaign for the show/hide logic? If you’re using a flow, maybe set the profile property with todays date first, and then you can use that profile property value with the show/hide element you want to create.

I hope that helps!

@In the Inbox 


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 1 reply
  • November 14, 2023

@In the Inbox Thank you so much! I was afraid of this, but sounds like there’s a way for me to fix. 

 

Do you know if there’s a way to dynamically set a property every day for a customer in Klaviyo? I don’t want to have to manually update every customer every day and writing an integration to update every customer seems like a bad call.


Forum|alt.badge.img+2
  • Contributor IV
  • 14 replies
  • January 12, 2024

Dear lord there are some pretty basic features missing in Klaviyo, I’ve never even heard of an email  platform that can’t show newsletter content based on if date is in the last 7 days. I’m going to have to create a flow just to set and unset properties just to do something this basic *sigh*