Skip to main content

Order Place

An event that describes the action of placing an order.

Here's an example of a Order Place:

pcdp("event", "track", {
"clientId": "kevel",
"siteId": "kevel.com",
"type": "orderPlace",
"customFields": {
"debug": "true",
"role": "superuser"
},
"lineItems": [
{
"itemGroupId": "p125",
"name": "My product",
"brand": "Nike",
"category": "Men/Shirts/Short Sleeve Shirts",
"categoriesList": [
"Men",
"Shirts",
"Short Sleeve Shirts"
],
"currency": "EUR",
"promotions": [
"WINTERSALE"
],
"adult": false,
"size": "S",
"sizeSystem": "EU",
"customFields": {
"color": "blue"
},
"lineItemId": "li125zc",
"productId": "p125zc",
"total": 102.5,
"subtotal": 85,
"tax": 11.5,
"shipping": 6,
"sku": "p125zc-5",
"discount": {
"value": 5,
"currency": "EUR"
},
"refund": 0,
"quantity": 1,
"subscriptionDuration": 180,
"status": "placed"
}
],
"order": {
"id": "or123",
"currency": "EUR",
"total": 102.5,
"subtotal": 85,
"tax": 11.5,
"shipping": 6,
"discount": {
"value": 5,
"currency": "EUR"
},
"refund": 0,
"paymentMethod": "Visa",
"shippingMethod": "UPS",
"shippingCountry": "France",
"source": "web",
"promotions": [
"WINTERSALE"
]
}
})

In more detail, the fields supported on every Order Place are:

FieldRequiredTypeDefaultExampleDescription
clientIdstring"kevel"The client identifier.
siteIdstring"kevel.com"The client's site identifier.
typerequired"orderPlace""orderPlace"The event type.
customFieldsobject of string{...}An object with custom fields for extra metadata to be supplied in the event. The values within this object must all be strings.
facebookConversionTrackingFacebook Conversion Tracking Details{...}A description of a tracking event to send to Facebook using Facebook Conversions API.
lineItemsrequiredarray of LineItem[...]An array of the line items that belong to the order.
orderrequiredOrder{...}Order details.

Facebook Conversion Tracking Details

A description of a tracking event to send to Facebook using Facebook Conversions API.

FieldRequiredTypeDefaultExampleDescription
pixel_idstring"396622227884531"The pixel ID to associate this Facebook tracking event with.
event_idstring"0c53d0b57"ID used to deduplicate events sent by both Facebook Pixel and Conversions API. More information about the usefulness of this ID is available at https://developers.facebook.com/docs/marketing-api/server-side-api/using-the-api/deduplicate-pixel-and-server-side-events.
event_namestring"AddToCart"A Facebook pixel Standard Event or Custom Event name. This field is used to deduplicate events sent by both Facebook Pixel and Conversions API. The available Standard Events are listed in https://developers.facebook.com/docs/facebook-pixel/reference#standard-events.
custom_dataobject{...}Parameters to send additional data Facebook can use for ads delivery optimization. More information about the fields that can be supplied here is available at https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data.

LineItem

Line item details.

FieldRequiredTypeDefaultExampleDescription
itemGroupIdstring"p125"Identifier for a group of products that come in different versions (variants).
namestring"""My product"Product name.
brandstring"Nike"Product brand.
categorystring"Men/Shirts/Short Sleeve Shirts"Product category. If possible, 'categoriesList' should be filled instead of this field.
categoriesListarray of string["Men", "Shirts", "Short Sleeve Shirts"]A hierarchically sorted list of the sub-categories that this product belongs to. The first item on this list should be the most general sub-category, while the last should be the most specific. Any item on this list should correspond to a sub-category of the item immediately preceding it. If 'category' is present and this field is left undefined, the default value of this field will be a best effort derivation of 'category'.
currencyrequiredstring"EUR"The currency used in monetary values. Supported values: "PLN", "CAD", "HKD", "AUD", "SEK", "TRY", "BRL", "KRW", "CZK", "BGN", "ETH", "CLP", "GBP", "MXN", "THB", "ISK", "SGD", "CHF", "INR", "LTC", "CNY", "PHP", "RON", "BTC", "DKK", "XAU", "XAG", "JPY", "ARS", "HUF", "MYR", "USD", "RUB", "NZD", "IDR", "ILS", "NOK", "NAD", "EUR", "ZAR" and "HRK".
promotionsarray of string[]["WINTERSALE"]Vouchers applied in the purchase or displayed together with the product.
adultbooleanfalsefalseWhether the product includes adult content (alcohol, guns, gambling, sexually suggestive content...) and might not show up to some users.
sizestring"S"Product size.
sizeSystemstring"EU"Country of the size system used by your product.
customFieldsobject of string{"color": "blue"}Additional fields related to the product. The values within this object must all be strings.
lineItemIdstring"li125zc"A unique identifier for the line item within the order.
productIdrequiredstring"p125zc"Product identifier.
totalrequirednumber102.5Total value of the line item with all discounts, status and refund value already considered, including subtotal, tax and shipping. total = subtotal + tax + shipping.
subtotalnumber085The value of the line item, when tax and shipping are excluded. subtotal = total - tax - shipping.
taxnumber011.5The total applied tax value for the line item.
shippingnumber06The total shipping costs for the line item.
skustring"""p125zc-5"Product SKU.
discountDiscount{...}Discount applied to the product.
refundnumber00The total refunded value for the line item.
quantitynumber11Quantity of purchased item.
subscriptionDurationstring180If the purchase relates to a subscription, captures the subscription duration, in days.
statusstring"placed""placed"The status of the line item. Supported values: "placed", "paid", "fulfilled", "canceled" and "refunded".

Order

Order details.

FieldRequiredTypeDefaultExampleDescription
idrequiredstring"or123"Order identifier.
currencyrequiredstring"EUR"The currency used in monetary values. Supported values: "PLN", "CAD", "HKD", "AUD", "SEK", "TRY", "BRL", "KRW", "CZK", "BGN", "ETH", "CLP", "GBP", "MXN", "THB", "ISK", "SGD", "CHF", "INR", "LTC", "CNY", "PHP", "RON", "BTC", "DKK", "XAU", "XAG", "JPY", "ARS", "HUF", "MYR", "USD", "RUB", "NZD", "IDR", "ILS", "NOK", "NAD", "EUR", "ZAR" and "HRK".
totalrequirednumber102.5Total value of the order with all discounts, canceled and refunded line items already considered, including subtotal and tax.
subtotalnumber085Subtotal order price.
taxnumber011.5Tax value.
shippingnumber06Shipping cost.
discountDiscount{...}Discount applied to the order.
refundnumber0Processed refund value.
paymentMethodstring"Visa"The payment method.
shippingMethodstring"UPS"The shipping method.
shippingCountrystring"France"The destination country.
sourcestring"web"Source from where the order was placed. Examples are web, phone call, POS.
promotionsarray of string[][...]Vouchers applied in the purchase.

Discount

Discount applied to the product. One of Percentage Discount, Price Discount or Value Discount.

Percentage Discount

A discount description where the percentage discounted is provided.

FieldRequiredTypeDefaultExampleDescription
percentagerequirednumber0.25The percentage of the discount.

Price Discount

A discount description where the price after the discount is provided.

FieldRequiredTypeDefaultExampleDescription
pricerequirednumber42The price after the discount.
currencyrequiredstring"EUR"The currency used in monetary values. Supported values: "PLN", "CAD", "HKD", "AUD", "SEK", "TRY", "BRL", "KRW", "CZK", "BGN", "ETH", "CLP", "GBP", "MXN", "THB", "ISK", "SGD", "CHF", "INR", "LTC", "CNY", "PHP", "RON", "BTC", "DKK", "XAU", "XAG", "JPY", "ARS", "HUF", "MYR", "USD", "RUB", "NZD", "IDR", "ILS", "NOK", "NAD", "EUR", "ZAR" and "HRK".

Value Discount

A discount description where the value of the discount is provided.

FieldRequiredTypeDefaultExampleDescription
valuerequirednumber10The total value of the discount.
currencyrequiredstring"EUR"The currency used in monetary values. Supported values: "PLN", "CAD", "HKD", "AUD", "SEK", "TRY", "BRL", "KRW", "CZK", "BGN", "ETH", "CLP", "GBP", "MXN", "THB", "ISK", "SGD", "CHF", "INR", "LTC", "CNY", "PHP", "RON", "BTC", "DKK", "XAU", "XAG", "JPY", "ARS", "HUF", "MYR", "USD", "RUB", "NZD", "IDR", "ILS", "NOK", "NAD", "EUR", "ZAR" and "HRK".