The service returns the transcript of a concluded chat based on the ChatID
HTTP GET /livechat/:domain/getChatTranscriptByChatID/:chatId
Path Variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | YES | STRING | Unique domain identifier |
chatId | YES | STRING | Unique chat identifier |
Headers:
Name | Mandatory | Type | Description |
---|---|---|---|
ctlivetoken | YES | STRING | Unique ctlive session identifier |
Response:
Type: jsonp
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
chatTranscripts | OBJECT | contains the transcript for the specified chat |
Example:
Request
http://<hostname>:<port>/livechat/getChatTrasncriptByChatID/CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25
Response:
{ "result": true, "chatTranscripts": { "result": true, "transcript": { "_id": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871", "ctlive_type": "chat", "messages": [ { "data": { "replyTo": "", "id": "9a74ec16-6424-4781-a11d-e463525c5cc6", "messageType": "TEXT", "content": { "text": "Hello", "user": { "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "isAgent": false, "nickname": "Gabry" } }, "ts": 1718958793912, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda6a", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "53c75580-44e3-41ba-a43a-bf118bdadb74", "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": 1718958800458, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda6b", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "0cd7ca0b-79b2-427e-8973-8a7480b5efe5", "messageType": "TEXT", "content": { "text": "i need some help", "user": { "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "isAgent": false, "nickname": "Gabry" } }, "ts": 1718958807891, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda6c", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "59b27339-b4ff-49a0-8d5d-f658510cf634", "messageType": "TEXT", "content": { "text": "i want to know the status of my order", "user": { "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "isAgent": false, "nickname": "Gabry" } }, "ts": 1718958844883, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda6d", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "a3a06958-ef8d-4a86-813b-12cf3eb1d21a", "messageType": "TEXT", "content": { "text": "can you provide me the order ID?", "user": { "id": "USER_gverde1@acd.enghouse.com", "isAgent": true, "nickname": "Gabriele Verde" } }, "ts": 1718958865919, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda6e", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "f4dc0bba-fed8-4a1b-bc25-c57a33da95cd", "messageType": "TEXT", "content": { "text": "12560", "user": { "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "isAgent": false, "nickname": "Gabry" } }, "ts": 1718958885182, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda6f", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "132d6b80-e782-40c7-b45b-c6500b6e7b6e", "messageType": "TEXT", "content": { "text": "ok, let me check..", "user": { "id": "USER_gverde1@acd.enghouse.com", "isAgent": true, "nickname": "Gabriele Verde" } }, "ts": 1718958896908, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda70", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "bfe88d4f-4866-402c-8778-731fe4f50570", "messageType": "TEXT", "content": { "text": "thank you", "user": { "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "isAgent": false, "nickname": "Gabry" } }, "ts": 1718958903884, "deliverySuccess": true, "deliveryErrorReason": "" }, "_id": "66753b3a70078215b07bda71", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" }, { "data": { "replyTo": "", "id": "e8c75240-ba38-48a5-a25c-a22970e50dd9", "messageType": "endChat", "ts": 1718958906118, "deliverySuccess": true, "deliveryErrorReason": "", "content": { "user": { "isAgent": false, "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "nickname": "Gabry" } } }, "_id": "66753b3a70078215b07bda72", "room": "CHAT_DEFAULT_b5718fcd-bc97-4e35-b009-894dc2a65871" } ], "__v": 0 } }, "error": null }