Product update: meet event-based expressions
When we first built CQL, we wanted to make audience segmentation as natural as having a conversation. Instead of forcing you to write code, CQL lets you create simple, human criteria like:
- the user returning
- the cart is empty
- the user’s interests include “movies”
And just like that, you can tailor experiences in real time. Every time your website fires an event like CheckoutStarted or UserSignedIn, we update the variables in your users’ context. Things like user, session, and cart became living snapshots of right now.
It was fast. It was flexible. It worked.
But then our customers got more sophisticated and started asking for more.
Can I check if something happened last week?
CQL’s context variables were perfect for now: they told you everything about the present moment. But what about the past? We started hearing questions like:
- How can I segment users who converted in the past 7 days?
- How can I select visitors who saw this product this month?
- How do I create an audience with users who interacted with specific campaigns over their lifecycle?
These aren’t just technical questions for edge cases. They’re completely normal growth questions. Our customers wanted to understand timing, behavior, and intent. Alltogehter.
The problem? Until now, CQL could only provide the present context of users. Your criteria could consider what’s happening right now, but not what happened before.
That’s when we realized that if personalization is about understanding people, we were missing half the story.
So we gave CQL a memory
How? We created what we call Event Expressions. It is the biggest upgrade to CQL since, well, CQL itself.
Now you can write expressions that look back in time and measure behavior over days, weeks, or even months, considering both recency and frequency.
Here’s what that looks like:
user has viewed a page with title "pricing" in the last 7 daysuser has placed an order at least 3 times this monthuser has shown interest in "sneakers"That’s not SQL or pseudo-code. It fits naturally into the same expressive, human-readable language that our customers already love.
Behind the scenes, we’ve built an abstraction layer that decouples these expressions from raw events. That means you can use friendly phrases like "viewed a page" or "placed an order" while we handle the complexity of mapping them to multiple underlying events like PageOpened or OrderPlaced, respectively.
It’s clean, smart, and totally decoupled from your data structure so you can evolve your tracking without breaking your expressions.
Why this changes everything
With event expressions, audience criteria now span the entire customer journey, rather than just the current session. This means you can finally create audiences and experiences that respond to behavior over time, such as:
-
Lifecycle campaigns
Show a welcome back message if the user has signed in three times this month.
-
Engagement tracking
Offer a discount if the user has viewed the same product at least twice in the last week.
-
Reactivation flows
Send a notification if the user hasn’t completed a goal in the past 30 days.
-
Cross-channel marketing
Personalize banners for users who have viewed a campaign but haven’t placed an order since.
And because everything is written in CQL, it still reads like English:
user has not completed goal "checkout" in the last weekYou can even combine event expressions with contextual data:
user has placed an order in the last month and cart's total is greater than 100and location's country’s code is "US"That’s the kind of logic you used to need a data engineer for. Now, anyone can write it in plain English.
Let’s be honest: it’s f*ing awesome because this unlocks personalization that finally feels alive.
Until now, personalization tools have been either too shallow, reacting only to what’s happening right now, or too rigid, relying on pre-built segments that take hours or days to update.
Event expressions bridge that gap and let you speak the language of your users’ actions, directly, naturally, and instantly.
It’s also blazing fast. Since event expressions are designed for database-level filtering with strict comparisons (no fuzzy type casting, no runtime guesswork), they can be evaluated at scale with minimal latency, just like the rest of your audience criteria.
The future of personalization starts now
CQL has always been about clarity, expressing personalization logic in a way that feels human. With event expressions, we’ve taken that mission to a whole new level.
You can now build audiences that understand the full user lifecycle. You can predict intent, detect trends, and act on them instantly. You can bridge the gap between what users do and what they experience.
From now on, personalization in Croct isn’t just contextual. It’s chronological, behavioral, and beautifully human.
So, yeah, this is a big one. And we're proud of this launch. CQL just got a memory, and that means your product just got a whole lot smarter.