getContactByChatID

Returns the contact object of a currently active chat.

HTTP GET /livechat/:domain/getContactByChatID/:chatId

Path Variables:

Name

Mandatory

Type

Description

Name

Mandatory

Type

Description

domain

no

string

Unique domain identifier

chatId

Yes

STRING

Unique Chat identifier

Response:

Type: JSONP

Name

Type

Description

Name

Type

Description

result

BOOLEAN

If true, the service response was performed correctly

contact

NULL / OBJECT

The current Contact Object with chat partecipants info, data collections and calldata variables

error

NULL / STRING

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

Example:

Request

http://<hostname>:<port>/livechat/default/getContactByChatID/CHAT_fef5015b-8102-457e-b69b-471a55487837

Response

{ "result":true, "contact":{ "id":"CHAT_fef5015b-8102-457e-b69b-471a55487837", "servid":"LiveChat_Popup", "widgetid":"classic_popup", "serv_name":"serviziocablato", "beginTime":1568903506777, "endTime":"", "title":"", "lang":"", "userID":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e", "users":{ "USER_c8e1eb84-60d3-4d69-b10b-96364845023e":{ "id":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e", "nickname":"Gabry", "isAgent":false, "beginTime":1568903506777, "endTime":"", "isOnline":true, "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36", "firstUri":"http://localhost:3001/domain/test.html", "firstTitle":"LiveChat - Test Page", "channel":"web", "firstIP":"::1" }, "USER_gverde1@acd.enghouse.com":{ "id":"USER_gverde1@acd.enghouse.com", "nickname":"Gabriele Verde", "isAgent":true, "beginTime":1568903508239, "endTime":"", "isOnline":true, "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36", "firstUri":"http://localhost:3003/AD/AD.html", "firstTitle":"AgentDesktop - Enghouse Interactive", "channel":"web", "firstIP":"::ffff:127.0.0.1" } }, "dataCollections":{ "67990d2d-5d35-4d7d-93ac-df3d9edb636d":{ "datacollection":[ { "_id":"5c6e700404445e26d8dbeee4", "dc_type":"nickname", "label":"Nickname", "isMandatory":true, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"", "value":"Gabry", "name":"nickname", "mode":"manual" }, { "_id":"5c6e700404445e26d8dbeee3", "dc_type":"name", "label":"Name", "isMandatory":false, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"", "value":"", "name":"name", "mode":"manual" }, { "_id":"5c6e700404445e26d8dbeee2", "dc_type":"surname", "label":"surname", "isMandatory":false, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"", "value":"", "name":"surname", "mode":"manual" } ], "_id":"5c6e700404445e26d8dbeee1", "id":"67990d2d-5d35-4d7d-93ac-df3d9edb636d", "title":"Anagrafica #1", "dc_mode":"chat", "next":"", "__v":0 }, "fc0450c8-4b2c-42b3-b8c9-04b672ca4a90":{ "datacollection":[ { "_id":"5c6e700404445e26d8dbeee8", "dc_type":"email", "label":"Email", "isMandatory":true, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"", "value":"Gabriele.Verde@enghouse.com", "name":"email", "mode":"manual" }, { "_id":"5c6e700404445e26d8dbeee7", "dc_type":"phone", "label":"Phone number", "isMandatory":false, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"[0-9]{10}", "value":"", "name":"phone_number", "mode":"manual" }, { "_id":"5c6e700404445e26d8dbeee6", "dc_type":"date", "label":"Birthdate", "isMandatory":false, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"", "value":"", "name":"birthdate", "mode":"manual" } ], "_id":"5c6e700404445e26d8dbeee5", "id":"fc0450c8-4b2c-42b3-b8c9-04b672ca4a90", "title":"Anagrafica #2", "dc_mode":"chat", "next":"", "__v":0 } }, "callData":{ "_NICK_":"Gabry", "email":"Gabriele.Verde@enghouse.com", "_CTHISTORY_1_Q_":"QUEUE42@acd.enghouse.com", "birthdate":"", "phone_number":"", "name":"", "surname":"", "ECID":"felixct7|1|11|15" } }, "error":null }

Â