Returns the data collections for the specified currently active chat.
HTTP GET /livechat/getDataCollectionByChatID/:chatId
Path Variables:
Name | Mandatory | Type | Description |
---|---|---|---|
chatId | YES | STRING | Unique Chat identifier |
Response:
Type: JSONP
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
datacollections | NULL / OBJECT | An object that contains all the data collections objects configured for the service |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
Example:
Request
http://<hostname>:<port>/livechat/getDataCollectionByChatID/CHAT_456c6db0-29e8-4c87-b31a-4b2cf129243e
Response
{ "result":true, "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":"Gabriele", "name":"name", "mode":"manual" }, { "_id":"5c6e700404445e26d8dbeee2", "dc_type":"surname", "label":"surname", "isMandatory":false, "isVisibleAgent":true, "isVisibleCustomer":true, "isEditable":true, "custom_regexp":"", "value":"Verde", "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 } }, "error":null }