Versions Compared

Key

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

Returns chat transcripts with the specified call data variables

Status
colourYellow
titleHTTP POST
/livechat/:domain/getChatTranscriptByCalldata

Path Variables:

Name

Mandatory

Type

Description

domain

Status
colourRed
titleyes

Status
titlestring

Unique domain identifier

Authorization: see Authentication mechanisms

Request body:

Type:
Status
titlejson

Name

Mandatory

Type

Description

<calldata_variable_name>

Status
colourRed
titleYES

Status
titleSTRING

Value of the call data variable for which you want to retrieve the chat transcripts

Response:

Type:
Status
titleJSON

Name

Type

Description

result

Status
titleboolean

If true, the service response was performed correctly

chatTranscript

Status
titlearray

Array that contains

chat transcripts

Transcript Object with the specified nickname among the participants

error

Status
titlenull
/
Status
titlestring

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

Example:

Request

http://<hostname>:<port>/livechat/default/getChatTranscriptByCalldata

Request body:

Code Block
{
	"ECID" : "felixct7|1|22|15",
	"_CTHISTORY_1_Q_": "QUEUE42@acd.enghouse.com"
}

Response

Code Block
languagejson
{ 
   "result":true,
   "chatTranscripts":[ 
      { 
         "result":true,
         "transcript":{ 
            "messages":[ 
               { 
                  "data":{ 
                     "id":"551b9dbc-8de8-46a1-89c4-b617f9d7e98e",
                     "messageType":"TEXT",
                     "content":{ 
                        "text":"hello there",
                        "user":{ 
                           "id":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e",
                           "isAgent":false
                        }
                     },
                     "ts":1569248228779
                  },
                  "_id":"5d88d3f91190da27f4fecee2",
                  "room":"CHAT_4910ea9a-0e43-4dea-9418-fb913cbf9a64"
               },
               { 
                  "data":{ 
                     "id":"e34246cf-e057-44e7-ba5b-45cd5be4c55f",
                     "messageType":"TEXT",
                     "content":{ 
                        "text":"hello",
                        "user":{ 
                           "id":"USER_gverde1@acd.enghouse.com",
                           "isAgent":true
                        }
                     },
                     "ts":1569248236845
                  },
                  "_id":"5d88d3f91190da27f4fecee1",
                  "room":"CHAT_4910ea9a-0e43-4dea-9418-fb913cbf9a64"
               },
               { 
                  "data":{ 
                     "id":"44c1c289-941a-4680-829f-9ea3757b7b78",
                     "messageType":"TEXT",
                     "content":{ 
                        "text":"bye",
                        "user":{ 
                           "id":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e",
                           "isAgent":false
                        }
                     },
                     "ts":1569248242051
                  },
                  "_id":"5d88d3f91190da27f4fecee0",
                  "room":"CHAT_4910ea9a-0e43-4dea-9418-fb913cbf9a64"
               }
            ],
            "_id":"5d88d3f91190da27f4fecedf",
            "room":"CHAT_4910ea9a-0e43-4dea-9418-fb913cbf9a64",
            "__v":0
         }
      }
   ],
   "error":null
}

...