Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

The service returns the transcript based on the ChatID regardless of whether it is concluded or not

HTTP GET /livechat/:domain/getContactTranscriptByChatID/:chatId

Path Variables:

Name

Mandatory

Type

Description

domain

YES

STRING

Unique domain identifier

chatId

YES

YES

Unique chat identifier

Authorization: see Authentication mechanisms

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

isChatActive

BOOLEAN

true if chat is still active, otherwise false

chatTranscript

ARRAY

array of message objects

Example:

Request

http://<hostname>:<port>/livechat/default/getContactTranscriptByChatID/CHAT_DEFAULT_60bd7ddf-658b-442d-a8d3-2abef8c5fb35

Response

{
    "result": true,
    "isChatActive": false,
    "chatTranscript": [
        {
            "data": {
                "id": "43e9431e-7cfe-4b99-a5c4-942992fcfe95",
                "messageType": "TEXT",
                "content": {
                    "text": "Buongiorno, sono l'operatore Gabriele Verde, come posso esserle utile?",
                    "user": {
                        "id": "USER_gverde1@acd.enghouse.com",
                        "isAgent": true,
                        "nickname": "Gabriele Verde"
                    }
                },
                "ts": 1590485075961,
                "deliverySuccess": true,
                "deliveryErrorReason": ""
            },
            "_id": "5ecce0c68aa3cc10e4cf3b61",
            "room": "CHAT_DEFAULT_60bd7ddf-658b-442d-a8d3-2abef8c5fb35"
        },
        {
            "data": {
                "id": "513b9d41-d688-4b28-941e-807a0588f6c6",
                "messageType": "TEXT",
                "content": {
                    "text": "hello",
                    "user": {
                        "id": "USER_gverde1@acd.enghouse.com",
                        "isAgent": true,
                        "nickname": "Gabriele Verde"
                    }
                },
                "ts": 1590485088068,
                "deliverySuccess": true,
                "deliveryErrorReason": ""
            },
            "_id": "5ecce0c68aa3cc10e4cf3b60",
            "room": "CHAT_DEFAULT_60bd7ddf-658b-442d-a8d3-2abef8c5fb35"
        },
        {
            "data": {
                "id": "68fbab3e-5e89-454b-bd70-18d549c6b7fa",
                "messageType": "IMAGE",
                "content": {
                    "caption": "image",
                    "fileName": "45971097-illustrazione-di-happy-emoticon-dà-pollice-in-su-isolato-su-sfondo-bianco.jpg",
                    "documentType": "jpg",
                    "user": {
                        "id": "USER_DEFAULT_ebad948e-d1c0-4131-835b-8991dc1b5c61",
                        "isAgent": false,
                        "nickname": "Customer"
                    }
                },
                "ts": 1590485108165,
                "deliverySuccess": true,
                "deliveryErrorReason": ""
            },
            "_id": "5ecce0c68aa3cc10e4cf3b5f",
            "room": "CHAT_DEFAULT_60bd7ddf-658b-442d-a8d3-2abef8c5fb35"
        }
    ],
    "error": null
}

  • No labels