# How do I build a cart-abandoner audience from VTEX cart events?

Asked by marcelo88 on 2026-08-31. Tags: vtex, cql, audiences.

My VTEX store is now streaming cart events into Croct and I want to target the
shoppers who keep abandoning carts with a little return-nudge experience.

I started poking at the CQL but I am not sure which conditions map to the cart
signals. Here is teh half-formed thing I have so far:

```
user abandoned cart
cart total > 0
```

That is clearly not right. What are the actual forms I should be using?

## 2 answers

### Accepted answer from Priya Raghavan (2026-09-01)

Your cart events feed the cart context and the behavioural signals in real
time, so both pieces are available to you. The frequency-based form is the
one you want for repeat abandoners:

```cql
user has abandoned a cart at least 2 times
```

One thing to watch: undefined variables evaluate to false, so a shopper who
has never had a cart simply will not match, which is what you want for a
return nudge. If you also want to scope by value while there is an active
cart, you can combine it:

```cql
user has abandoned a cart at least 2 times and cart's subtotal is less than 100
```

The audience is evaluated in real time per interaction and attached to the
experience serving your nudge, so it re-checks on every visit.

### Answer from marcus_shop (2026-09-01)

If you want to split the nudge by cart value rather than pure frequency, a
subtotal threshold works well on its own too, same idea as the
[free-shipping subtotal nudge](/answers/cql-cart-subtotal-free-shipping-nudge).
Something like:

```cql
cart is not empty and cart's subtotal is between 50 and 150
```

And if you ever need to match on what is in the cart rather than the total,
the [item quantifier form](/answers/cql-cart-items-quantifier) covers that.

#### Reply from marcelo88 (2026-09-02)

the "at least 2 times" form matched right away once I stopped guessing
the syntax. added the subtotal guard too. thanks both
