Real Time
  • 17 Feb 2023
  • 4 Minutes to read
  • Dark
    Light

Real Time

  • Dark
    Light

Article Summary

Real Time

Get agents status

GET livechat/realTime/Agents

  • Parameters:

NameTypeinRequiredDescription
departmentIdguidpathnoId of the department.
includeStatusDistributionboolpathnoWhether include status distribution or not.
utcOffsetintpathnoTime offset for search
startTimedatetimepathnoStart time for search
endTimedatetimepathnoEnd time for search
  • Response:

NameTypeDescription
intradayChatsintIntraday chats number of the agent.
currentStatusIdguidCurrent status Id of the agent.
maxConcurrentChatsintMax concurrent chats of the agent.
intradayLinearChatTimestringIntraday linear chat time of the agent.
agentIdguidId of the agent.
ongoingChatsintThe ongoing chats number of the agent.
statusDistributionstringDictionary of status with status id.
displayNamestringDisplay name of the agent.
  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/realTime/Agents \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "total": 32,
  "pageCount": 7,
  "list": [
      {
          "agentId": "51f36e1a-d521-43bf-a0a8-20cbade284e4",
          "displayName": "srita2 chen",
          "currentStatusId": "00000000-0000-0000-0000-000000000000",
          "ongoingChats": 1,
          "maxConcurrentChats": 0,
          "intradayChats": 0,
          "intradayLinearChatTime": "06:53:57.0500000",
          "statusDistribution": {}
      },
      {
          "agentId": "841d966b-744b-405e-86d1-7e8c573ebc60",
          "displayName": "srita chen 10001",
          "currentStatusId": "00000000-0000-0000-0000-000000000000",
          "ongoingChats": 1,
          "maxConcurrentChats": 0,
          "intradayChats": 0,
          "intradayLinearChatTime": "00:20:38.2649999",
          "statusDistribution": {}
      },
      {
          "agentId": "74ed2bc3-a41f-4dc8-9ae0-f562ebea5943",
          "displayName": " frank 10001",
          "currentStatusId": "00000000-0000-0000-0000-000000000002",
          "ongoingChats": 0,
          "maxConcurrentChats": 0,
          "intradayChats": 0,
          "intradayLinearChatTime": "00:00:00",
          "statusDistribution": {}
      },
      {
          "agentId": "7bf10c1d-2973-4848-b08f-cd5195e6b337",
          "displayName": "1 1",
          "currentStatusId": "00000000-0000-0000-0000-000000000002",
          "ongoingChats": 0,
          "maxConcurrentChats": 0,
          "intradayChats": 0,
          "intradayLinearChatTime": "00:00:00",
          "statusDistribution": {}
      },
      {
          "agentId": "ed22fff9-5000-4430-8a32-efb530c9f049",
          "displayName": "1000 1",
          "currentStatusId": "00000000-0000-0000-0000-000000000002",
          "ongoingChats": 0,
          "maxConcurrentChats": 0,
          "intradayChats": 0,
          "intradayLinearChatTime": "00:00:00",
          "statusDistribution": {}
      }
  ],
  "pageIndex": 1,
  "pageSize": 5
} 

Get chat queue status

GET livechat/realTime/Queue

  • Parameters:

No Parameters

  • Response:

NameTypeDescription
routeToAgentagentReference to Agent.
avgWaitTimeinLast30MinsstringAverage wait time in last 30 minutes.
routeToDepartmentIdguidId of the route to department.
visitorsvisitor[]Reference of visitor.
routeToAgentIdguidId of the route to agent.
avgWaitTimeinLast60MinsstringAverage wait time in last 60 minutes.
routeToDepartmentdepartmentReference to Department.
switchedtoMessagesinLast30MinsintSwitched to messages in last 30 minutes.
currentQueueLengthintLength of current queue.
maxConcurrentChatsintMax concurrent chats of the site.
abandonedChatsinLast30MinsintAbandoned chats in last 30 minutes.
ongoingChatsintThe ongoing chats number of the agent.
  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/realTime/Queue \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "routeToDepartmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "routeToDepartment": {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "siteId": 0,
          "name": "string",
          "description": "string",
          "isAvailableInLiveChat": true,
          "isAvailableInTicketingAndMessaging": true,
          "isDeleted": true
      },
      "routeToAgentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "routeToAgent": {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "displayName": "string",
          "email": "string",
          "isAdmin": true,
          "siteId": 0,
          "firstName": "string",
          "lastName": "string",
          "isActive": true,
          "phone": "string",
          "title": "string",
          "bio": "string",
          "apiKey": "string",
          "createdTime": "2021-05-17T07:17:22.908Z",
          "isLocked": true,
          "lockedTime": "2021-05-17T07:17:22.908Z",
          "isDeleted": true,
          "systemAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "ifCustomizeAvatar": true,
          "customizeAvatar": "string",
          "avatar": "string",
          "departmentIds": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          ]
      },
      "ongoingChats": 0,
      "maxConcurrentChats": 0,
      "currentQueueLength": 0,
      "avgWaitTimeinLast30Mins": "00:00:00",
      "avgWaitTimeinLast60Mins": "00:00:00",
      "abandonedChatsinLast30Mins": 0,
      "switchedtoMessagesinLast30Mins": 0,
      "visitors": [
          {
              "visitorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "contactIdentityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "waitTime": "00:00:00"
          }
      ]
  }
] 

Get today's status

GET livechat/realTime/Today

  • Parameters:

NameTypeinRequiredDescription
startTimedatetimepathyesStart time for search,format yyyy-mm-ddThh:mm:ss
endTimedatetimepathnoEnd time for search,format yyyy-mm-ddThh:mm:ss
utcOffsetintpathnoTime offset for search
  • Response:

NameTypeDescription
avgWaitingTimedoubleAvgWaiting time number of today.
totalChatsintTotal chats number of today.
chatRequestsintChat requests number of today.
abandondedChatsintAbandonded chats number of today.
switchedToMessageChatsintSwitched to message chats number of today.
uniqueChatRatedoubleUnique chat rate number of today.
avgScoredoubleAvg score number of today.
serviceAccessibilityRatedoubleService accessibility rate number of today.
acceptedInvitationsintAccepted invitations number of today.
departmentTransferredChatsintDepartment transferred chats number of today.
missedChatsintMissed chats number of today.
chatAcceptanceRatedoubleChat acceptance rate number of today.
totalTransferredChatsintTotal transferred chats number of today.
agentAvgResponseTimedoubleAgent avg response time number of today.
chatsintChats number of today.
avgChatTimedoubleAvg chat time number of today.
agentUtilizationdoubleAgent utilization number of today.
  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/realTime/Today?startTime=2022-07-05T00:00:00&endTime=2022-07-05T23:59:59 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "chatRequests": 0,
  "totalChats": 0,
  "chats": 0,
  "chatAcceptanceRate": 0.0,
  "abandondedChats": 0,
  "switchedToMessageChats": 0,
  "missedChats": 0,
  "avgWaitingTime": 0.0,
  "avgChatTime": 0.0,
  "agentAvgResponseTime": 0.0,
  "acceptedInvitations": 0,
  "serviceAccessibilityRate": 0.0,
  "departmentTransferredChats": 0,
  "totalTransferredChats": 0,
  "uniqueChatRate": 0.0,
  "agentUtilization": 1.0,
  "avgScore": 0.0
} 

Get current status

GET livechat/realTime/RightNow

  • Parameters:

NameTypeinRequiredDescription
utcOffsetintpathnoTime offset for search
startTimedatetimepathnoStart time for search
endTimedatetimepathnoEnd time for search
  • Response:

NameTypeDescription
loggedInAgentsintLogged in agents number of right now.
agentsInChatintAgents in chat number of right now.
chatUtilizationintChat utilization number of right now.
visitorOnSiteintVisitor on site number of right now.
ongoingChatsintOngoing chats number of right now.
ongoingChatsWithAgentintOngoing chats with agent number of right now.
currentQueueLengthintCurrent queue length number of right now.
ongoingChatsWithBotintOngoing chats with bot number of right now.
  • Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/realTime/RightNow \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "agentsInChat": 0,
  "ongoingChats": 1,
  "ongoingChatsWithAgent": 1,
  "ongoingChatsWithBot": 0,
  "currentQueueLength": 0,
  "visitorOnSite": 1,
  "loggedInAgents": 2,
  "chatUtilization": 0.0
} 

Was this article helpful?

What's Next