# Targeting carts that contain a specific product line on Hydrogen

Asked by Sasha Lindgren on 2026-07-16. Tags: shopify, hydrogen, cart, cql.

I want a bundle upsell banner that only shows when the cart already contains an
item from our serum line. My attempts so far:

```cql
// attempt 1: does not match anything
cart's items contains "serum"

// attempt 2: editor rejects it
cart's items' name matches "serum"
```

I suspect I need some kind of quantifier over the items but I cant find the exact
form. What are the operator semantics for matching against a list of cart items?

## 1 answer

### Accepted answer from Elif Demir (2026-07-17)

You guessed right, it is a quantifier. The documented form is:

```cql
some item in cart's items satisfies item's name matches "t-shirt"
```

Adapted to your line:

```cql
some item in cart's items satisfies item's name matches "serum"
```

The `some ... satisfies` construct binds `item` to each element of
`cart's items` and the whole condition is true if any item matches. Your first
attempt failed because `contains` on the items list compares whole elements,
not a field inside them, and the second failed because possessives do not
distribute over lists.

Beyond items, cart attributes like `total`, `subtotal`, and `coupon` are
queryable in the same audience if you want to combine conditions (e.g. only
upsell above a certain subtotal).

On the data side you need nothing extra: cart updates are auto-tracked by the
Hydrogen SDK, so the audience reacts mid-session as soon as the serum lands in
the cart. There is a longer walkthrough of the quantifier syntax in
[How do quantifiers work over cart items in CQL?](/answers/cql-cart-items-quantifier).

#### Reply from Sasha Lindgren (2026-07-17)

Works perfectly, and the explanation of why contains failed is exactly what
I was missing. Thanks!
