Loading...
Area: Episerver Product Recommendations
Applies to versions: 1.4 and higher (Personalization API)
Other versions:

Offline order tracking endpoint

Recommendations [hide]

The offline order tracking endpoint lets you send customer offline order information to Episerver 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:

"lang" : "en-gb"

If not supplied, the above will be used by default. See Language codes.

user

For example:

"user" : {…}

Note: When user is given, either email or id must be supplied. If user is omitted, the order data will not be used used to enrich that user's behavior.

  email

[Deprecated] [Optional] The email address of the customer. For example:

"email" : "john.customer@email.com"

Note: email was deprecated and kept for backward compatibility. Use id instead.

  id

[Optional] Pseudonymised ID of the user. For example:

"id" : "abcd1234efgh"

This identifies the user in the Personalization system. Use the user ID to improve offline order tracking and product recommendations; you can use it also in other Episerver products, such as Mail and Triggers.

Note: For Product Recommendations, to prevent user behavior from being lost, you need to send us an up-to-date mapping between email addresses and pseudonymized user IDs. This only needs to be provided once so that Episerver 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 Episerver before use. For example:

"info" : {
           "gender"  : "female", 
           "allergy" : "nuts",
           "diet"    : "vegan"
           "store"   : "StreamlyCool Bluewater"
           "colour"  : "yellow"
           "size"    : "10"
         }

New records are created; existing records are updated.

order
"order" : {…}
  refCode

orderDate

currency

shipping

subTotal

total
"refCode"   : "orderRef123",
"orderDate" : "orderRef123",
"currency"  : "GBP",
"shipping"  : 0.0,
"subTotal"  : 100.0,
"total"     : 100.0
  items
"items" : [{…},{…},{…},…]
  refCode

qty

price

attributes
"refCode"    : "CB4551",
"qty"        : 1,
"price"      : 6.5,
"attributes" : { "discount": "true" }

 

attributes

[Optional]

"attributes" : {
                 "store"         : "StreamlyCool Regent Street",
                 "storePostcode" : "W1B 4HX",
               }

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 end point follows one of the following formats, depending on your provisioned environment:
    • https://<sitename>.peerius.com/tracker/smart-api/orders/offline
    • https://<sitename>.peerius.episerver.net/tracker/smart-api/orders/offline

Contact Episerver if you are unsure which domain applies to your integration.

Notes

  • The sitename part of this address will be assigned by Episerver.

  • 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.

  • Always ensure HTTPS is in the URL.

  • Offline orders sent via API will be used to enrich an individual's personal experience after the user logs onto 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 Episerver.
Do you find this information helpful? Please log in to provide feedback.

Last updated: Nov 06, 2017

Recommendations [hide]