All questions

Building a cart-abandoner audience from Hydrogen store events

Asked by priya_d on

Ppriya_d

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 1

The audience estimator shows zero even though the cartAbandoned events are visible in the sessions view. What is the correct condition for repeat cart abandoners

Was this helpful?

1 answer

DWDana Whitfield

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 times

That 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 100

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

Was this helpful?
Ppriya_d

The behavioral form matches now, estimator went from zero to a plausible count. Good to know about undefined evaluating to false.

Still have questions?