/
getChatTranscriptGeneric
getChatTranscriptGeneric
Returns chat transcripts based on filters specified.
status:http post /livechat/:domain/getChatTranscripGeneric
Path Variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | status:NO | status:STRING | Unique domain identifier |
Authorization: see Authentication mechanisms
Request body:
Type: status:JSON
Name | Mandatory | Type | Description |
---|---|---|---|
filter | status:YES | status:OBJECT | filter for data extraction |
sort | status:YES | status:OBJECT | sort order |
pageSize | status:NO | status:NUMBER | number of documents retrieved (max 100) |
index | status:YES | status:NUMBER | pagination |
Response:
Type: status:JSON
Name | Type | Description |
---|---|---|
result | status:BOOLEAN | If true, the service response was performed correctly |
chatTranscript | status:ARRAY | Array that contains Transcript Object that match the filter |
error | status:NULL / status:STRING | Contains the error description if an error has occurred in the request |
Example:
Request
http://<hostname>:<port>/livechat/default/getChatTranscriptGeneric
Request body
{
"filter": {"$and":[{"userID":"393403609180"}, {"callData.EC_MACROACTIVITY": "DEFAULT_CHAT"}]},
"sort": {"beginTime":1},
"pageSize": 80,
"index": 0
}
Response
{
"result": true,
"chatTranscripts": [
{
"result": true,
"transcript": {
"_id": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7",
"ctlive_type": "chat",
"messages": [
{
"data": {
"replyTo": "",
"id": "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggNzg1QzIwNTQ3MDE2RjU1ODIxMzIwOTVGMzk1MDk1NTkA",
"messageType": "TEXT",
"content": {
"text": "Salve",
"user": {
"id": "393403609180",
"isAgent": false,
"nickname": "Gabriele Verde"
}
},
"ts": 1703243600530,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "65856fb085b9c22326965ca2",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7"
},
{
"data": {
"replyTo": "",
"id": "74a8e13d-7116-4eb4-bf67-18e9aa135caa",
"messageType": "TEXT",
"content": {
"text": "Thanks for getting in touch. My name's Gabriele Verde, and I'll be assisting you today.",
"user": {
"id": "USER_gverde1@acd.enghouse.com",
"isAgent": true,
"nickname": "Gabriele Verde"
}
},
"ts": 1703243604913,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "65856fb085b9c22326965ca3",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7"
},
{
"data": {
"replyTo": "",
"id": "d81c351c-0c28-4870-8e22-3efe5da1c2f4",
"messageType": "TEXT",
"content": {
"text": "1",
"user": {
"id": "USER_gverde1@acd.enghouse.com",
"isAgent": true,
"nickname": "Gabriele Verde"
}
},
"ts": 1703243641149,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "65856fb085b9c22326965ca4",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7"
},
{
"data": {
"replyTo": "",
"id": "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggN0RCNERGMjM5OTAyMTA0MEE3NDRFNUE4RjU2OEU2NTgA",
"messageType": "IMAGE",
"content": {
"caption": "",
"fileName": "File.jpg",
"documentType": "jpg",
"user": {
"id": "393403609180",
"isAgent": false,
"nickname": "Gabriele Verde"
}
},
"ts": 1703243660939,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "65856fb085b9c22326965ca5",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7"
},
{
"data": {
"replyTo": "",
"id": "f5be2677-36fa-4d7c-bf1b-6c61b60df45d",
"messageType": "TEXT",
"content": {
"text": "broooo",
"user": {
"id": "USER_gverde1@acd.enghouse.com",
"isAgent": true,
"nickname": "Gabriele Verde"
}
},
"ts": 1703243665660,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "65856fb085b9c22326965ca6",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7"
},
{
"data": {
"replyTo": "",
"id": "19712b2a-fe04-42df-aebf-a2c4561f0f15",
"messageType": "TEXT",
"ts": 1703243741975,
"content": {
"text": "La chat è terminata.",
"user": {
"id": "ADMIN_3902124122690",
"isAgent": true
}
}
},
"_id": "65856fb085b9c22326965ca7",
"room": "CHAT_DEFAULT_c3d4f613-029f-40d2-afa9-137305b4e9a7"
}
],
"__v": 0
}
},
{
"result": true,
"transcript": {
"_id": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6",
"room": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6",
"ctlive_type": "chat",
"messages": [
{
"data": {
"replyTo": "",
"id": "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggREZFRDdCMTI2QUY2RkJENUYyNTdFRDFGMzYzN0E1NEIA",
"messageType": "TEXT",
"content": {
"text": "Buongiorno",
"user": {
"id": "393403609180",
"isAgent": false,
"nickname": "Gabriele Verde"
}
},
"ts": 1703245471782,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "658576d685b9c22326965cb3",
"room": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6"
},
{
"data": {
"replyTo": "",
"id": "51d108ed-1883-4184-b149-50f5b156be44",
"messageType": "TEXT",
"content": {
"text": "Thanks for getting in touch. My name's Gabriele Verde, and I'll be assisting you today.",
"user": {
"id": "USER_gverde1@acd.enghouse.com",
"isAgent": true,
"nickname": "Gabriele Verde"
}
},
"ts": 1703245477227,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "658576d685b9c22326965cb4",
"room": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6"
},
{
"data": {
"replyTo": "",
"id": "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggQkY1MDAxQ0RFOURGMUExRkUxQ0ExODNFODk4Njg2QUQA",
"messageType": "TEXT",
"content": {
"text": "Ok",
"user": {
"id": "393403609180",
"isAgent": false,
"nickname": "Gabriele Verde"
}
},
"ts": 1703245498928,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "658576d685b9c22326965cb5",
"room": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6"
},
{
"data": {
"replyTo": "",
"id": "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggQzA5NDIyMzdGOUU3M0EyMjRCNjI5RjBEMkE5QkM3MjYA",
"messageType": "TEXT",
"content": {
"text": "🍋",
"user": {
"id": "393403609180",
"isAgent": false,
"nickname": "Gabriele Verde"
}
},
"ts": 1703245504168,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "658576d685b9c22326965cb6",
"room": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6"
},
{
"data": {
"replyTo": "",
"id": "b0c484ee-663f-487a-9004-0b554dd54207",
"messageType": "TEXT",
"content": {
"text": "bene",
"user": {
"id": "USER_gverde1@acd.enghouse.com",
"isAgent": true,
"nickname": "Gabriele Verde"
}
},
"ts": 1703245509004,
"deliverySuccess": true,
"deliveryErrorReason": ""
},
"_id": "658576d685b9c22326965cb7",
"room": "CHAT_DEFAULT_add7403c-17b3-44e0-a95c-8c09cc864fe6"
}
],
"__v": 0
}
},
...
],
"error": null
}
, multiple selections available,
Related content
getChatTranscriptByChatID
getChatTranscriptByChatID
More like this
getLastTranscript
getLastTranscript
More like this
getChatTranscriptByNickname
getChatTranscriptByNickname
More like this
getChatTranscriptByCalldata
getChatTranscriptByCalldata
More like this
getChatTranscriptByUserID
getChatTranscriptByUserID
More like this
getChatTranscriptByDate/:ts
getChatTranscriptByDate/:ts
More like this