Skip to main content

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. 

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 


@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.


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*


Reply