Offline order tracking endpoint
The offline order tracking endpoint lets you send offline customer order information to Optimizely in real-time.
The order information contains information about the customer and the products they have just purchased offline. The API expects the following format for the JSON payload.
Parameters | Description | ||
---|---|---|---|
lang | [Optional] Language code of the store, for example:
If not specified, en-gb is the default. See Language codes. |
||
user | For example:
Note: When user is given, either email or id must be supplied. If user is omitted, the order data will not be used to enrich that user's behavior. |
||
[Deprecated] [Optional] The email address of the customer. For example:
Note: email was deprecated and kept for backward compatibility only. Use id instead. |
|||
id | [Optional] Pseudonymised ID of the user. For example:
This identifies a user in the Personalization system. Use the user ID to improve offline order tracking and product recommendations; you can use it also in other Optimizely products, such as Email Product Recommendations and Triggered Messages.Note: For Product Recommendations, to prevent user behavior from being lost, send Optimizely an up-to-date mapping between email addresses and pseudonymized user IDs. This needs to be provided only once so that Optimizely Personalization can replace existing customer email addresses with their corresponding pseudonymized user ID. |
||
info | [Optional] Information about the customer, such as their diet, allergies, gender, loyalty card information. This is given in key-value pairs; the keys need to be defined with Optimizely before use. For example:
New records are created; existing records are updated. |
||
order |
|
||
refCode orderDate customerId currency shipping subTotal total |
|
||
items |
|
||
refCode qty price attributes |
|
||
|
attributes | [Optional]
|
Example
{
"lang" : "en-gb",
"user" : {
"id" : "abcd1234efgh",
"info" : {"gender": "male"}
},
"order" : {
"refCode" : "orderRef",
"orderDate" : "2016-05-16T14:25:00 GMT",
"currency" : "GBP",
"shipping" : 0.0,
"subTotal" : 90.0,
"total" : 90.0,
"items" : [
{
"refCode" : "ref1",
"qty" : 1,
"price" : 50.0,
"attributes" : {"discount" : "true"}
},
{
"refCode" : "ref2",
"qty" : 2,
"price" : 20.0,
"attributes" : {"attr21" : "value21"}
}
],
"attributes" : {
"store" : "StreamlyCool Regent Street",
"storePostcode" : "W1B 4HX"
}
}
}
- The URL for testing in the UAT environment is:
https://uat.peerius.com/tracker/smart-api/orders/offline
- The URL with the production endpoint follows one of the following formats, depending on your provisioned environment:
- United Kingdom (UK) cluster –
https://<sitename>.peerius.com/tracker/smart-api/orders/offline
- Sweden (SE) cluster –
https://<sitename>.peerius.episerver.net/tracker/smart-api/orders/offline
- United States West (US) cluster –
https://<sitename>.uswe01.productrecs.episerver.net/tracker/smart-api/orders/offline
- United Kingdom (UK) cluster –
Contact Optimizely if you are unsure which domain applies to your integration.
Notes
- The sitename part of this address is assigned by Optimizely.
- This entry point requires a request header containing the authentication parameters defined in the Header information section.
- The request body needs to be sent in a POST request.
- Ensure HTTPS is in the URL.
- Offline orders sent via API are used to enrich an individual's personal experience after the user logs into your online site and you track the user. Offline orders passed via API do not affect crowd behavior and algorithms by default. If the offline order data influences online algorithms, contact Optimizely.
Updated 2 months ago