Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The service returns the transcript of a concluded chat based on the ChatID

...

Status
colourGreen
titleHTTP GET
/livechat/:domain/getChatTranscriptByChatID/:chatId

Path Variables:

Name

Mandatory

Type

Description

domain

Status
colourRed
titleYES

Status
titleSTRING

Unique domain identifier

chatId

Status
colourRed
titleyes

Status
titlestring

Unique chat identifier

Headers:

...

Name

...

Mandatory

...

Type

...

Description

...

ctlivetoken

...

Status
colourRed
titleYES

...

Status
titleSTRING

...

Unique ctlive session identifier

Authorization: see Authentication mechanisms

Response:

Type: jsonp

Name

Type

Description

result

Status
titleboolean

If true, the service response was performed correctly

error

Status
titlenull
/
Status
titlestring

Contains the error description if an error has occurred in the request

chatTranscripts

Status
titleobject

contains the transcript for the specified chat

Example:

Request

http://<hostname>:<port>/livechat/getChatTrasncriptByChatID/CHAT_DEFAULT_

...

b5718fcd-

...

bc97-

...

4e35-

...

b009-

...

894dc2a65871

Response:

Code Block
languagejson
{
    "result": true,
    "chatTranscripts": {
        "result": true,
        "transcript": {
            "messages": [
     _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": "7ae34fb0a3a06958-eb96ef8d-434a4a86-abfd813b-d9735b85481012cf3eb1d21a",
                        "messageType": "TEXT",
                        "content": {
                            "text": "Buongiorno,can sonoyou l'operatoreprovide Gabrieleme Verde, come posso esserle utilethe order ID?",
                            "user": {
                                "id": "USER_gverde1@acd.enghouse.com",
                                "isAgent": true,
                                "nickname": "Gabriele Verde"
                            }
                        },
                        "ts": 15901603882691718958865919,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fd166753b3a70078215b07bda6e",
                    "room": "CHAT_DEFAULT_5416bcd3b5718fcd-d78dbc97-4dc84e35-be0eb009-7b9ac1f51b25894dc2a65871"
                },
                {
                    "data": {
                        "replyTo": "",
                        "id": "1b4ee873f4dc0bba-82a8fed8-477c4a1b-8a58bc25-8f957f26ff2dc57a33da95cd",
                        "messageType": "TEXT",
                        "content": {
                            "text": "112560",
                            "user": {
                                "id": "USER_gverde1@acd.enghouse.comDEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef",
                                "isAgent": truefalse,
                                "nickname": "Gabriele VerdeGabry"
                            }
                        },
                        "ts": 15901603922711718958885182,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fd066753b3a70078215b07bda6f",
                    "room": "CHAT_DEFAULT_5416bcd3b5718fcd-d78dbc97-4dc84e35-be0eb009-7b9ac1f51b25894dc2a65871"
                },
                {
                    "data": {
                        "replyTo": "",
                        "id": "fc7ec20d132d6b80-9ecfe782-486340c7-b46db45b-c6f1f21c4aa2c6500b6e7b6e",
                        "messageType": "TEXT",
                        "content": {
                            "text": "2ok, let me check..",
                            "user": {
                                "id": "USER_DEFAULT_ebad948e-d1c0-4131-835b-8991dc1b5c61gverde1@acd.enghouse.com",
                                "isAgent": falsetrue,
                                "nickname": "CustomerGabriele Verde"
                            }
                        },
                        "ts": 15901603967701718958896908,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fcf66753b3a70078215b07bda70",
                    "room": "CHAT_DEFAULT_5416bcd3b5718fcd-d78dbc97-4dc84e35-be0e-7b9ac1f51b25"b009-894dc2a65871"
                },
                {
   },                 "data": {
                        "datareplyTo": {"",
                        "id": "81845b84bfe88d4f-bf6b4866-4ec2402c-aa048778-9a3131c09746731fe4f50570",
                        "messageType": "TEXT",
                        "content": {
                            "text": "3thank you",
                            "user": {
                                "id": "USER_DEFAULT_ebad948e9a0a411c-d1c0f9c7-41314af7-835b9754-8991dc1b5c61024bf157a3ef",
                                "isAgent": false,
                                "nickname": "CustomerGabry"
                            }
                        },
                        "ts": 15901603973021718958903884,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fce66753b3a70078215b07bda71",
                    "room": "CHAT_DEFAULT_5416bcd3b5718fcd-d78dbc97-4dc84e35-be0eb009-7b9ac1f51b25894dc2a65871"
                },
                {
                    "data": {
                        "idreplyTo": "2b4b0305-6e8c-49eb-a493-98745e4e2c66 "",
                        "messageTypeid": "TEXTe8c75240-ba38-48a5-a25c-a22970e50dd9",
                        "contentmessageType": {
 "endChat",
                          "textts": "4"1718958906118,
 
                          "userdeliverySuccess": {true,
                        "deliveryErrorReason": "",
       "id": "USER_gverde1@acd.enghouse.com",                "content": {
               "isAgent": true,            "user": {
                   "nickname": "Gabriele Verde"           "isAgent": false,
                }                "id": "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef",
       },                         "tsnickname": 1590160400910,"Gabry"
                          "deliverySuccess": true, }
                       "deliveryErrorReason": "" }
                    },
                    "_id": "5ec7ec9b86772842485a7fcd66753b3a70078215b07bda72",
                    "room": "CHAT_DEFAULT_5416bcd3b5718fcd-d78dbc97-4dc84e35-be0eb009-7b9ac1f51b25894dc2a65871"
                }
            ],
            "_id": "5ec7ec9b86772842485a7fcc",
            "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25",
            "__v": 0
        }
    },
    "error": null
}

...