Properties for Synced Magento Orders

read

Overview

Below are example JSON payloads for the Placed Order, Ordered Product and Fulfilled Order metrics that match the properties we store for orders synced through the Magento SOAP API.

This is useful for sending the correct properties for orders that will be combined with Magento order data.

Placed Order

// 
// PLACED ORDER
// ------------------------------------------

{
  "token" : "API_KEY",
  "service" : "magento",
  "event" : "Order",
  "customer_properties" : {
    "$email" : "john.smith@example.com",
    "$first_name" : "John",
    "$last_name" : "Smith"
  },
  "properties" : {
    "$event_id" : "1234",
    "$value" : 29.98,
    "$extra" : {},
    "Currency Code" : "USD",
    "Item Count" : 2,
    "Items" : ["Winnie the Pooh", "A Tale of Two Cities"], // If an item is ordered more than once, duplicate it. For example, someone orders two t-shirts this would be: ["T-Shirt", "T-Shirt"]
    "Discounted" : true,
    "Coupon" : "COUPON123",
    "Unique Items" : ["Winnie the Pooh", "A Tale of Two Cities"],
    "Item Categories" : ["Fiction", "Classics", "Children"],
    "Unique Item Categories" : ["Fiction", "Classics", "Children"]
  },
  "time" : 1387302423
}

Ordered Product

// 
// ORDERED PRODUCT
// ------------------------------------------

{
  "token" : "API_KEY",
  "service" : "magento",
  "event" : "$ordered_product",
  "customer_properties" : {
    "$email" : "john.smith@example.com",
    "$first_name" : "John",
    "$last_name" : "Smith"
  },
  "properties" : {
    "$event_id" : "123456789", // LineId (unique)
    "$value" : 9.99,
    "Currency Code" : "USD",
    "Name" : "Winnie the Pooh",
    "SKU" : "WINNIEPOOH",
    "ProductID" : "567",
    "Categories" : ["Fiction", "Classics"],
    "Price" : 9.99,
    "Discounted" : true,
    "Cost" : 5.00, // (optional),
    "Attribute: Color" : "Red" // product attributes (optional)
    "$extra" : {
        "Product URL Key" : "winnie-pooh",
        "Product URL" : "https://www.store.com/winnie-pooh",
        "Image URL" : "https://cnd.store.com/images/winnie-pooh.png",
    }
  },
  "time" : 1387302423
}

Fulfilled Order

// 
// FULFILLED ORDER
// ------------------------------------------

{
  "token" : "API_KEY",
  "service" : "magento",
  "event" : "Order complete",
  "customer_properties" : {
    "$email" : "john.smith@example.com",
    "$first_name" : "John",
    "$last_name" : "Smith"
  },
  "properties" : {
    "$event_id" : "1234",
    "$value" : 29.98,
    "$extra" : {},
    "Currency Code" : "USD",
    "Item Count" : 2,
    "Items" : ["Winnie the Pooh", "A Tale of Two Cities"], // If an item is ordered more than once, duplicate it. For example, someone orders two t-shirts this would be: ["T-Shirt", "T-Shirt"]
    "Discounted" : true,
    "Coupon" : "COUPON123",
    "Unique Items" : ["Winnie the Pooh", "A Tale of Two Cities"],
    "Item Categories" : ["Fiction", "Classics", "Children"],
    "Unique Item Categories" : ["Fiction", "Classics", "Children"]
  },
  "time" : 1387302423
}
 
Was this article helpful?
0 out of 0 found this helpful