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

Response message

Recommendations [hide]

The response message has the following properties:

Name Description Usage

status

 

The status of the request. One of the following:

  • OK. A successful request.
  • fail. An error occurred.
  • warning. Errors were found but a useful result was still returned.

Note: If a fail status is returned, a fatal error occurred, and the request could not be fulfilled. As a result, no recommendations are included in the response.

pageTrackingId

Unique identifier of the tracking page.

Currently for use with Personalized Search & Navigation only.

Used to track any future information or user event on this page. For example, a selected facet on a Search Results page.

Note: Available from version 1.3 of the Server-to-Server API.

errors

 

Shown if status is fail or warning.

 

code

Error code.

The type of error. See Error codes.

 

message

Explanation of the error.

Explanatory message with debug information. Where applicable, it might contain advice on how to solve the error.

session

 

Shown if status is OK.

 

session

ID of Episerver session established with the tracker.

The allocated session ID.

 

cuid

Consolidated user ID.

The value of the CUID.

info

Click information.

Displayed only if click information was provided in the request. An array of the Episerver products given in the request. Available values are smartRecs and smartContent.

 

smartRecs

Click information for Episerver product recommendations.

An array of click information for Product Recommendations.

 

 

click

Confirmation that the click was successful

[String]

 

 

 

id

Episerver product recommendation ID

[64-bit number]

The ID of the Episerver product recommendation. For example, "id": 5637282.

Failure response

If status is fail or warning, an errors element is returned after the status property. The value is a list of errors or warnings encountered. Failure response example.

{
  "status" : "fail",
  "errors" : [
 	       {
		 "code":"MalformedJson",
		 "message":"Json Parsing exception: Malformed JSON. Unexpected
		  character ('{' (code 123)): was expecting double-quote to start field 
		  name at character offset 1."
	       }
	     ]
}
Successful response

If the status is not fail, the session element is returned containing the current cuid session and pageTrackingId. These are string values, which contain a mix of alphanumeric and special characters.

{
  "status"	   : "OK",
  "pageTrackingId" : "523863900/4ubJYHs6gwcwUz9xCjCmng",
  "session"	   : {
		       "session" : "123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l",
		       "cuid"    : "09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O"
	             }
}
You should store the cuid in persistent storage and send it back to Episerver in future requests so the same customer can be tracked across multiple sessions (see Storing customer IDs).

The rest of the response includes the appropriate response considering the information of the track and the client tailored customization for the site. 

Do you find this information helpful? Please log in to provide feedback.

Last updated: Nov 06, 2017

Recommendations [hide]