Order placed
Learn how to check if a user has placed an order.
This expression checks whether a user has placed an order based on Order placed events.
Make sure your app is tracking the Order placed event before using this expression. Without this event, the expression will always evaluate to false.
Syntax
The basic syntax for this expression is:
user has placed order
You can optionally include the article for better readability:
user has placed an order
The negation of the expression can be expressed as:
user has not placed an order
You can refine the expression with filters, quantifiers, and time windows:
user has placed an order /*<criteria>*/ /*<quantifier>*/ /*<window>*/
Parameters
These are the supported parameters:
- criteria(optional)
Additional filtering criteria for the order placed event.
- quantifier(optional)
A quantifier to specify how many times the event must have occurred.
- window(optional)
The time window during which the event must have occurred.
Event properties
The following event properties can be used within criteria expressions:
- id
The ID that uniquely identifies the order on your store.
- currency
The currency in which the monetary values are expressed in the shopping cart, such as "USD" or "EUR".
- subtotal
The total of all items and quantities in the shopping cart including applied item promotions.
- shippingPrice
The total shipping price for the items in the shopping cart, including any handling charges.
- paymentMethod
The payment method used in the payment, such as "credit-card", "credit-balance", "visa", "paypal" "bitcoin", etc
- installments
The number of installments for the payment. For example, 3 for a payment in 3 installments
- status
The current status of the order. The possible values are:
Value Description placed The order has been placed but still has pending actions. paid The order has been paid but still has pending actions. completed The order has been fully completed. - taxesobject
The taxes associated with the transaction.
It is expressed as a dictionary where the key is the tax name and the value is the tax amount.
Example:
{ "state": 3.1, "local": 1.5}
- costsobject
The costs associated with the transaction, such as manufacturing costs, shipping costs not paid by the customer, or other costs.
It is expressed as a dictionary where the key is the cost name and the value is the cost amount.
Example:
{ "manufacturing": 5.0, "packaging": 2.0}
- discount
The amount of discount applied to the shopping cart, as an absolute value. For example, 10.00 for a $10 discount.
- coupon
The coupon applied to the shopping cart. For example, "SUPER_DEALS".
- total
The total revenue or grand total associated with the transaction, including shipping, tax, and any other adjustment.
Examples
You can check whether a user has placed an order:
user has placed an order
Or check that the user has not placed any orders:
user has not placed an order
You can also add criteria, such as checking the order currency:
user has placed an order with currency "USD"
Or check how many times an order was placed:
user has placed an order exactly 3 times
You can even filter by time, such as checking if an order was placed yesterday:
user has placed an order yesterday
Combine criteria, counts, and time windows in one expression:
user has placed an order with currency "USD" exactly 2 times today