Shopping cart

Learn how to define an audience based on the shopping cart.

The cart variable provides information about the user's shopping experience on your online store. It includes details such as the stage of the process, items in the cart, the total amount, and more.

For example, to create an audience of users who have started the checkout process, but have not yet completed it, you can use:

cart's stage is "checkout"
Try in Playground

If you want to focus on users with specific items in the cart, you can use a quantifier:

some item in cart's items satisfies item's name matches "t-shirt"
Try in Playground

Another typical use case is to display messages or special offers based on the shopping cart state. Suppose you want to offer users free shipping on orders over $100 by displaying a message like "Add $20 more to get free shipping". Then, you can use:

cart's subtotal is less than 100
Try in Playground

You can even use the discount coupon as a condition:

cart's coupon is "new-year"
Try in Playground

This can be useful if you need to give detailed instructions about the coupon rules, such as displaying a message like "This is a one-time coupon for new users only".

For more information on shopping variables, see the Shopping section.