Order Event Structure

Order Event

Property NameDescription
event*
(required)
"event": "order"
value should be in small case. (Like 'order' NOT 'ORDER')
properties*
(required)
"properties": { "orderId": "1234" "amount": 100.25 "status": "pending" }

Required properties

All properties related to order should be present inside properties, You be sent your custom event properties here too.
userProperties*
(required)
"userProperties": { "uid": '123456' //require properties, unique id of customer. "email": "[email protected]", "phone": "123-456-7890" }
All properties related to customer should be present inside userProperties, You be sent your custom user properties here too.
time*
(required)
"time": {
sentAt: 1629131492259
}
sentAt : The date and time when the event was sent.
appClientId*
(required)
"appClientId": "API_KEY"
Unique id represent the source in Richpanel.
Change for each website, can be found in Richpanel app.

Order Properties

Property NameDescription
orderId*
(required)
"orderId": "1234"
Unique id of order.
orderDbKey
(required)
"orderDbKey": 876541234
If the order has a different database id, it must be provided here or can be kept the same as orderId. We use this to create a link to the order management portal.
amount*
(required)
"amount": 100.25
Total amount of the order.
currency"currency": "USD"
Currency in which the order amount's are defined.
createdAt"createdAt": 1629131492259
The date and time (ISO 8601 format) when the order was created.
updatedAt"updatedAt":1629131492259
The date and time (ISO 8601 format) when the order was updated.
status"status": "processing"
Example: cancelled, proessing, confirmed, or any custom text.
Something that suits your system.
fulfillmentStatus"fulfillmentStatus": "fulfilled"
The order's status in terms of fulfilled line items.
Example: fulfilled, unfulfilled, partially_fulfilled, or any custom text. Something that suits your system.
financialStatus"financialStatus": "paid"
The status of payments associated with the order. Example : paid, pending, partially_refunded, refunded, authorized, or any other text. Something that suits your system.
paymentMethod"paymentMethod": "paypal"
Name of the payment method used.
processingMethod"processingMethod": "express",
statusUrl"statusUrl": "https://ecome.com/26376372301/orders/21a1de0135e78dcda5f9fa2bac72587f/authenticate?key=cf1180676b7f5ec2d83e0bf1e563b126",
discountAmount
shippingAmount
taxAmount
tipAmount
amount
Float properties
"discountAmount": 10.50
"shippingAmount": 25
"taxAmount": 12.25
"tipAmount": 5
amount: 100.00

"discountAmount": total discount amount for the order.
"shippingAmount": Total shipping amount of the order.
"taxAmount": Total amount spend in tax for the order.
tipAmount: Total tip collected from the order.
amount: Total amount of the order.
billingPhone
billingEmail
billingFirstName
billingLastName
billingAddressLine1
billingAddressLine2
billingCity
billingState
billingCountry
billingPostcode
All string properties, and optional
billingPhone: The phone number at the billing address.
billingEmail: The Email at the billing address.
billingFirstName: The first name of the person associated with the payment method.
billingLastName: The last name of the person associated with the payment method.
billingAddressLine1: The street address of the billing address.
billingAddressLine2: An optional additional field for the street address of the billing address.
billingCity: The city, town, or village of the billing address.
billingState: The name of the region (for example, province, state, or prefecture) of the billing address.
billingCountry: The name of the country of the billing address.

billingPostcode: The postal code (for example, zip, postcode, or Eircode) of the billing address.



shippingPhone
shippingEmail
shippingFirstName
shippingLastName
shippingAddressLine1
shippingAddressLine2
shippingCity
shippingState
shippingCountry
shippingPostcode
All string properties, and optional
shippingPhone: The phone number at the shipping address.
shippingEmail: The Email at the shipping address.
shippingFirstName: The first name of the person associated with the shipping address.
shippingLastName: The last name of the person associated with the shipping address.
shippingAddressLine1: The street address of the shipping address.
shippingAddressLine2: An optional additional field for the street address of the shipping address.
shippingCity: The city, town, or village of the shipping address.
shippingState: The name of the region (for example, province, state, or prefecture) of the shipping address.
shippingCountry: The name of the country of the shipping address.
shippingPostcode: The postal code (for example, zip, postcode, or Eircode) of the shipping address.
shippingMethod"shippingMethod": "Free Shipping 2-5 Days",

Name of the shippping method used.
coupons"coupons": ["NEW_USER", "FREE20"]
Coupons use in the order, while placing the order.
items*
(required)
"items": [{
"id": "2493989519418",
"price": 49.99,
"optionId": "31858336956474",
"sku": "A31SSUJZ99COMTL1",
"name": "My Product - L",
"grams": 454,
"quantity": 1,
}]
id: The ID of the product.
price: Price for single quantity of the variant product.
quantity:The number of items that were purchased.
optionId: The ID of the product variant.
sku: The item's SKU (stock keeping unit).
name: The name of the product variant.
grams: The weight of the item in grams.
fulfillment"fulfillment": [{
"id": "2488098717754", //required
"createdAt": 1608611436000,
"updatedAt": 1609187662000,
"status": "delivered",
"tracking": [{
"trackingNumber": "1234578162783",
"trackingCompany": "USPS",
"shippingDate": 1608611436000,
"trackingUrl": "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=1234578162783"
}],
"items": [{
"id": "2493989519418", //required, Product base id
"price": 49.99, //required
"optionId": "31858336956474", //product variant id
"sku": "A31SSUJZ99COMTL1",
"name": "My Product - L", //required
"grams": 454,
"quantity": 1, //required
}]
}

id : Unique Id of fulfillment object.
status: Current status of fulfillment.
tracking: Tracking details of fulfillment.
items: Product details of fulfillment.

User Properties Object (userProeprties)

Example:
{
event: "order",
properties: {},
userProperties: {} // User Properties
}

Property NameDescription
uid*
(required)
Unique Id of the user.
phonePhone number of the user.
emailEmail address of the user.
firstNameFirst name of the user
lastNameLast name of the user.
billingAddress"billingAddress": {
"firstName": "Shubhanshu",
"lastName": "Chouhan",
"city": "LOCKPORT",
"state": "Illinois",
"stateCode": "IL",
"country": "United States",
"countryCode": "US",
"postcode": "60441",
"phone": null,
"address1": "201B, lotus chs",
"address2": "",
"company": ""
},

Billing details of the customer.
shippingAddress"shippingAddress": {
"firstName": "Shubhanshu",
"lastName": "Chouhan",
"city": "LOCKPORT",
"state": "Illinois",
"stateCode": "IL",
"country": "United States",
"countryCode": "US",
"postcode": "60441",
"phone": null,
"address1": "201B, lotus chs",
"address2": "",
"email": "[email protected]"
},
Shipping details of the user.
Custom PropertiesAny other properties which belong's to user.

Sample Order Event

{
	"event": "order",
	"properties": {
		"orderId": "11111",
		"orderDbKey": 2589211394106, 
		"email": "[email protected]",
		"amount": 169.97, //required
		"subTotalPrice": 159.97,
		"totalWeight": 2812,
		"weightUnit": "grams",
		"taxAmount": 10,
		"currency": "USD",
    "status": "processing",
		"discountAmount": 149.97,
		"coupons": [
			"code1"
		],
		"deleteFulfillmentAndCreate": true, 
		"statusUrl": "https://abc.com/10672582/orders/fd1051b534691f2cd00495d6f2fcdd45", //tracking url if any
		"paymentStatus": "partially_refunded",
		"fulfillmentStatus": "fulfilled",
		"tipAmount": 0,
		"orderName": "#606243", 
		"paymentMethod": "paypal",
		"paymentGatewayNames": [
			"paypal"
		],
		"processedAt": 1606758898000,
		"processingMethod": "express",
		"items": [{ //required
				"id": "2493989519418", 
				"price": 49.99, //required
				"optionId": "31858336956474", 
				"sku": "A31SSUJZ99COMTL1",
				"name": "My Product - L", 
				"grams": 454,
				"quantity": 1, //required
				"imageURL": [
					"https://cdn.abc.com/s/files/1/1067/2582/products/product1.jpg?v=1605207140"
				]
			},
			{
				"id": "4586759913530",
				"price": 49.99,
				"optionId": "32132068311098",
				"sku": "A31SSUGI85ODGDM1",
				"name": "My Product - M",
				"grams": 454,
				"quantity": 1,
				"imageURL": [
					"https://cdn.abc.com/s/files/1/1067/2582/products/product2.jpg?v=1605207140"
				]
			}
		],
		"billingPhone": null,
		"billingCity": "LOCKPORT",
		"billingPostcode": "60441",
		"billingState": "Illinois",
		"billingCountry": "United States",
		"billingAddressLine1": "201B, lotus CHS",
		"billingAddressLine2": "",
		"firstName": "Shubhanshu",
		"lastName": "Chouhan",
		"shippingPhone": null,
		"shippingCity": "LOCKPORT",
		"shippingPostcode": "60441",
		"shippingState": "Illinois",
		"shippingCountry": "United States",
		"shippingAddressLine1": "201B, lotus CHS",
		"shippingAddressLine2": "",
		"shippingFirstName": "Shubhanshu",
		"shippingLastName": "Chouhan",
		"shippingMethod": "Free Shipping 2-5 Days",
		"fulfillment": [{
			"id": "2488098717754", //required
			"createdAt": 1608611436000,
			"updatedAt": 1609187662000,
			"status": "delivered",
			"quantity": 6,
			"tracking": [{
				"trackingNumber": "1234578162783",
				"trackingCompany": "USPS",
				"shippingDate": 1608611436000,
				"trackingUrl": "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=1234578162783"
			}],
			"items": [{ //required
					"id": "2493989519418", //required, Product base id
					"price": 49.99, //required
					"optionId": "31858336956474", //product variant id
					"sku": "A31SSUJZ99COMTL1",
					"name": "My Product - L", //required
					"grams": 454,
					"quantity": 1, //required
				},
				{
					"id": "4586759913530",
					"price": 49.99,
					"optionId": "32132068311098",
					"sku": "A31SSUGI85ODGDM1",
					"name": "My Product - M",
					"grams": 454,
					"quantity": 1,
				}
			]
		}],
    "shippingAmount": 10.45
	},
	"userProperties": { //required
		"uid": "[email protected]", //required, Customer user id in database
		"phone": null,
		"email": "[email protected]",
		"firstName": "Shubhanshu",
		"lastName": "Chouhan",
		"billingAddress": {
			"firstName": "Shubhanshu",
			"lastName": "Chouhan",
			"city": "LOCKPORT",
			"state": "Illinois",
			"stateCode": "IL",
			"country": "United States",
			"countryCode": "US",
			"postcode": "60441",
			"phone": null,
			"address1": "201B, lotus chs",
			"address2": "",
			"company": ""
		},
		"shippingAddress": {
			"firstName": "Shubhanshu",
			"lastName": "Chouhan",
			"city": "LOCKPORT",
			"state": "Illinois",
			"stateCode": "IL",
			"country": "United States",
			"countryCode": "US",
			"postcode": "60441",
			"phone": null,
			"address1": "201B, lotus chs",
			"address2": "",
			"email": "[email protected]"
		},
	},
	"time": {
		"sentAt": 1609966695361 //when event occurred, use this property in case you're updating old orders, or synchronizing old orders
	},
	"appClientId": "API_KEY" //change for each website, can be found in Richpanel app.
}

Note:

  • Make sure to follow the proper format
  • Don't send empty values.