Audience for "sale ends tomorrow" messaging using date comparisons?
Hi everyone. I run promos for a home goods brand and I plan everything in a spreadsheet weeks ahead. Black Friday is this week and I want our banner to switch to urgency copy ("sale ends tomorrow!") on the final day without me logging in at midnight to republish.
Two questions:
- Can audience conditions reference dates at all? Like "if today is November 27 show this version"?
- If yes, what happens if I get the condition wrong, does the experience break or just not show
Would love to set this up once and not touch it again.
1 answer
Yes, this works directly in audience conditions. CQL exposes now, today, yesterday, and tomorrow as context variables, so you can compare against dates without any code:
today is "2025-11-28"A common pattern for your case is two experiences on the same slot: one with the regular sale copy and one with the urgency copy gated by a date condition. The urgency experience takes over automatically when the date matches.
On your second question: if a condition references something undefined, for example a mistyped variable name, it evaluates to false by design. Nothing errors or breaks, the experience simply never matches. That is safe, but it also means a typo fails silently, so double-check the condition before the big day.
One more option worth knowing: for hard start and end dates, experience scheduling exists as a feature on the Scale plan. Date-based audiences are the right fit for copy that changes while an experience is already running, which is exactly your countdown scenario. For the audience syntax, see the date and time audience examples.