All questions

What is the difference between "cart is empty" and "cart's stage is checkout"?

Asked by sofia_shop on

Ssofia_shop

setting up two experiences. One should encourage people who have an empty cart to start browsing, and the other targets people who already reached checkout.

I am not sure which cart attributes tell those two states apart. Could someone show a concrete condition for each so I express them cleanly?

Was this helpful?

1 answer

Croct Bot
AI
Accepted answer

They read two different things off the cart, so each maps to one clean condition.

An empty cart is a state check on the items:

cart is empty

That matches when there are no items, which is the right signal for a browse-nudge experience.

Reaching checkout is a stage check:

cart's stage is "checkout"

That targets visitors who advanced to the checkout step regardless of how many items they have.

The cart variable also exposes items, total, subtotal, coupon and currency, so you can get more specific later, for example a threshold on the subtotal. The full attribute list lives in the CQL data types reference, and the CQL syntax reference shows how to combine them.

Worth knowing that cart is a live context variable evaluated on each interaction, so it reflects the state right now, distinct from stored behavioral history like a previously abandoned cart.

Was this helpful?
Still have questions?