Order Event Structure
Order Event
Property Name | Description |
---|---|
event* (required) |
value should be in small case. (Like 'order' NOT 'ORDER') |
properties* |
Required properties All properties related to order should be present inside properties, You be sent your custom event properties here too. |
userProperties* |
All properties related to customer should be present inside userProperties, You be sent your custom user properties here too. |
time* | "time": { |
appClientId* |
Unique id represent the source in Richpanel. |
Order Properties
Property Name | Description |
---|---|
orderId* (required) |
Unique id of order. |
orderDbKey |
If the order has a different database id, it must be provided here or can be kept the same as |
amount* |
Total amount of the order. |
currency |
Currency in which the order amount's are defined. |
createdAt |
The date and time (ISO 8601 format) when the order was created. |
updatedAt |
The date and time (ISO 8601 format) when the order was updated. |
status |
Example: cancelled, proessing, confirmed, or any custom text. |
fulfillmentStatus |
The order's status in terms of fulfilled line items. |
financialStatus |
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 |
Name of the payment method used. |
processingMethod |
|
statusUrl | "statusUrl": "https://ecome.com/26376372301/orders/21a1de0135e78dcda5f9fa2bac72587f/authenticate?key=cf1180676b7f5ec2d83e0bf1e563b126", |
discountAmount | Float properties "discountAmount": total discount amount for the order. |
billingPhone | All string properties, and optional
|
shippingPhone | All string properties, and optional
|
shippingMethod | "shippingMethod": "Free Shipping 2-5 Days", Name of the shippping method used. |
coupons | "coupons": ["NEW_USER", "FREE20"]["NEW_USER", "FREE20"] |
items* | "items": [{
|
fulfillment | "fulfillment": [{
|
User Properties Object (userProeprties)
Example:
{
event: "order",
properties: {},
userProperties: {} // User Properties
}
Property Name | Description |
---|---|
uid* (required) | Unique Id of the user. |
phone | Phone number of the user. |
Email address of the user. | |
firstName | First name of the user |
lastName | Last name of the user. |
billingAddress | "billingAddress": { Billing details of the customer. |
shippingAddress | "shippingAddress": { |
Custom Properties | Any 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.
Updated 14 days ago