Order Placed Event
A Braze recommended eCommerce event for a completed order.
Code Example
braze.logCustomEvent("ecommerce.order_placed", {
"order_id": "order_7891011",
"cart_id": "cart_abc123",
"total_value": 84.99,
"subtotal_value": 74.99,
"tax": 5,
"shipping": 5,
"currency": "USD",
"total_discounts": 10,
"products": [
{
"product_id": "sku_2001",
"product_name": "Trail Runner Pro",
"variant_id": "var_2001_black_10",
"image_url": "https://cdn.example.com/products/trail-runner-pro.jpg",
"product_url": "https://www.example.com/products/trail-runner-pro",
"quantity": 1,
"price": 94.99
}
],
"source": "web"
});
Event Properties
| Property | Type | Constraints | Examples | Description |
|---|---|---|---|---|
| event | string | required | | The Braze recommended event name for a completed order. |
const: "ecommerce.order_placed" | ||||
| order_id | string | required | | The unique identifier for the order. |
| cart_id | string | | The cart identifier shared across cart, checkout, and order events. | |
| total_value | number | required | | The total monetary value of the order. |
| subtotal_value | number | | The order subtotal after discounts and before tax or shipping. | |
| tax | number | | The total tax applied to the order. | |
| shipping | number | | The shipping cost applied to the order. | |
| currency | string | required | | The ISO 4217 three-letter currency code. |
minLength: 3 | ||||
maxLength: 3 | ||||
| total_discounts | number | | The total value of discounts applied to the order. | |
| []products | array | required | The line items in the order. | |
minItems: 1 | ||||
| product_id | string | required | | The unique product identifier. |
| product_name | string | required | | The product display name. |
| variant_id | string | required | | The product variant identifier. |
| image_url | string | | The product image URL. | |
| product_url | string | | The product page URL. | |
| quantity | integer | required | | The number of units in the order. |
minimum: 1 | ||||
| price | number | required | | The product variant unit price. |
| source | string | required | | The source the event originates from. |
const: "web" |
View Raw JSON Schema
{
: "https://json-schema.org/draft/2020-12/schema",
: "https://tracking-docs-demo.buchert.digital/schemas/1.3.0/braze/order-placed-event.json",
"title": "Order Placed Event",
"description": "A Braze recommended eCommerce event for a completed order.",
"x-tracking-targets": [
"web-braze-js"
],
"x-method": "track",
"type": "object",
"properties": {
"event": {
"type": "string",
"const": "ecommerce.order_placed",
"description": "The Braze recommended event name for a completed order."
},
"order_id": {
"type": "string",
"description": "The unique identifier for the order.",
"examples": [
"order_7891011",
"order_12345"
]
},
"cart_id": {
"type": "string",
"description": "The cart identifier shared across cart, checkout, and order events.",
"examples": [
"cart_abc123",
"cart_456"
]
},
"total_value": {
"type": "number",
"description": "The total monetary value of the order.",
"examples": [
84.99,
234.96
]
},
"subtotal_value": {
"type": "number",
"description": "The order subtotal after discounts and before tax or shipping.",
"examples": [
74.99,
219.97
]
},
"tax": {
"type": "number",
"description": "The total tax applied to the order.",
"examples": [
5,
9
]
},
"shipping": {
"type": "number",
"description": "The shipping cost applied to the order.",
"examples": [
5,
5.99
]
},
"currency": {
"type": "string",
"description": "The ISO 4217 three-letter currency code.",
"minLength": 3,
"maxLength": 3,
"examples": [
"USD",
"EUR"
]
},
"total_discounts": {
"type": "number",
"description": "The total value of discounts applied to the order.",
"examples": [
10,
15
]
},
"products": {
"type": "array",
"description": "The line items in the order.",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "The unique product identifier.",
"examples": [
"sku_2001",
"SKU-RUN-4821"
]
},
"product_name": {
"type": "string",
"description": "The product display name.",
"examples": [
"Trail Runner Pro",
"Ultraboost Running Shoe"
]
},
"variant_id": {
"type": "string",
"description": "The product variant identifier.",
"examples": [
"var_2001_black_10",
"UB-BLK-11"
]
},
"image_url": {
"type": "string",
"description": "The product image URL.",
"examples": [
"https://cdn.example.com/products/trail-runner-pro.jpg"
]
},
"product_url": {
"type": "string",
"description": "The product page URL.",
"examples": [
"https://www.example.com/products/trail-runner-pro"
]
},
"quantity": {
"type": "integer",
"description": "The number of units in the order.",
"minimum": 1,
"examples": [
1,
2
]
},
"price": {
"type": "number",
"description": "The product variant unit price.",
"examples": [
94.99,
189.99
]
}
},
"required": [
"product_id",
"product_name",
"variant_id",
"quantity",
"price"
]
}
},
"source": {
"type": "string",
"description": "The source the event originates from.",
"const": "web"
}
},
"required": [
"event",
"order_id",
"total_value",
"currency",
"products",
"source"
]
}