Building a cart-abandoner audience from Hydrogen store events
Auto cart events are flowing from the Hydrogen SDK. I want a win-back banner for shoppers who abandoned carts more than once. Tried this condition and it never matches anyone:
user's cartAbandonments is greater than 1The audience estimator shows zero even though the cartAbandoned events are visible in the sessions view. What is the correct condition for repeat cart abandoners
1 answer
cartAbandonments is not an attribute that exists, and CQL evaluates undefined variables to false by design, which is why the estimator shows zero instead of an error. The documented behavioral condition is what you want:
user has abandoned a cart at least 2 timesThat reads directly off the cartAbandoned events you are already collecting.
If you also want to catch people who are mid-abandonment right now, cart attributes are queryable in the same audience:
cart's stage is "checkout" and cart's subtotal is less than 100Audiences evaluate in real time per interaction, so the banner reacts within the same session rather than waiting for some batch job to classify the user.
The behavioral form matches now, estimator went from zero to a plausible count. Good to know about undefined evaluating to false.