Chat Server
- 16 Jun 2022
- 7 Minutes to read
- Print
- DarkLight
Chat Server
- Updated on 16 Jun 2022
- 7 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Chat Server
Chat Server
- Chat Server ManageGET livechat/agents
- Get status for the list of agentsGET livechat/agents/{id}
- Get status for an agentPUT livechat/agents/{id}
- Update status for an agentGET livechat/visitors
- Get info for the list of visitorsGET livechat/visitors/{id}
- Get info for a visitorPUT livechat/visitors/{id}
- Update info for a visitor
Get status for the list of agents
GET livechat/agents
Parameters:
No Parameters
Response:
An array of agents' staus
Name | Type | Description |
---|---|---|
ongoingChats | int | The ongoing chats number of the agent. |
status | string | Name of the status. |
id | guid | Id of the agent. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agents \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"id": "c97a2afe-a38f-46f8-a55b-8ac9f873cd09",
"status": "Online",
"ongoingChats": 0
}
]
Get status for an agent
GET livechat/agents/{id}
Parameters:
No Parameters
Response:
Name | Type | Description |
---|---|---|
id | guid | Id of the agent. |
status | string | Name of the status. |
ongoingChats | int | The ongoing chats number of the agent. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agents/c97a2afe-a38f-46f8-a55b-8ac9f873cd09 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "c97a2afe-a38f-46f8-a55b-8ac9f873cd09",
"status": "Online",
"ongoingChats": 0
}
Update status for an agent
PUT livechat/agents/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
status | string | body | yes | Allowed values are "online","away" and other custom away status if enabled. |
Response:
Name | Type | Description |
---|---|---|
id | guid | Id of the agent. |
status | string | Name of the status. |
ongoingChats | int | The ongoing chats number of the agent. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agents/c97a2afe-a38f-46f8-a55b-8ac9f873cd09 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{
"id": "c97a2afe-a38f-46f8-a55b-8ac9f873cd09",
"status": "Meeting"
}'
Response:
HTTP/1.1 200 OK
{
"id": "c97a2afe-a38f-46f8-a55b-8ac9f873cd09",
"status": "Meeting",
"ongoingChats": 0
}
Get info for the list of visitors
GET livechat/visitors
Parameters:
No Parameters
Response:
An array of visitors' info
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
language | string | Language of the visitor used. | ||||||||
phone | string | Phone of the visitor. | ||||||||
name | string | Name of the visitor. | ||||||||
pageViews | int | Page view count of the visitor. | ||||||||
flashVersion | string | Flash version of the visitor used. | ||||||||
company | string | Company of the visitor. | ||||||||
timeZone | string | Timezone of the visitor. | ||||||||
browser | string | Browser of the visitor used. | ||||||||
customFields | FieldAndValue[] | Field and value array.
| ||||||||
referrerUrl | string | Referrer Url of the visitor. | ||||||||
email | string | Email of the visitor. | ||||||||
visits | int | Visit count of the visitor. | ||||||||
landingPage | string | Landing page of the visit. | ||||||||
operatingSystem | string | Operating system of the visitor used. | ||||||||
screenResolution | string | Screen resolution of the visitor used. | ||||||||
searchEngine | string | Search engine of the visit. | ||||||||
visitTime | datetime | Visit time of the visitor. | ||||||||
id | guid | Id of the visitor. | ||||||||
firstVisitTime | datetime | First visit time of the visitor. | ||||||||
city | string | City of the visitor. | ||||||||
currentBrowsing | string | Current browsing of the visitor. | ||||||||
departmentId | guid | Department id of the visit. | ||||||||
searchKeywords | string | Search keywords of the visit. | ||||||||
ip | string | IP of the visitor. | ||||||||
chats | int | Chat count of the visitor. | ||||||||
status | string | Allowed values are "waitingForChat", "voiceChatting","chatting","preChat","manuallyInvited","autoInvited","offlineMessage","refusedByOperator","refusedByVisitor","chatEnded","inSite","outOfSite","transferring","manuallyInvitedByWindow","systemProcessing". | ||||||||
customVariableResults | FieldAndValue[] | Field and value array.
| ||||||||
productService | string | Product service of the visitor. | ||||||||
country | string | Country of the visitor. | ||||||||
state | string | State of the visitor. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/visitors \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"id": "3d59f909-24cd-43bc-89cb-00a320617c0a",
"status": "inSite",
"browser": "Google Chrome 86.0.4240.75",
"operatingSystem": "Windows 8.1",
"screenResolution": "1680x1050",
"language": "en-US",
"ip": "192.168.2.128",
"country": "China",
"state": "Zhejiang",
"city": "Hangzhou",
"timeZone": "GMT +08:00",
"visitTime": "2021-05-26T10:30:16.036Z",
"firstVisitTime": "2021-05-26T10:31:29.597Z",
"visits": 1,
"chats": 0,
"pageViews": 1,
"currentBrowsing": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000&q=1622025088751",
"referrerUrl": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000",
"name": "192.168.2.128",
"email": "123@comm100.com",
"phone": "1234567890123",
"company": "comm",
"productService": "LA",
"departmentId": "00000000-0000-0000-0000-000000000000",
"searchEngine": "Google",
"searchKeywords": "com",
"landingPage": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000&q=1622025088751",
"customFields": [],
"customVariableResults": [
{
"name": "CARLZHOU222SHENTI",
"value": "11123123123",
"url": ""
},
{
"name": "fccc",
"value": "520",
"url": ""
}
]
}
]
Get info for a visitor
GET livechat/visitors/{id}
Parameters:
No Parameters
Response:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
browser | string | Browser of the visitor used. | ||||||||
chats | int | Chat count of the visitor. | ||||||||
landingPage | string | Landing page of the visit. | ||||||||
screenResolution | string | Screen resolution of the visitor used. | ||||||||
searchEngine | string | Search engine of the visit. | ||||||||
status | string | Allowed values are "waitingForChat", "voiceChatting","chatting","preChat","manuallyInvited","autoInvited","offlineMessage","refusedByOperator","refusedByVisitor","chatEnded","inSite","outOfSite","transferring","manuallyInvitedByWindow","systemProcessing". | ||||||||
visitTime | datetime | Visit time of the visitor. | ||||||||
language | string | Language of the visitor used. | ||||||||
phone | string | Phone of the visitor. | ||||||||
name | string | Name of the visitor. | ||||||||
searchKeywords | string | Search keywords of the visit. | ||||||||
visits | int | Visit count of the visitor. | ||||||||
referrerUrl | string | Referrer Url of the visitor. | ||||||||
pageViews | int | Page view count of the visitor. | ||||||||
flashVersion | string | Flash version of the visitor used. | ||||||||
departmentId | guid | Department id of the visit. | ||||||||
customFields | FieldAndValue[] | Field and value array.
| ||||||||
ip | string | IP of the visitor. | ||||||||
operatingSystem | string | Operating system of the visitor used. | ||||||||
city | string | City of the visitor. | ||||||||
state | string | State of the visitor. | ||||||||
email | string | Email of the visitor. | ||||||||
id | guid | Id of the visitor. | ||||||||
country | string | Country of the visitor. | ||||||||
productService | string | Product service of the visitor. | ||||||||
firstVisitTime | datetime | First visit time of the visitor. | ||||||||
timeZone | string | Timezone of the visitor. | ||||||||
currentBrowsing | string | Current browsing of the visitor. | ||||||||
customVariableResults | FieldAndValue[] | Field and value array.
| ||||||||
company | string | Company of the visitor. |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/visitors/3d59f909-24cd-43bc-89cb-00a320617c0a \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "3d59f909-24cd-43bc-89cb-00a320617c0a",
"status": "inSite",
"browser": "Google Chrome 86.0.4240.75",
"operatingSystem": "Windows 8.1",
"screenResolution": "1680x1050",
"language": "en-US",
"ip": "192.168.2.128",
"country": "China",
"state": "Zhejiang",
"city": "Hangzhou",
"timeZone": "GMT +08:00",
"visitTime": "2021-05-26T10:30:16.036Z",
"firstVisitTime": "2021-05-26T10:31:29.597Z",
"visits": 1,
"chats": 0,
"pageViews": 1,
"currentBrowsing": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000&q=1622025088751",
"referrerUrl": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000",
"name": "192.168.2.128",
"email": "123@comm100.com",
"phone": "1234567890123",
"company": "comm",
"productService": "LA",
"departmentId": "00000000-0000-0000-0000-000000000000",
"searchEngine": "Google",
"searchKeywords": "com",
"landingPage": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000&q=1622025088751",
"customFields": [],
"customVariableResults": [
{
"name": "CARLZHOU222SHENTI",
"value": "11123123123",
"url": ""
},
{
"name": "fccc",
"value": "520",
"url": ""
}
]
}
Update info for a visitor
PUT livechat/visitors/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
name | string | body | yes | Name of the custom variable. |
value | string | body | no | Value of the custom variable. |
url | string | body | no | URL of the custom variable. |
Response:
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
visits | int | Visit count of the visitor. | ||||||||
departmentId | guid | Department id of the visit. | ||||||||
productService | string | Product service of the visitor. | ||||||||
pageViews | int | Page view count of the visitor. | ||||||||
company | string | Company of the visitor. | ||||||||
customFields | FieldAndValue[] | Field and value array.
| ||||||||
firstVisitTime | datetime | First visit time of the visitor. | ||||||||
email | string | Email of the visitor. | ||||||||
state | string | State of the visitor. | ||||||||
id | guid | Id of the visitor. | ||||||||
operatingSystem | string | Operating system of the visitor used. | ||||||||
visitTime | datetime | Visit time of the visitor. | ||||||||
landingPage | string | Landing page of the visit. | ||||||||
customVariableResults | FieldAndValue[] | Field and value array.
| ||||||||
name | string | Name of the visitor. | ||||||||
city | string | City of the visitor. | ||||||||
flashVersion | string | Flash version of the visitor used. | ||||||||
currentBrowsing | string | Current browsing of the visitor. | ||||||||
timeZone | string | Timezone of the visitor. | ||||||||
searchKeywords | string | Search keywords of the visit. | ||||||||
phone | string | Phone of the visitor. | ||||||||
searchEngine | string | Search engine of the visit. | ||||||||
chats | int | Chat count of the visitor. | ||||||||
browser | string | Browser of the visitor used. | ||||||||
language | string | Language of the visitor used. | ||||||||
referrerUrl | string | Referrer Url of the visitor. | ||||||||
ip | string | IP of the visitor. | ||||||||
country | string | Country of the visitor. | ||||||||
screenResolution | string | Screen resolution of the visitor used. | ||||||||
status | string | Allowed values are "waitingForChat", "voiceChatting","chatting","preChat","manuallyInvited","autoInvited","offlineMessage","refusedByOperator","refusedByVisitor","chatEnded","inSite","outOfSite","transferring","manuallyInvitedByWindow","systemProcessing". |
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/visitors/3d59f909-24cd-43bc-89cb-00a320617c0a \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '[
{
"name": "visitor",
"value": "Leo",
"url": ""
},
{
"name": "company",
"value": "Comm100",
"url": ""
}
]
'
Response:
HTTP/1.1 200 OK
{
"id": "3d59f909-24cd-43bc-89cb-00a320617c0a",
"status": "inSite",
"browser": "Google Chrome 86.0.4240.75",
"operatingSystem": "Windows 8.1",
"screenResolution": "1680x1050",
"language": "en-US",
"ip": "192.168.2.128",
"country": "China",
"state": "Zhejiang",
"city": "Hangzhou",
"timeZone": "GMT +08:00",
"visitTime": "2021-05-26T10:30:16.036Z",
"firstVisitTime": "2021-05-26T10:31:29.597Z",
"visits": 1,
"chats": 0,
"pageViews": 1,
"currentBrowsing": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000&q=1622025088751",
"referrerUrl": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000",
"name": "192.168.2.128",
"email": "123@comm100.com",
"phone": "1234567890123",
"company": "comm",
"productService": "LA",
"departmentId": "00000000-0000-0000-0000-000000000000",
"searchEngine": "Google",
"searchKeywords": "com",
"landingPage": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=22f0b296-69e9-4b81-abe4-4bb9ed5ec9ef&siteId=10000&q=1622025088751",
"customFields": [],
"customVariableResults": [
{
"name": "CARLZHOU222SHENTI",
"value": "11123123123",
"url": ""
},
{
"name": "fccc",
"value": "520",
"url": ""
}
]
}
Was this article helpful?