You are on page 1of 28

Engagement History API

Document Version: 2.3


April 2016














LIVEENGAGE

ENGAGEMENT HISTORY API

Contents
Introduction ........................................................................................................................................ 3
Methods ............................................................................................................................................. 4
Retrieve Engagement List by Criteria ............................................................................................. 4
Request ....................................................................................................................................... 4
Response .................................................................................................................................... 9
Appendix ........................................................................................................................................... 18
Engagement Attributes ................................................................................................................ 18
CartStatus ................................................................................................................................. 18
customerInfo ............................................................................................................................ 19
Lead .......................................................................................................................................... 20
marketingCampaignInfo ........................................................................................................... 21
personalInfo ............................................................................................................................. 22
Purchase ................................................................................................................................... 23
serviceActivity ........................................................................................................................... 24
VisitorError ............................................................................................................................... 25
viewedProduct .......................................................................................................................... 26
Sample Code .................................................................................................................................... 27

2
LIVEENGAGE

ENGAGEMENT HISTORY API

Introduction
Brands can now search, filter and keep copies of chat transcripts and related data, for example
surveys, to later integrate and further analyze their data with third-party tools (DWH, CRM
systems, etc.). 99.5 % of chat transcript data is available within 5 minutes. All other chat transcript
data, including metadata, for example, Engagement Attributes, is available within 2 hours after a
chat has ended, and is stored for 13 months.

The Engagement History API is based on the REST architecture style.

3
LIVEENGAGE

ENGAGEMENT HISTORY API

Methods
The LiveEngage Engagement History API includes 1 method:
Retrieve engagement list by criteria

Retrieve Engagement List by Criteria


This returns a list of engagements with all their metadata and related transcripts, based on a given
filter, for example, time range, skill/s, keywords, etc.

Request
Method URL

POST https://<domain>/interaction_history/api/account/{accountID}/interactions/search
?<url_parameters>

URL Parameters

Optional:

Name Description Type / Value


offset The offset from where to retrieve the chat. Default is 0. numeric
limit Max chats to be received in the response. Default is 50. numeric
Max value is 100. The remaining chats can be obtained
using pagination (using offset, in a subsequent request).
sort Sort the results in a predefined order. string.
Example: Valid values include:
start:des will order chats by descending value of the start start, end, duration,
time. visitor, engagementId,
start:asc,duration:desc will orders chat by ascending interactive, visitor,
value of start time AND then by descending value of agentId,
duration. skillId(multiple values
are valid).
Order:[asc/des]

4
LIVEENGAGE

ENGAGEMENT HISTORY API

BODY/POST Parameters

Filter is sent in the POST data with the following JSON structure.

Required:

Name Description Type / Value


start Chat timeframe. From and to are both mandatory. long - epoch time in
{from,
From/to value is rounded to the last/next round 10 milliseconds.
to}
minutes respectively.
The maximum time interval is one month. Larger intervals
will be rejected.
Note: The limitation applies when searching by specific
visitor ID, engagement ID.
keyword_ Area of keyword lookup. Valid values:
search_a
chatLine,
rea
surveyAnswer,
surveyQuestion,
visitorInfo,
ea.purchase,
ea.viewedProduct,
ea.cartStatus,
ea.serviceActivity,
ea.visitorError,
ea.lead,
ea.customerInfo,
ea.marketingCampaig
nInfo, ea.personalInfo,
mcs

Optional:

Name Description Type / Value


skillIds An array of skill IDs represented as numbers. Array<skillID>
agentIds An array of agent IDs represented as numbers. Array<agentID>
agentGro An array of agent group IDs represented as numbers. Array<agentGroupID>
upIds

duration Range of engagement length in seconds. If passed, then numeric, numeric


{from, from and to are both mandatory.
to}

interact True or false. Only interactive=true is supported boolean

5
LIVEENGAGE

ENGAGEMENT HISTORY API

ive

keyword Keyword or phrases to search in the selected areas. alphanumeric


In order to search for a phrase, wrap the phrase with
quotation marks.
Note: Multiple phrases are not supported.
ended The chat has ended. boolean
visitor Visitor ID. When used, all time limitations are ignored. alphanumeric
channel Engagement channel ID. Integer representing
one of the following
options:
UNKNOWN(-
1)WEB(1), VOICE(2);
engageme Engagement ID. When used, all time limitations are numeric
ntId
ignored.

Request example 1:
Simple Chat Search by time range
In the example below, we ask for chats that occurred between the 1st of June and the 30th of
June 2015.

{
"interactive":true,
"ended":true,
"start":{
"from":1433140200000,"to":1435645800000
}
}

Request example 2:
Keyword Search: Chat Search by time range and keyword
In the example below, we ask for chats that occurred between the 1st of June and the 30th of
June 2015, which contain the word iPad within the text available for lookup.

{
"interactive":true,
"ended":true,
"start":{
"from":1433140200000,"to":1435645800000
},
keyword: ipad,
"keyword_search_area": {
"types": [
"chatLine",

6
LIVEENGAGE

ENGAGEMENT HISTORY API

"surveyAnswer",
"surveyQuestion",
"ea.purchase",
"ea.viewedProduct",
"ea.cartStatus",
"ea.serviceActivity",
"ea.visitorError",
"ea.lead",
"ea.customerInfo",
"ea.marketingCampaignInfo",
"ea.personalInfo"
]
}
}

Request example 3:
In this example, we reduce the previous search, and require that the skill matches the skill IDs
{14, 17, 18} that were conducted by agentID 109 or 169, where the duration was between 0
and 180 seconds, and focus only on the transcript.

{
"interactive": true,
"ended": true,
"start": {
"from": 1437054059354,
"to": 1437661693023
},
"skillIds": [
"14",
"17",
"18"
],
"agentIds": [
"109",
"169"
],
"duration": {
"from": 0,
"to": 180
},
"keyword": "ipad",
"keyword_search_area": {"types": ["chatLine" ] }
}

Request example 4:

7
LIVEENGAGE

ENGAGEMENT HISTORY API

Chat Search by time range and mcs
In this example, we are searching for chats that have a positive mcs.

{
"interactive": true,
"ended": true,
"start": {
"from": 1437054059354,
"to": 1437661693023
},
"keyword_search_area": {"types": ["mcs"]},"mcs": 1
}

8
LIVEENGAGE

ENGAGEMENT HISTORY API

Response
Example

{
"_metadata": {
"count": 9870,
"next": {
"rel": "next",
"href":
"http://localhost:8080/interaction_history/api/account/qa84481505/interactions/search?limit=50&offset=
50"
},
"last": {
"rel": "last",
"href":
"http://localhost:8080/interaction_history/api/account/qa84481505/interactions/search?limit=50&offset=
9850"
},
"self": {
"rel": "self",
"href":
"http://localhost:8080/interaction_history/api/account/qa84481505/interactions/search?limit=50&offset=
0"
},
"shardsStatusResult": {
"failureShards": 0,
"totalShards": 6,
"partialResult": false
}
},
"interactionHistoryRecords": [
{
"info": {
"startTime": "2015-05-28 04:46:23.209+0000",
"startTimeL": 1432788383209,
"endTime": "2015-05-28 04:46:23.410+0000",
"endTimeL": 1432788383410,
"duration": 0,
"visitorId": "ozimnjlwddrzbhnfhjkdao",
"visitorName": "Joe",
"engagementId": "qa844815054294982965",
"isInteractive": true,
"accountId": "qa84481505",
"agentId": "3",
"agentName": "Greg",
"agentLoginName": "greg@liveperson.com",
"skillId": -1,
"skillName": "marketing",
"channel": 1,

9
LIVEENGAGE

ENGAGEMENT HISTORY API

"startReason": "0",
"startReasonDesc": "Visitor request",
"endReason": "210",
"endReasonDesc": "Visitor closed chat",
"engagementSet": 0,
"engagementSequence": 0,
"agentGroupId": -1,
"agentGroupName": "NA",
"mcs": null,
"ended": true,
"chatDataEnriched": false,
},
"transcript": {
"lines": [
{
"time": "2015-05-28 04:46:19.147+0000",
"timeL": 1432788379147,
"controlType": 4,
"text": "Thank you for choosing to chat with us. An agent will be with you shortly.",
"by": "info",
"source": "system",
"subType": "REGULAR",
"textType": "plain",
"cannedAnswerType": 0
},
{
"time": "2015-05-28 04:46:23.176+0000",
"timeL": 1432788383176,
"controlType": 3,
"text": "You are now chatting with hotopic@liveperson.com",
"by": "info",
"source": "system",
"subType": "REGULAR",
"textType": "plain",
"cannedAnswerType": 0
},
{
"time": "2015-05-28 04:46:23.411+0000",
"timeL": 1432788383411,
"controlType": 5,
"text": "Thank you for chatting with us.",
"by": "info",
"source": "system",
"subType": "REGULAR",
"textType": "plain",
"cannedAnswerType": 0
}
]
},
"campaign":{
"campaignEngagementId": "1759631410",
"campaignEngagementName": "Dummy1",

10
LIVEENGAGE

ENGAGEMENT HISTORY API

"campaignId": "1340122410",
"campaignName": "Live Chat on your site",
"goalId": "1340122310",
"goalName": "Interact with visitors",
"visitorBehaviorId": "1340122110",
"visitorBehaviorName": "Any behavior",
"visitorProfileId": "1340122010",
"visitorProfileName": "All visitors"
},
"visitorInfo": {
"country": "United States",
"state": "California",
"city": "San Jose",
"isp": "Comcast",
"org": "Amazon",
"device": "DESKTOP",
"ipAddress": "192.168.13.209",
"browser": "Chrome 47.0.2526.111",
"operatingSystem": "WINDOWS"
},
"sdes": {
"events": [
{
"cartStatus": {
"serverTimeStamp": "1435764972045",
"total": "11.7",
"numItems": "6",
"products": [
{
"quantity": "1",
"product": {
"name": "prod1",
"category": "category",
"sku": "sku",
"price": "7.8"
}
}
]
}
},
{
"customerInfo": {
"serverTimeStamp": "1436258709564",
"customerInfo": {
"customerStatus": "cancelled",
"customerType": "vip",
"balance": "-400.99",
"customerId": "138766AC",
"lastPaymentDate": {
"year": "2014",
"month": "10",
"day": "15"

11
LIVEENGAGE

ENGAGEMENT HISTORY API

},
"registrationDate": {
"year": "2013",
"month": "5",
"day": "23"
}
}
}
},
{
"lead": {
"lead": {
"topic": "luxury car test drive 2015",
"value": "22.22",
"leadId": "xyz123"
},
"serverTimeStamp": "1435780135906"
}
},
{
"marketingCampaignInfo": {
"serverTimeStamp": "1436703809351",
"marketingCampaignInfo": {
"originatingChannel": "1",
"affiliate": "Yahoo",
"campaignId": "US coupon campaign"
}
}
},
{
"personalInfo": {
"serverTimeStamp": "1436436923641",
"name": "ELI",
"surname": "leibovitz",
"gender": "MALE",
"company": "company",
"customerAge": {
"customerAgeInYears": "35.0",
"customerYearOfBirth": "1978",
"customerMonthOfBirth": "7",
"customerDateOfBirth": "25"
},
"contacts": [
{
"personalContact": {
"email": "myname@example.com",
"phone": "+1 212-788-8877"
}
}
]
}
},

12
LIVEENGAGE

ENGAGEMENT HISTORY API

{
"purchase": {
"total": "11.7",
"serverTimeStamp": "1434394476705",
"cart": {
"total": "17.8",
"serverTimeStamp": null,
"products": [
{
"quantity": "3",
"product": {
"name": "antivirus pro plan",
"category": "software",
"sku": "xyz001",
"price": "7.8"
}
}
],
"numItems": "13"
},
"orderId": "DRV1534XC"
}
},
{
"serviceActivity": {
"serverTimeStamp": "1435780135922",
"serviceActivity": {
"topic": "order checkbook",
"status": "0",
"category": "finance",
"serviceId": "service12"
}
}
},
{
"viewProduct": {
"serverTimeStamp": "1434394466093",
"products": [
{
"quantity": null,
"product": {
"name": "red high heel shoe",
"category": "women shoes",
"sku": "xyz567",
"price": "77.8"
}
}
]
}
},
{
"formFillingError": {

13
LIVEENGAGE

ENGAGEMENT HISTORY API

"serverTimeStamp": "1435764972047",
"visitorError": {
"contextId": "context.id",
"message": {
"string": "Expiration date missing"
},
"code": {
"string": "er100004"
},
"level": "2",
"resolved": "true"
}
}
}
]
}
}
]
}

Elements in the Response

Name Description Type / Value


_metadata Metadata about the whole response. container
rel Name of a link to be used in the next request. alphanumeric (256)
href A specific link to be used in the next request. alphanumeric (256)
count Number of sessions for the current query/filter. numeric
info Information about a specific chat. container
isInteractive The chat was interactive (at least one visitor line). boolean
engagementId Real-time Session ID that represents the chat. alphanumeric (256)
This Id is the accountID combined with the real
time ID.
sharkEngagement ** ID for internal use only ** alphanumeric (256)
Id

startTime Engagement start time. alphanumeric (yyyy-


MM-
ddThh:mm:ss.SSS+ti
mezone)
endTime Engagement end time. alphanumeric (yyyy-
MM-
ddThh:mm:ss.SSS+tim
ezone)

14
LIVEENGAGE

ENGAGEMENT HISTORY API

duration Measurement of the duration of the engagement numeric
(in seconds). Amount of time the visitor is
connected to an agent until the Engagement
Window is closed.
visitorId visitor ID. alphanumeric (256)
visitorName The visitors name. alphanumeric
agentId agent ID. numeric
agentName The agents nickname. alphanumeric (256)
agentLoginName The agents login name. alphanumeric (256)
agentGroupId agent group ID. numeric
agentGroupName Name of the group the agent belongs to. alphanumeric (256)
skillId skill ID. numeric
skillName The skill name. alphanumeric (256)
isAgentSurvey Was there an agent survey in the engagement? boolean
isPostChatSurve Was there a post chat survey in the engagement? boolean
y

isPreChatSurvey Was there a pre chat survey in the engagement? boolean


channel Engagement channel. Only chat is supported. numeric
engagementSet Counter for split engagements within one visit numeric
session.
engagementSeque Counter for number of transferred engagements numeric
nce
within one visit session.
transcript Transcript data of the chat. container
startReason Code indicates the reason the chat started. numeric
startReasonDesc Description of reason the chat started. alphanumeric
start reason Start reason options:
options 0 - Visitor request
1 - Transfer
2 - Transfer failed
3 - ACD attempt
4 - ACD no assignment
5 - Operator assignment
6 - Skill reassign
7 - Rep request
8 - A2A reassign
endReason Code indicates the reason the chat ended. numeric
endReasonDesc Description of reason the chat ended. alphanumeric
End reason End reason options:
options 201 - Rep stopped chat
202 - Rep disconnected
203 - All visitors were removed
204 - Visitor stopped chat

15
LIVEENGAGE

ENGAGEMENT HISTORY API

205 - Visitor disconnected
206 - Visitor started a new chat
207 - Visitor disconnected from other reasons
208 - Visitor was no longer in chat
209 - Visitor logged out
210 - Visitor closed chat
211 - Visitor logged out (SSO)
212 - Visitor abandoned request
213 - Reps unavailable
214 - Conversation is no longer valid
216 - Visitor is in chat
217 - Request timed out
218 - Server problem
219 - Rep logged out
220 - Visitor Session Limit Reached
222 - RSI Rep stopped chat
223 - RSI System stopped chat
224 - Inter-Account Transfer stopped chat
225 - Rep Refuse Chat
mcs Meaningful connection score of the chat (-1 - numeric
negative mcs, 0 neutral mcs, 1 positive mcs, null-
no mcs).
chatDataEnriche indication if the chat was enriched with final data. boolean
d If true, the enrichment process occurred.
chatStartUrl The pages url from which the chat started alphanumeric
chatStartPage The pages title from which the chat started alphanumeric
campaign campaign data of the chat container
campaignEngagem Id of the campaign's engagement. numeric
entId

campaignEngagem Name of the campaign's engagement. alphanumeric (50)


entName

campaignId Id of the campaign. numeric


campaignName Name of the campaign. alphanumeric (50)
goalId Id of the campaign's goal. numeric
goalName Name of the campaign's goal. alphanumeric (50)
visitorBehavior Id of the visitor behavior defined for the numeric
Id campaign's engagement.
visitorBehavior Name of the visitor behavior defined for the alphanumeric (50)
Name campaign's engagement.
visitorProfileI Id of the visitor profile defined for the campaign. numeric
d
visitorProfileN Name of the visitor profile defined for the alphanumeric (50)
ame campaign.
lines Lines of a specific chat. container
time Time when the chat line took place. alphanumeric (yyyy-
MM-
ddThh:mm:ss.SSS+tim
ezone)

16
LIVEENGAGE

ENGAGEMENT HISTORY API

textType Type of text. alphanumeric
[plain|html|url]
text The actual text in the chat line. alphanumeric
by Name of the visitor or the agent. alphanumeric
source Source of line. alphanumeric
[visitor|agent|system]
subType Visibility of line - to all or agent only alphanumeric
[REGULAR|
ONLY_TO_REP]
cannedAnswerTyp Type of canned answer (Predefined Content). numeric
e

country The country the visitors IP points at. alphanumeric


state The state the visitors IP points at. alphanumeric
city The city the visitors IP points at. alphanumeric
isp The internet service provider the visitors IP points alphanumeric
at.
org The organization the visitors IP points at. alphanumeric
device The device the visitor used to chat. alphanumeric
[DESKTOP|TABLET|
MOBILE|NA]
ipAddress The visitors IP address. alphanumeric
browser The browser the visitor used to chat. alphanumeric
operatingSystem The operating system the visitor used to chat. alphanumeric
[NA|WINDOWS|MAC
_OSX,
LINUX|IOS|ANDROID
]
surveys Survey data from the chat. container
preChat Pre chat survey. container
postChat Post chat survey. container
operator Agent survey. container
scope Survey scope. Support session scope only; alphanumeric
meaning, the survey values may change per
session.
Example: The answer may change with the same
visitor on different occasions.
source Survey type. Alphanumerics
[pre-chat,post-
chat,operator]
display name This surveys questions. alphanumeric (1000)

17
LIVEENGAGE

ENGAGEMENT HISTORY API

value The visitors answer to the survey question. alphanumeric (1000)
name This surveys name. alphanumeric (256)
time This surveys submitted event time. alphanumeric (yyyy-
MM-
ddThh:mm:ss.SSS+tim
ezone)
timeL This surveys time in milliseconds. numeric
sdes List of Engagement Attributes. container (see
appendix).

Appendix
Engagement Attributes

Engagement Attributes allow a brand to communicate events, for example, purchases, visitor login,
shopping cart backout etc., from the webpage into LiveEngage. This section describes the data
retrieved in the response body. All engagement attribute values are of unlimited length (up to 50K
chars).
CartStatus

Name Description Type / Value


serverTimeStam Event time stamp. long epoch time in
p
milliseconds
total Total cart value. alphanumeric
numItems Number of items. alphanumeric
quantity Quantity of the product. alphanumeric
name Name of product. alphanumeric
category Product category. alphanumeric
sku Product stocking unit (unique identifier). alphanumeric
price Price of this product. alphanumeric

Example

{
"sdes": {
"events": [
{
"cartStatus": {

18
LIVEENGAGE

ENGAGEMENT HISTORY API

"serverTimeStamp": "1440412721832",
"total": "11.7",
"numItems": "6",
"products": [
{
"quantity": "1",
"product": {
"name": "prod1",
"category": "category",
"sku": "sku",
"price": "7.8"
}
}
]
}
}
]
}
}

customerInfo

Name Description Type / Value


serverTimeStamp Event time stamp. long epoch time in
milliseconds
customerStatus Customer status- will be matched against customer alphanumeric
status entity name. Case insensitive.
customerType Customer type - will be matched against customer alphanumeric
type entity name. Case insensitive.
balance The current balance of the customer.
customerId The customer ID. alphanumeric
socialId The social ID of your choice: Facebook, Twitter etc. alphanumeric
imei Unique phone identifier. alphanumeric
userName Nickname or username of a consumer. alphanumeric
accountName Name of the company or account. alphanumeric
role Role title of the consumer within their organization. alphanumeric
lastPaymentDate The customer's last payment date. This consists of json : {
3 integer fields: Year, month, and day. "year": 2011,
"month": 3,
"day": 21}
registrationDat The customer's registration date. This consists of 3 json : {
e
integer fields: Year, month, and day. "year": 2011,
"month": 3,

19
LIVEENGAGE

ENGAGEMENT HISTORY API

"day": 21}
companySize The company size alphanumeric

Example:

{
"sdes": {
"events": [
{
"customerInfo": {
"serverTimeStamp": "1440412721833",
"customerInfo": {
"customerStatus": "cancelled",
"customerType": "vip",
"balance": "-400.99",
"customerId": "138766AC",
"socialId": 4444,
"imei": null,
"userName": null,
"accountName": null,
"role": null,
"lastPaymentDate": {
"year": "2014",
"month": "10",
"day": "15"
},
"registrationDate": {
"year": "2013",
"month": "5",
"day": "23"
},
"companySize": null
}
}
}
]
}
}

Lead

Name Description Type/Value

serverTimeStamp Event time stamp. long epoch time


in milliseconds

20
LIVEENGAGE

ENGAGEMENT HISTORY API

topic Topic lead. alphanumeric
value Value lead. alphanumeric
leadId Lead id. alphanumeric

Example:

{
"sdes": {
"events": [
{
"lead": {
"lead": {
"topic": "luxury car test drive 2015",
"value": "22.22",
"leadId": "xyz123"
},
"serverTimeStamp": "1440412721836"
}
}
]
}
}

marketingCampaignInfo

Name Description Type/Value

serverTimeStamp Event time stamp. long epoch time


in milliseconds
originatingChannel Marketing channel. alphanumeric
0-Direct, 1-Search, 2-Social, 3-Email,
4-Referral, 5-Paid Search, 6-Display
affiliate Affiliate name. alphanumeric
campaignId campaign Id. alphanumeric

Example:

{
"sdes": {
"events": [

21
LIVEENGAGE

ENGAGEMENT HISTORY API

{
"marketingCampaignInfo": {
"serverTimeStamp": "1440412721833",
"marketingCampaignInfo": {
"originatingChannel": "1",
"affiliate": "Yahoo",
"campaignId": "US coupon campaign"
}
}
}
]
}
}

personalInfo

Name Description Type/Value

serverTimeStamp Event time stamp. long epoch time in


milliseconds
name Personal name. alphanumeric
surname Surname. alphanumeric
gender Visitors gender. alphanumeric
company Visitor's company. alphanumeric
customerAge Year of birth. For calculating json :
age. {"customerAge":
{"customerAgeInYears":
"34.0","customerYearOfBirth":
"1980","customerMonthOfBirth":
"4","customerDateOfBirth":
"15"}}
email Visitor email. alphanumeric
phone Visitor phone number. alphanumeric

Example:

{
"sdes": {
"events": [
{
"personalInfo": {

22
LIVEENGAGE

ENGAGEMENT HISTORY API

"serverTimeStamp": "1440412721833",
"personalInfo": {
"name": "John",
"surname": "Doe",
"gender": "MALE",
"company": "company",
"customerAge": {
"customerAgeInYears": "34.0",
"customerYearOfBirth": "1980",
"customerMonthOfBirth": "4",
"customerDateOfBirth": "15"
},
"contacts": [
{
"personalContact": {
"email": "myname@example.com",
"phone": "+1 212-788-8877"
}
}
]
}
}
}
]
}
}

Purchase

Name Description Type/Value

serverTimeStamp Event time stamp. long epoch time


in milliseconds
total Total purchase value. alphanumeric
orderId Unique order Id. alphanumeric
quantity Quantity of this product. alphanumeric
total Total cart value. alphanumeric
name Name of product. alphanumeric
category Product category. alphanumeric
sku Product stocking unit (unique alphanumeric
identifier).
price Product price. alphanumeric

23
LIVEENGAGE

ENGAGEMENT HISTORY API

numItems Number of items. alphanumeric
orderId Unique order Id. alphanumeric

Example:

{
"purchase": {
"total": "11.7",
"serverTimeStamp": "1434394476705",
"cart": {
"total": "17.8",
"products": [
{
"quantity": "3",
"product": {
"name": "antivirus pro plan",
"category": "software",
"sku": "xyz001",
"price": "7.8"
}
}
],
"numItems": "13"
},
"orderId": "DRV1534XC"
}
}

serviceActivity

Name Description Type/Value

serverTimeStamp Event time stamp. long epoch time


in milliseconds
topic The service topic. alphanumeric
status Activity status alphanumeric
0-Complete, 1-In Progress, 2-
Approved, 3-cancelled, 4-Not
Approved, 5-Reviewed, 6-Missing
Details, 7-Closed, 8-Removed, 9-
Assigned, 10-Waiting for Customer
Response, 11-Waiting for Response,
12-Pending, 13-Resolved

24
LIVEENGAGE

ENGAGEMENT HISTORY API

category Category name. alphanumeric
serviceId Service Id. alphanumeric

Example:

{
"sdes": {
"events": [
{
"serviceActivity": {
"serverTimeStamp": "1440412721836",
"serviceActivity": {
"topic": "order checkbook",
"status": "0",
"category": "finance",
"serviceId": "service12"
}
}
}
]
}}

VisitorError

Name Description Type/Value

serverTimeStamp Event time stamp. long epoch time


in milliseconds
contextId Error context. alphanumeric
message Error message. alphanumeric
code Error code. alphanumeric
level Error level. alphanumeric
resolved Resolution status (false.true). alphanumeric

Example:

{
"sdes": {
"events": [

25
LIVEENGAGE

ENGAGEMENT HISTORY API

{
"visitorError": {
"serverTimeStamp": "1440412721834",
"visitorError": {
"contextId": null,
"message": "Expiration date missing",
"code": "er100004",
"level": null,
"resolved": null
}
}
}
]
}
}

viewedProduct

Name Description Type/Value

serverTimeStamp Event timestamp. long epoch time


in milliseconds
name Product name. alphanumeric
category Product category. alphanumeric
sku Product SKU. alphanumeric
price Product price. alphanumeric

{
"sdes": {
"events": [
{
"viewedProduct": {
"serverTimeStamp": "1434394466093",
"products": [
{
"product": {
"name": "red high heel shoe",
"category": "women shoes",
"sku": "xyz567",
"price": "77.8"
}
}
]

26
LIVEENGAGE

ENGAGEMENT HISTORY API

}
}
]
}
}

Sample Code
Overview
This is a basic example of how to connect to the Engagement History API in Java by using Scribe.
In order to run the example, you will need to update the EngagementHistory.java file with your
Engagement History API credentials.

Sample 1:
https://github.com/scottwestover/LiveEngageExamples/blob/master/APIs/Java-
EngagementHistoryAPI/src/main/java/EngagementHistory.java#L8

Sample 2:
https://github.com/scottwestover/LiveEngageExamples/blob/master/APIs/Java-
EngagementHistoryAPI/src/main/java/EngagementHistory.java - L8
https://github.com/scottwestover/LiveEngageExamples/blob/master/APIs/Java-
EngagementHistoryAPI/src/main/java/EHAPI.java

This document, materials or presentation, whether offered online or presented in hard copy ("LivePerson Informational Tools") is for informational purposes only.
LIVEPERSON, INC. PROVIDES THESE LIVEPERSON INFORMATIONAL TOOLS "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

The LivePerson Informational Tools contain LivePerson proprietary and confidential materials. No part of the LivePerson Informational Tools may be modified,
altered, reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), without the prior written permission of LivePerson, Inc., except as otherwise permitted by law. Prior to publication, reasonable effort was made to validate
this information. The LivePerson Information Tools may include technical inaccuracies or typographical errors. Actual savings or results achieved may be different
from those outlined in the LivePerson Informational Tools. The recipient shall not alter or remove any part of this statement.

Trademarks or service marks of LivePerson may not be used in any manner without LivePerson's express written consent. All other company and product names
mentioned are used only for identification purposes and may be trademarks or registered trademarks of their respective companies.
LivePerson shall not be liable for any direct, indirect, incidental, special, consequential or exemplary damages, including but not limited to, damages for loss of profits,
goodwill, use, data or other intangible losses resulting from the use or the inability to use the LivePerson Information Tools, including any information contained
herein.

27
LIVEENGAGE

ENGAGEMENT HISTORY API

2016 LivePerson, Inc. All rights reserved.

28

You might also like