NAV
Version: 1.0.0
GraphQL cURL

Introduction

RTD Server is a GraphQL server which provides a set of methods to build your own Real Time Display, with the technology of your choice.

With Real Time Display you can monitor TVox Services, TVox Groups/Skillsets and Agent Production.

Overview

RTD Server is build on GraphQL query language, which allows you to request exactly the information you need with a simple and intuitive syntax.

Consult the GraphQL Glossary for terminology.

Endpoint for requests is constructed as follows:

https://<TVOX_HOST>/rtdserver

RTD Server applies the following logic between client and server in providing the real-time data:

Protocol

GraphQL does not explicitly define the communication protocol to be used nor does it oblige to use a specific one.
Typically Query and Mutation operations can be served over HTTP, while Subscriptions via WebSockets, which by nature maintain an active connection on which client and server can exchange messages asynchronously; nothing prevents you from using the WebSocket for any type of operation.

HTTP

Request

RTD Server allows GET or POST requests over HTTPS protocol.

GET request

In GET request the query must be passed as value of the query parameter.

query {
  me {
    name
  }
}

Example:

https://<TVOX_HOST>/rtdserver?query={me{name}}

POST request

POST request should use the application/json content type, and include a JSON-encoded body of the following form:

{ "query": "{me{name}}" }

Response

Regardless of the method by which the request was sent, the response is returned in the body of the request in JSON format. A query might result in some data and some errors, and those are returned in a JSON object of the form:

{ "data": { ... }, "errors": [ ... ] }

If there were no errors returned, the errors field is not be present on the response. If no data is returned the data field is only be included if the error occurred during execution.

WebSocket

The HTTP request/response messaging remains valid also on WebSocket, but does not allow to execute more than one request on the same socket.
To do this it is necessary to use sub-protocols that extend the protocol by adding id, type and payload fields to exchanged messages in order to use the same socket to perform multiple operations.

The 2 sub-protocols for GraphQL over WebSocket currently most used are described below.

subscriptions-transport-ws

The WebSocket sub-protocol for this specification is: graphql-ws.

Here you can find the complete official documentation of the sub-protocol.

graphql-ws

The WebSocket sub-protocol for this specification is: graphql-transport-ws.

Here you can find the complete official documentation of the sub-protocol.

Development & Testing

RTD Server provides an interactive web environment (Playground) for develop and testing your requests.

Playground

It can be reached at the following link:

https://<TVOX_HOST>/rtdserver/playground

The Playground consists of two main sections:

To run the query just press the play button in the center.

The Playground allows also to generate the query's cURL command as an HTTP POST request.

Testing requests in Playground is a good way to verify that your request is correct and gives you the result you expect.

Version

query {
  version {
    server {
      major
      minor
      patch
    }
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  version {\n    server {\n      major\n      minor\n      patch\n    }\n  }\n}\n"}' --compressed

RTD Server follows a SemVer versioning.
In order to understand when server is updated and adapt your client to its changes, you can request current version (Query) and be notified of any updates (Subscription).

Operation: version(): RtdVersion

Server Health

query {
  serverHealth {
    status
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  serverHealth {\n    status\n  }\n}\n"}' --compressed

Get server health to monitor its status and manage if and when the server is no longer available (Query).

Operation: serverHealth(): ServerHealth

Authentication

RTD Server provides different types of authentication, also based on the communication protocol used.

Login with user credentials

mutation {
  login(username: "admin", password: "admin") {
    publicUsername
    username
    surname
    name
    session {
      id
      expiresIn
    }
    authToken {
      accessToken
      expiresIn
    }
    language
    supervisor
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"mutation {\n  login(username: \"admin\", password: \"admin\") {\n    publicUsername\n    username\n    surname\n    name\n    session {\n      id\n      expiresIn\n    }\n    authToken {\n      accessToken\n      expiresIn\n    }\n    language\n    supervisor\n  }\n}\n"}' --compressed

Login with user access token

mutation {
  loginWithAccessToken(accessToken: "accessToken") {
    publicUsername
    username
    surname
    name
    session {
      id
      expiresIn
    }
    authToken {
      accessToken
      expiresIn
    }
    language
    supervisor
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"mutation {\n  loginWithAccessToken(accessToken: \"accessToken\") {\n    publicUsername\n    username\n    surname\n    name\n    session {\n      id\n      expiresIn\n    }\n    authToken {\n      accessToken\n      expiresIn\n    }\n    language\n    supervisor\n  }\n}\n"}' --compressed

Authentication through session cookie involves creating a session through a login request (Mutation), which session will be validated through a cookie teleniaRtdSessionID returned after a successful login.

Login with user credentials: login(username: String!, password: String!): SessionUser!

Login with user access token: loginWithAccessToken(accessToken: String!): SessionUser!

Using user access token, requests can be authenticated by setting a cookie with key teleniaRtdAccessToken and the access token as value.

User access token can also be retrieved through a login with credentials request.

Access Token Connection Parameter

Using user access token, requests can be authenticated by passing the access token as a parameter in the payload of the connection init message:

{"type":"connection_init","payload":{"accessToken":"<ACCESS_TOKEN_VALUE>"}}

User access token can also be retrieved through a login with credentials request.

Service Stats

query {
  serviceStats(
    filter: {
      CALL: {
        services: ["service_1"]
        customStatKeys: ["sl1"]
        userSite: 1
        activityCodes: ["activityCode_1"]
      }
    }
  ) {
    code
    channel
    channelStats {
      ... on ServiceCcCallAtStat {
        answeredCalls
        answeredCallsUnderSpeedLimit
        closedCalls
        closedCallsCallBack
        connectedCall
        currentCalls
        hangupCalls
        maxTimeCallOnQueue
        outboundAnsweredCalls
        outboundClosedCallsGenericCause
        outboundHangupCalls
        outboundReceivedCalls
        queuedCalls
        receivedCalls
        receivedCallsInAccessList
        receivedCallsWithT4you
        receivedCallsWithT4youAnonymous
        receivedCallsWithT4youMultiple
        receivedCallsWithT4youSingle
        shortCalls
      }
    }
    userStats {
      busyOnDNCallInUsers {
        count
        profileIds
      }
      busyOnDNCallOutUsers {
        count
        profileIds
      }
      busyOnDNCallOutUsersPrivate {
        count
        profileIds
      }
      busyOnDNCallUsers {
        count
        profileIds
      }
      busyOnServUsers {
        count
        profileIds
      }
      busyUsers {
        count
        profileIds
      }
      loggedUsers {
        count
        profileIds
      }
      notReadyUsers {
        count
        profileIds
      }
      notReadyUsersOnActivityCode {
        count
        profileIds
      }
      activityCodeIndicators {
        count
        profileIds
      }
      postCallUsers {
        count
        profileIds
      }
      readyUsers {
        count
        profileIds
      }
    }
    customStats {
      key
      value
    }
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  serviceStats(\n    filter: {\n      CALL: {\n        services: [\"service_1\"]\n        customStatKeys: [\"sl1\"]\n        userSite: 1\n        activityCodes: [\"activityCode_1\"]\n      }\n    }\n  ) {\n    code\n    channel\n    channelStats {\n      ... on ServiceCcCallAtStat {\n        answeredCalls\n        answeredCallsUnderSpeedLimit\n        closedCalls\n        closedCallsCallBack\n        connectedCall\n        currentCalls\n        hangupCalls\n        maxTimeCallOnQueue\n        outboundAnsweredCalls\n        outboundClosedCallsGenericCause\n        outboundHangupCalls\n        outboundReceivedCalls\n        queuedCalls\n        receivedCalls\n        receivedCallsInAccessList\n        receivedCallsWithT4you\n        receivedCallsWithT4youAnonymous\n        receivedCallsWithT4youMultiple\n        receivedCallsWithT4youSingle\n        shortCalls\n      }\n    }\n    userStats {\n      busyOnDNCallInUsers {\n        count\n        profileIds\n      }\n      busyOnDNCallOutUsers {\n        count\n        profileIds\n      }\n      busyOnDNCallOutUsersPrivate {\n        count\n        profileIds\n      }\n      busyOnDNCallUsers {\n        count\n        profileIds\n      }\n      busyOnServUsers {\n        count\n        profileIds\n      }\n      busyUsers {\n        count\n        profileIds\n      }\n      loggedUsers {\n        count\n        profileIds\n      }\n      notReadyUsers {\n        count\n        profileIds\n      }\n      notReadyUsersOnActivityCode {\n        count\n        profileIds\n      }\n      activityCodeIndicators {\n        count\n        profileIds\n      }\n      postCallUsers {\n        count\n        profileIds\n      }\n      readyUsers {\n        count\n        profileIds\n      }\n    }\n    customStats {\n      key\n      value\n    }\n  }\n}\n"}' --compressed

Get current service stats (Query) and updates (Subscription).

Operation: serviceStats(filter: ServiceStatFilter!): [ServiceStat]

Group Stats

query {
  groupStats(
    filter: { CALL: { groups: ["skillset_1"], customStatKeys: ["sl1"] } }
  ) {
    code
    channel
    channelStats {
      ... on GroupCcCallStat {
        answeredCalls
        closedCalls
        hangupCalls
        queuedCalls
        receivedCalls
        shortCalls
      }
    }
    userStats {
      loggedUsers {
        count
        profileIds
      }
      notReadyUsers {
        count
        profileIds
      }
      notReadyUsersOnActivityCode {
        count
        profileIds
      }
      postCallUsers {
        count
        profileIds
      }
      readyUsers {
        count
        profileIds
      }
    }
    customStats {
      key
      value
    }
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  groupStats(\n    filter: { CALL: { groups: [\"skillset_1\"], customStatKeys: [\"sl1\"] } }\n  ) {\n    code\n    channel\n    channelStats {\n      ... on GroupCcCallStat {\n        answeredCalls\n        closedCalls\n        hangupCalls\n        queuedCalls\n        receivedCalls\n        shortCalls\n      }\n    }\n    userStats {\n      loggedUsers {\n        count\n        profileIds\n      }\n      notReadyUsers {\n        count\n        profileIds\n      }\n      notReadyUsersOnActivityCode {\n        count\n        profileIds\n      }\n      postCallUsers {\n        count\n        profileIds\n      }\n      readyUsers {\n        count\n        profileIds\n      }\n    }\n    customStats {\n      key\n      value\n    }\n  }\n}\n"}' --compressed

Get current group stats (Query) and updates (Subscription).

Operation: groupStats(filter: GroupStatFilter!): [GroupStat]

Users

query {
  users(
    filter: {
      statuses: [READY, NOT_READY, BUSY, NOT_READY_BUSY, BOOKED, WNR]
      skillsets: ["skillset_1", "skillset_2"]
      services: ["service_1", "service_2"]
      channels: [CALL]
    }
  ) {
    mutation
    username
    activeProfile
    surname
    name
    activityCodes {
      CALL
    }
    services
    site
    skillsets
    statuses {
      CALL
    }
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  users(\n    filter: {\n      statuses: [READY, NOT_READY, BUSY, NOT_READY_BUSY, BOOKED, WNR]\n      skillsets: [\"skillset_1\", \"skillset_2\"]\n      services: [\"service_1\", \"service_2\"]\n      channels: [CALL]\n    }\n  ) {\n    mutation\n    username\n    activeProfile\n    surname\n    name\n    activityCodes {\n      CALL\n    }\n    services\n    site\n    skillsets\n    statuses {\n      CALL\n    }\n  }\n}\n"}' --compressed

Get current users info (Query) and updates (Subscription).

Operation: users(filter: UserFilter!): [User]

User Stats

query {
  userStats(
    filter: {
      CALL: { users: ["user_1", "user_2"], activityCodes: ["activityCode_1"] }
    }
  ) {
    username
    name
    surname
    userSite
    loggedProfileId

    channel
    activityCode
    activityCode2
    currentGroup
    currentService
    numberCallFromService
    numberCallFromServiceAnswered
    numberCallFromServiceNotAnswered
    numberCallIn
    numberCallOut
    numberCallOutPrivate
    numberCallServiceOverSpeedAnswer
    status
    timeInActivityCode {
      activityCode
      totalTime
    }
    timeInActivityCodeStateBusy {
      activityCode
      totalTime
    }
    timeInActivityCodeStateNotReady {
      activityCode
      totalTime
    }
    timeInState
    timeInStateBooked
    timeInStateBusy
    timeInStateBusyDnCallIn
    timeInStateBusyDnCallOut
    timeInStateBusyDnCallOutPrivate
    timeInStateBusyOnService
    timeInStateNotReady
    timeInStateReady
    timeInStateWNR
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  userStats(\n    filter: {\n      CALL: { users: [\"user_1\", \"user_2\"], activityCodes: [\"activityCode_1\"] }\n    }\n  ) {\n    username\n    name\n    surname\n    userSite\n    loggedProfileId\n\n    channel\n    activityCode\n    activityCode2\n    currentGroup\n    currentService\n    numberCallFromService\n    numberCallFromServiceAnswered\n    numberCallFromServiceNotAnswered\n    numberCallIn\n    numberCallOut\n    numberCallOutPrivate\n    numberCallServiceOverSpeedAnswer\n    status\n    timeInActivityCode {\n      activityCode\n      totalTime\n    }\n    timeInActivityCodeStateBusy {\n      activityCode\n      totalTime\n    }\n    timeInActivityCodeStateNotReady {\n      activityCode\n      totalTime\n    }\n    timeInState\n    timeInStateBooked\n    timeInStateBusy\n    timeInStateBusyDnCallIn\n    timeInStateBusyDnCallOut\n    timeInStateBusyDnCallOutPrivate\n    timeInStateBusyOnService\n    timeInStateNotReady\n    timeInStateReady\n    timeInStateWNR\n  }\n}\n"}' --compressed

Get current user stats (Query) and updates (Subscription).

Operation: userStats(filter: UserStatFilter!): [UserStat]

User Profile Stats

query {
  userProfileStats(
    filter: {
      CALL: { userProfiles: [1, 2], activityCodes: ["activityCode_1"] }
    }
  ) {
    id
    userSite
    channel
    activityCode
    activityCode2
    currentGroup
    currentService
    numberCallFromService
    numberCallFromServiceAnswered
    numberCallFromServiceNotAnswered
    numberCallIn
    numberCallOut
    numberCallOutPrivate
    numberCallServiceOverSpeedAnswer
    status
    timeInActivityCode {
      activityCode
      totalTime
    }
    timeInActivityCodeStateBusy {
      activityCode
      totalTime
    }
    timeInActivityCodeStateNotReady {
      activityCode
      totalTime
    }
    timeInState
    timeInStateBooked
    timeInStateBusy
    timeInStateBusyDnCallIn
    timeInStateBusyDnCallOut
    timeInStateBusyDnCallOutPrivate
    timeInStateBusyOnService
    timeInStateNotReady
    timeInStateReady
    timeInStateWNR
    timeInHold {
      time
      timeInState
    }
  }
}
curl 'https://<TVOX_HOST>/rtdserver' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://<TVOX_HOST>' --data-binary '{"query":"query {\n  userProfileStats(\n    filter: {\n      CALL: { userProfiles: [1, 2], activityCodes: [\"activityCode_1\"] }\n    }\n  ) {\n    id\n    userSite\n    channel\n    activityCode\n    activityCode2\n    currentGroup\n    currentService\n    numberCallFromService\n    numberCallFromServiceAnswered\n    numberCallFromServiceNotAnswered\n    numberCallIn\n    numberCallOut\n    numberCallOutPrivate\n    numberCallServiceOverSpeedAnswer\n    status\n    timeInActivityCode {\n      activityCode\n      totalTime\n    }\n    timeInActivityCodeStateBusy {\n      activityCode\n      totalTime\n    }\n    timeInActivityCodeStateNotReady {\n      activityCode\n      totalTime\n    }\n    timeInState\n    timeInStateBooked\n    timeInStateBusy\n    timeInStateBusyDnCallIn\n    timeInStateBusyDnCallOut\n    timeInStateBusyDnCallOutPrivate\n    timeInStateBusyOnService\n    timeInStateNotReady\n    timeInStateReady\n    timeInStateWNR\n    timeInHold {\n      time\n      timeInState\n    }\n  }\n}\n"}' --compressed

Get current user profile stats (Query) and updates (Subscription).

Operation: userProfileStats(filter: UserProfileStatFilter!): [UserProfileStat]

Schema Types

This section documents the schema types of the RTD GraphQL Server.

Basic knowledge

Syntax Description
Type! Type object is required
[Type] List of Type objects
[Type]! List of Type objects where at least one element is required, but this element can be null
[Type!]! List of Type objects where at least one element is required and this element can not be null

Query

Field Argument Type Description
version RtdVersion Get client and server version
serverHealth ServerHealth Get server health
users [User] Get users info
filter UserFilter! User filter
serviceStats [ServiceStat] Get service stats
filter ServiceStatFilter! Service stats filter
userStats [UserStat] Get user stats
filter UserStatFilter! User stats filter
userProfileStats [UserProfileStat] Get user profile stats
filter UserProfileStatFilter! User profile stats filter
groupStats [GroupStat] Get group stats
filter GroupStatFilter! Group stats filter

Mutation

Field Argument Type Description
login SessionUser! Login with user credentials (username and password)
username String! User username
password String! User password
loginWithAccessToken SessionUser! Login with user access token
accessToken String! User access token

Subscription

Field Argument Type Description
version RtdVersion Get client and server version updates
users [User] Get users info updates
filter UserFilter! User filter
serviceStats [ServiceStat] Get service stats updates
filter ServiceStatFilter! Service stats filter
userStats [UserStat] Get user stats updates
filter UserStatFilter! User stats filter
userProfileStats [UserProfileStat] Get user profile stats updates
filter UserProfileStatFilter! User profile stats filter
groupStats [GroupStat] Get group stats updates
filter GroupStatFilter! Group stats filter

Objects

AuthToken

The AuthToken type represents current logged user auth token

Field Argument Type Description
accessToken String! User access token
expiresIn Int! User access token expiration in seconds

CustomStat

The CustomStat type represents custom stat

Field Argument Type Description
key String! Custom stat key
value String Custom stat value

GroupCcCallStat

The GroupCcCallStat type represents group stat for call channel

Field Argument Type Description
answeredCalls Int Operator's calls answered
closedCalls Int Number of calls closed on the service in the 'active' context
hangupCalls Int Number of abandoned calls (hung up by the caller) in the "active" context
queuedCalls Int Number of queued calls
receivedCalls Int Number of calls received by the service in an "active" context
shortCalls Int Number of short abandoned calls. A short call is an abandoned call that does not exceed a predetermined duration (e.g. Users who realize they have the wrong number and hang up almost immediately)

GroupCcChatStat

The GroupCcChatStat type represents group stat for chat channel

Field Argument Type Description
answeredCalls Int Operator's chats answered
closedCalls Int Number of chats closed on the service in the 'active' context
receivedCalls Int Number of chats received by the service in an "active" context

GroupCcVideoStat

The GroupCcVideoStat type represents group stat for video channel

Field Argument Type Description
answeredCalls Int Operator's video-calls answered
closedCalls Int Number of video-calls closed on the service in the 'active' context
receivedCalls Int Number of video-calls received by the service in an "active" context

GroupStat

The GroupStat type represents group stat

Field Argument Type Description
code String! Stat group code
channel MultiChannel! Stat channel
channelStats GroupChannelStatUnion Group channel stats
userStats GroupUserStat Group users stats
customStats [CustomStat!] Group custom stats

GroupUserStat

The GroupUserStat type represents group users' stats

Field Argument Type Description
loggedUsers UserProfileInStatus Number of logged in agents
notReadyUsers UserProfileInStatus Number of agents in Not Ready state
notReadyUsersOnActivityCode UserProfileInStatus Number of agents in Not Ready state who have specified an activity code
postCallUsers UserProfileInStatus Number of agents in "Post Call Processing" state. It is the timeout configured on each operator to allow the closing of the activities related to the previous service conversation.
readyUsers UserProfileInStatus Number of agents in Ready state

RtdVersion

The RtdVersion type represents RTD Client/Server version

Field Argument Type Description
client Version RTD TVox Client version
server Version RTD Server version

ServerHealth

The ServerHealth type represents server healt

Field Argument Type Description
status ServerHealthStatus! Server Healt status

ServiceCcCallAtStat

The ServiceCcCallAtStat type represents service stat for call channel

Field Argument Type Description
answeredCalls Int Operator's calls answered
answeredCallsUnderSpeedLimit Int Number of calls answered by operator within the 'response speed' threshold timeout
closedCalls Int Number of calls closed on the service in the 'active' context
closedCallsCallBack Int Number of callback requests in 'active' context
connectedCall Int Number of conversation calls on agents
currentCalls Int Number of calls in progress on the service in the 'active' context
hangupCalls Int Number of abandoned calls (hung up by the caller) in the "active" context
maxTimeCallOnQueue Int Maximum waiting time in queue for calls queued to the service
outboundAnsweredCalls Int Number of outgoing calls answered by the called contact
outboundClosedCallsGenericCause Int Number of outgoing calls that could not be made due to an error, e.g.: Congestion, ChannelUnavailable, other...
outboundHangupCalls Int Number of outgoing calls not answered
outboundReceivedCalls Int Outgoing call attempts made
queuedCalls Int Number of queued calls
receivedCalls Int Number of calls received by the service in an "active" context
receivedCallsInAccessList Int Number of calls received by the service in the 'active' context filtered from the access list (blacklist or whitelist)
receivedCallsWithT4you Float Percentage value of calls received that were answered positively in the directory in an "active" context (if not available, it is valued as -1)
receivedCallsWithT4youAnonymous Float Percentage of calls received that received an anonymous response in the directory in an "active" context (if not available, it is valued as -1)
receivedCallsWithT4youMultiple Float Percentage value of calls received that have had more than one answer in the directory in an "active" context (if not available, it is valued as -1)
receivedCallsWithT4youSingle Float Percentage of calls received that were exactly matched in the directory in an "active" context (if not available, it is valued as -1)
shortCalls Int Number of short abandoned calls. A short call is an abandoned call that does not exceed a predetermined duration (e.g. Users who realize they have the wrong number and hang up almost immediately)

ServiceCcChatAtStat

The ServiceCcChatAtStat type represents service stat for chat channel

Field Argument Type Description
answeredCalls Int Operator's chats answered
closedCalls Int Number of chats closed on the service in the 'active' context
receivedCalls Int Number of chats received by the service in an "active" context

ServiceCcVideoAtStat

The ServiceCcVideoAtStat type represents service stat for video channel

Field Argument Type Description
answeredCalls Int Operator's video-calls answered
closedCalls Int Number of video-calls closed on the service in the 'active' context
receivedCalls Int Number of video-calls received by the service in an "active" context

ServiceStat

The ServiceStat type represents service stat

Field Argument Type Description
code String! Stat service code
channel MultiChannel! Stat channel
channelStats ServiceChannelStatUnion Service channel stats
userStats ServiceUserStat Service users stats
customStats [CustomStat!] Service custom stats

ServiceUserStat

The ServiceUserStat type represents service users' stats

Field Argument Type Description
busyOnDNCallInUsers UserProfileInStatus Number of agents engaged in a direct incoming call conversation (DN-Call IN)
busyOnDNCallOutUsers UserProfileInStatus Number of agents engaged in conversation for direct outgoing calls (DN-Call OUT)
busyOnDNCallOutUsersPrivate UserProfileInStatus Number of agents engaged in a private outgoing call conversation
busyOnDNCallUsers UserProfileInStatus Number of agents in conversation for direct calls (DN-Call)
busyOnServUsers UserProfileInStatus Number of agents engaged in a service call conversation
busyUsers UserProfileInStatus Total number of agents engaged in a telephone conversation
loggedUsers UserProfileInStatus Number of logged in agents
notReadyUsers UserProfileInStatus Number of agents in Not Ready state
notReadyUsersOnActivityCode UserProfileInStatus Number of agents in Not Ready state who have specified an activity code
activityCodeIndicators [UserProfileInActivityCode!] Agents in activity code
postCallUsers UserProfileInStatus Number of agents in "Post Call Processing" state. It is the timeout configured on each operator to allow the closing of the activities related to the previous service conversation.
readyUsers UserProfileInStatus Number of agents in Ready state

Session

The Session type represents current session

Field Argument Type Description
id ID! Session id
expiresIn Int! Session expiration in seconds

SessionUser

The SessionUser type represents logged user in current session

Field Argument Type Description
publicUsername String! Logged user public username
username String! Logged user username
surname String! Logged user surname
name String Logged user name
session Session! Logged user current session
authToken AuthToken! Logged user auth token
language Language! Logged user language
supervisor Boolean! Logged user is supervisor

TimeInActivityCode

The TimeInActivityCode type represents time in activity code

Field Argument Type Description
activityCode String! Activity code
totalTime Int! Total time in activity code

TimeInHold

The TimeInHold type represents time in hold

Field Argument Type Description
time Date Last time in hold
timeInState Int Total time in hold

User

The User type represents user

Field Argument Type Description
mutation MutationType! User current mutation type
username String! User username
activeProfile Int User active profile id
surname String User surname
name String User name
activityCodes UserActivityCodeMap User activity codes per channel
services [String!] User services
site Int User site
skillsets [String!] User skillsets
statuses UserStatusMultiChannelMap User statuses per channel

UserActivityCodeMap

The UserActivityCodeMap type represents user activity code per channel

Field Argument Type Description
CALL String User call channel activity code
VIDEO String User call channel activity code
CHAT String User call channel activity code

UserProfileInActivityCode

The UserProfileInActivityCode type represents user profiles in activity code

Field Argument Type Description
activityCode String! Activity code
count Int Profile ids in activity code count
profileIds [Int!] Profile ids in activity code

UserProfileInStatus

The UserProfileInStatus type represents user profiles in status

Field Argument Type Description
count Int Profile ids in status count
profileIds [Int!] Profile ids in status

UserProfileStat

The UserProfileStat type represents user profile stat

Field Argument Type Description
id Int! Stat user profile id
userSite Int Stat user site
channel MultiChannel! Stat channel
activityCode String Stat user activity code (if not present, it is valued as "__EMPTY__")
activityCode2 String Stat user 2nd level activity code (if not present, it is valued as "__EMPTY__")
currentGroup String Stat user current group (if not present, it is valued as "__EMPTY__")
currentService String Stat user current service (if not present, it is valued as "__EMPTY__")
numberCallFromService Int Number of service calls received by the agent
numberCallFromServiceAnswered Int Number of service calls answered by the agent
numberCallFromServiceNotAnswered Int Number of service calls that the operator did not answer
numberCallIn Int Total number of calls received by the agent
numberCallOut Int Total number of calls made by the agent
numberCallOutPrivate Int Total number of private calls made
numberCallServiceOverSpeedAnswer Int Number of calls answered by the service beyond the 'response speed' threshold configured in the TVox-> General settings-> Miscellaneous menu
status UserStatus Current Agent state
timeInActivityCode [TimeInActivityCode!] Total time elapsed on activity code
timeInActivityCodeStateBusy [TimeInActivityCode!] Total time wlapsed on activity code
timeInActivityCodeStateNotReady [TimeInActivityCode!] Total time elapsed on activity code in state not ready
timeInState Date Time spent by the operator in the current state
timeInStateBooked Int Total time (expressed in seconds) that the operator has been in the Reserved state. This is the time when the phone rings
timeInStateBusy Int Total time (expressed in seconds) that the operator has remained in the busy state (Busy)
timeInStateBusyDnCallIn Int Total time (in seconds) that the attendant was on busy for incoming calls
timeInStateBusyDnCallOut Int Total time (in seconds) that the attendant was busy for outgoing calls
timeInStateBusyDnCallOutPrivate Int Total time (in seconds) that the operator has been in busy state for private outgoing calls
timeInStateBusyOnService Int Total time (in seconds) that the operator has been in the busy state for service calls
timeInStateNotReady Int Total time (in seconds) that the operator was in the Not Ready state
timeInStateReady Int Total time (in seconds) that the operator was in the Ready state
timeInStateWNR Int Total time (in seconds) that the operator was in the "Post Call Processing" state
timeInHold TimeInHold Hold time for service calls

UserStat

The UserStat type represents user stat

Field Argument Type Description
username String! Stat user username
name String Stat user name
surname String Stat user surname
userSite Int Stat user site
loggedProfileId Int! Stat user logged profile id
channel MultiChannel! Stat channel
activityCode String Stat user activity code (if not present, it is valued as "__EMPTY__")
activityCode2 String Stat user 2nd level activity code (if not present, it is valued as "__EMPTY__")
currentGroup String Stat user current group (if not present, it is valued as "__EMPTY__")
currentService String Stat user current service (if not present, it is valued as "__EMPTY__")
numberCallFromService Int Number of service calls received by the agent
numberCallFromServiceAnswered Int Number of service calls answered by the agent
numberCallFromServiceNotAnswered Int Number of service calls that the operator did not answer
numberCallIn Int Total number of calls received by the agent
numberCallOut Int Total number of calls made by the agent
numberCallOutPrivate Int Total number of private calls made
numberCallServiceOverSpeedAnswer Int Number of calls answered by the service beyond the 'response speed' threshold configured in the TVox-> General settings-> Miscellaneous menu
status UserStatus Current Agent state
timeInActivityCode [TimeInActivityCode!] Total time elapsed on activity code
timeInActivityCodeStateBusy [TimeInActivityCode!] Total time wlapsed on activity code
timeInActivityCodeStateNotReady [TimeInActivityCode!] Total time elapsed on activity code in state not ready
timeInState Date Time spent by the operator in the current state
timeInStateBooked Int Total time (expressed in seconds) that the operator has been in the Reserved state. This is the time when the phone rings
timeInStateBusy Int Total time (expressed in seconds) that the operator has remained in the busy state (Busy)
timeInStateBusyDnCallIn Int Total time (in seconds) that the attendant was on busy for incoming calls
timeInStateBusyDnCallOut Int Total time (in seconds) that the attendant was busy for outgoing calls
timeInStateBusyDnCallOutPrivate Int Total time (in seconds) that the operator has been in busy state for private outgoing calls
timeInStateBusyOnService Int Total time (in seconds) that the operator has been in the busy state for service calls
timeInStateNotReady Int Total time (in seconds) that the operator was in the Not Ready state
timeInStateReady Int Total time (in seconds) that the operator was in the Ready state
timeInStateWNR Int Total time (in seconds) that the operator was in the "Post Call Processing" state

UserStatusMultiChannelMap

The UserStatusMultiChannelMap type represents user status per channel

Field Argument Type Description
CALL UserStatus User call channel status
VIDEO UserStatus User video channel status
CHAT UserStatus User chat channel status

Version

The Version type represents the versioning of the application following the SemVer syntax

Field Argument Type Description
major Int Major version value
minor Int Minor version value
patch Int Patch version value

Inputs

GroupChannelStatFilter

The GroupChannelStatFilter type represents filter for group channel stats

Field Type Description
groups [String!]! Group codes (Search: at least one)
customStatKeys [String!] Custom stat keys (Search: at least one)

GroupStatFilter

The GroupStatFilter type represents filter for group stats

Field Type Description
CALL GroupChannelStatFilter Filter for group call channel stats
VIDEO GroupChannelStatFilter Filter for group video channel stats
CHAT GroupChannelStatFilter Filter for group chat channel stats

ServiceChannelStatFilter

The ServiceChannelStatFilter type represents filter for service channel stats

Field Type Description
services [String!]! Service codes (Search: at least one)
customStatKeys [String!] Custom stat keys (Search: at least one)
userSite Int User site (Search: exactly; if not specified, consider all user sites)
activityCodes [String!] Activity codes (Search: at least one)

ServiceStatFilter

The ServiceStatFilter type represents filter for service stats

Field Type Description
CALL ServiceChannelStatFilter Filter for service call channel stats
VIDEO ServiceChannelStatFilter Filter for service video channel stats
CHAT ServiceChannelStatFilter Filter for service chat channel stats

UserFilter

The UserFilter type represents filter for user info

Field Type Description
surname String User surname (Search: contains)
name String User name (Search: contains)
sites [Int!] User sites (Search: at least one)
statuses [UserStatusFilter!] User statuses (Search: at least one)
skillsets [String!] User skillsets (Search: at least one)
services [String!] User services (Search: at least one)
activityCodes [String!] User activity codes (Search: at least one)
channels [MultiChannel!] User channels (Search: at least one)

UserProfileStatChannelFilter

The UserProfileStatChannelFilter type represents filter for user profile channel stats

Field Type Description
userProfiles [Int!]! Users profile ids (Search: at least one)
activityCodes [String!] Activity codes (Search: at least one)

UserProfileStatFilter

The UserProfileStatFilter type represents filter for user profile stats

Field Type Description
CALL UserProfileStatChannelFilter Filter for user profile call channel stats

UserStatChannelFilter

The UserStatChannelFilter type represents filter for user channel stats

Field Type Description
users [String!]! Users username (Search: at least one)
activityCodes [String!] Activity codes (Search: at least one)

UserStatFilter

The UserStatFilter type represents filter for user stats

Field Type Description
CALL UserStatChannelFilter Filter for user call channel stats

Enums

Language

The Language enum represents language

Value Description
IT Italian
EN English
it_IT Italian (IT)
en_US English (US)

MultiChannel

The MultiChannel enum represents channel type

Value Description
CALL Call channel
VIDEO Video channel
CHAT Chat channel

MutationType

The MutationType type represents state of presence of associated item in current result

Value Description
CREATED Item has been created
UPDATED Item has been updated
DELETED Item has been deleted

ServerHealthStatus

The ServerHealthStatus enum represents server healt status

Value Description
PASS Pass status indicates that the server is responding correctly
FAIL Fail status indicates that the server is not responding correctly

StatType

The StatType enum represents stat type

Value Description
SERVICE Service stat type
USER User stat type
USERPROFILE User profile stat type
GROUP Group stat type

UserStatus

The UserStatus enum represents user status

Value Description
READY User ready
NOT_READY User not ready
BOOKED User booked
BUSY User busy
NOT_READY_BUSY User not ready busy
WNR User in post "call" processing (WNR: Work Not Ready)
BUSY_dn_call_in User busy on inbound interaction
BUSY_dn_call_out User busy on outbound interaction
BUSY_dn_call_out_private User busy on private outbound interaction
BUSY_service User busy on service interaction
NR_BUSY_dn_call_in User not ready busy on inbound interaction
NR_BUSY_dn_call_out User not readt busy on outbound interaction
NR_BUSY_dn_call_out_private User not readt busy on private outbound interaction

UserStatusFilter

The UserStatusFilter enum represents user status to filter

Value Description
READY User ready
NOT_READY User not ready
BOOKED User booked
BUSY User busy
NOT_READY_BUSY User not ready busy
WNR User in post "call" processing (WNR: Work Not Ready)

Scalars

Boolean

The Boolean scalar type represents true or false.

Date

The Date scalar type represents date/time (RFC 3339) as string at UTC.

Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Unions

GroupChannelStatUnion

The GroupChannelStatUnion type represents the union of group stats for all channels

Type Description
GroupCcCallStat The `GroupCcCallStat` type represents group stat for call channel
GroupCcVideoStat The `GroupCcVideoStat` type represents group stat for video channel
GroupCcChatStat The `GroupCcChatStat` type represents group stat for chat channel

ServiceChannelStatUnion

The ServiceChannelStatUnion type represents the union of service stats for all channels

Type Description
ServiceCcCallAtStat The `ServiceCcCallAtStat` type represents service stat for call channel
ServiceCcVideoAtStat The `ServiceCcVideoAtStat` type represents service stat for video channel
ServiceCcChatAtStat The `ServiceCcChatAtStat` type represents service stat for chat channel

GraphQL Glossary

Below a short GraphQL glossary of the main terms used in reference to the example on the right, reporting some basic GraphQL operations for retrieving some users info searching them by name and adding user.

# Query "users" searches for users with name equal to "John"
# and displays their name, surname, address (street and city)
# and employment, distinguished between school for child and office for adult
query {
  users(searchName: "John") {
    name
    surname
    address {
      street
      city
    }
    employment {
      ... on Child {
        school
      }
      ... on Adult {
        office
      }
    }
  }
}

# Mutation "userAdd" add user with name "John" and surname "Doe"
mutation {
  userAdd(name: "John", surname: "Doe") {
    name
    surname
    address {
      street
      city
    }
  }
}

# Subscription "users" searches for users with name equal to "John"
# and send updates on their name, surname and address (street and city)
subscription {
  users(searchName: "John") {
    name
    surname
    address {
      street
      city
    }
  }
}
Term Description Example
Query Operation type defining a single data request query
Mutation Operation type defining a request that applies changes to the server mutation
Subscription Operation type defining a request for data whose changes are to be received subscription
Operation Function that performs the requested operation users, userAdd
Argument Values to filter requested data or used for mutation searchName, name, surname
Field Value that rapresents requested data name, surname, address (street and city are defined as fields of address), employment (interface or union of Child and Adult)
Inline Fragments If you are querying a field that returns an interface or a union type, you will need to use inline fragments to access data on the underlying concrete type. ... on Child {, ... on Adult {

Example

Download the example Test here.

The example test is a basic Angular client that uses a GraphQL client self-generated from the RTD Server schema. More details in its README.md file.

After downloading and unzipping the example test:

Then, login with valid TVox credentials to start monitor the system.

After logging in, you can get services or users (the default for testing is all registered users).

If you want to get services, enter the code of the services in the text area, separating them with commas (e.g. code1,code2,...), and click generate statistics.

The result of the click Generate statistics is the list of services with the values of its indicators, if you click the Retrieve users button, get the list of users with their statistics.

Download

Download the GraphQL schema here.

Changelog

1.3.0

Available from: 26.2.7, 26.5.0

1.2.0

1.0.3

1.0.2

1.0.1

1.0.0