Skip to content

Instantly share code, notes, and snippets.

@maxkremer
Last active November 2, 2016 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxkremer/e3fb413ec31ae0cbaf6f7f2e3ffd7a16 to your computer and use it in GitHub Desktop.
Save maxkremer/e3fb413ec31ae0cbaf6f7f2e3ffd7a16 to your computer and use it in GitHub Desktop.
{
// Unique customer ID or database ID.
"id": "CUSTOMERID0001",
// Customer information.
"email_address": "bonzo@zeppelin.co.uk",
"phone": "15551212", // Phone number (digits only)
"first_name": "John",
"last_name": "Bonham",
"company": "LZ Records",
"address":
{
"country": "Canada",
"city": "London",
"region": "Ontario",
"postal": "PLM2N5",
"address": "123 Any Lane"
},
// Magento customer database ID if available.
"magento_id": 1401
// Place any other custom traits/properties that decorate the person in here.
"custom_traits": {
// Put key-value properties in here.
// Primitive values only, no nesting of objects or arrays please.
},
// Array or orders/transactions associated with the person for the data dump interval.
"orders":
[
{
// Order ID and database record ID if not the same.
// Note that Magento orders use a "friendly" order ID that differs from the database record ID.
"id": "DATABASEROWID",
"order_id": "ORDERNUMBER"
// Timestamp for the order - Please choose unix epoch in milliseconds/seconds or ISO8601 date.
"timestamp": 1478098506629,
// Order channel - an example
"channel": "Best Buy",
// Optional - assumed to be CAD if not present.
// WARNING! Values will be converted to CAD using current exchange rate at time of import
"currency": "USD",
// Properties of the order/invoice.
"subtotal": 0,
"total": 907.98, // Grand total for invoice
"revenue": 0, // Profit from this sale, if known.
"shipping": 4.22, // Shipping cost if applicable.
"shipping_method": "Canada Post (ground shipping)", // Description of shipping method.
"tax": 17.98,
"discount": 10.00, // Any discount amount if applicable.
"coupon": "COUPON_CODE_0001", // Any coupon code if applicable.
// Products or line items of the order/invoice.
"products":
[
{
"id": "001", // Optional database ID for the product.
"sku": "100008964-9343",
"name": "Big bad drum set",
"price": 895.99,
"quantity": 3,
},
{
"id": "005",
"sku": "100008964-32423",
"name": "Drum Sticks",
"price": 12.99,
"quantity": 1,
}
],
// Order notes.
"note": "This is a note"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment