Product abandoned
Learn how to check if a user has abandoned a product.
This expression checks whether the user has abandoned a product based on Product abandoned events.
A product is considered abandoned when a user views the item or adds it to the cart but does not complete the purchase before the session ends. When the session is closed, the cart and its items are marked as abandoned.
Make sure your app is tracking the Cart modified or Cart viewed events before using this expression. Without this event, the expression will always evaluate to false.
Syntax
The basic syntax for this expression is:
user has abandoned a product
The negation of the expression can be expressed as:
user has not abandoned a product
You can refine the expression with filters, quantifiers, and time windows:
user has abandoned a product /*<criteria>*/ /*<quantifier>*/ /*<window>*/
Parameters
These are the supported parameters:
- criteria(optional)
Additional filtering criteria for the product abandoned event.
- quantifier(optional)
A quantifier to specify how many times the event must have occurred.
- window(optional)
The time window during which the product abandonment must have occurred.
Event properties
The following event properties can be used within criteria expressions:
- index
The position of the item in the shopping cart, starting from 0.
This value typically represents the order in which the items were added to the cart. For example, the first item has an index of 0, the second item has an index of 1, and so on.
- quantity
The number of units of the item.
- discount
The amount of the discount applied to the item.
- coupon
The coupon applied to the item. For example, "SUPER_DEALS".
- total
The total for the item, including discounts and any other adjustment.
- id
The ID that uniquely identifies the product on your store. For example, "3108" or "CD4371".
- sku
The SKU of the product. For example, "IPH-GRE-64", "153-169-172-182887".
- name
The name of the product. For example, "iPhone" or "Nike Air Max".
- category
The category of the product. For example, "Smartphones" or "Running shoes".
- brand
The brand of the product. For example, "Apple" or "Nike".
- variant
The variant of the product, such as size, color and style. For example, "Black", "M", "XL".
- displayPrice
The price of the product displayed in the store. For example, 899.99.
- originalPrice
The regular price of the product before any discounts. For example, 999.99.
- url
The URL of the product page.
- imageUrl
The URL of the product image.
Examples
You can check whether a user has abandoned any product:
user has abandoned a product
Or check if they have not abandoned any product:
user has not abandoned a product
You can also add criteria, such as requiring a coupon:
user has abandoned a product with coupon "10OFF"
Or check how many times products were abandoned:
user has abandoned a product at most 2 times
You can even filter by time, such as checking if a product was abandoned yesterday:
user has abandoned a product yesterday
Combine criteria, counts, and time windows in one expression:
user has abandoned a product with coupon "10OFF" exactly 2 times today