KPN

Dashboard Server - KPN

KPN

Show real-time client contact information on every display

Stable and cost-efficient insights into agents, queues and trunks

  • Communication

API reference on SwaggerHub API reference on Postman

Introduction

Client contact centers possess a lot of data, for example on Agents, Queues and Trunks. KPN has extensive experience in collecting data from these client contact centers to create valuable insights and powerful dashboards. This service is now available for anyone with a Dashboard Server API. The Dashboard Server API is available in the sandbox environment, using mock data that represents a client contact center. It returns a JSON object. It can also modify the contents of the response per user. This is available for you to experience the possibilities. To take this API into production, KPN needs to implement the data collectors on your (on-premise) client contact center solution. In your dashboard you can apply for the production Dashboard Server API after which KPN follows up on your request.

Conceptual model

Conceptual model

Definitions

Contact center A Contact center is a Customer Service facility that houses all inbound and outbound communication channels of a company. Examples of different channels are o.a.: email, voice, fax, chat, commerce, twitter, facebook, youtube, etc.

Agent An agent is a person working in a contact center who can answer your call, mail, message, etc.

Queue When a person calls to the contact center, the call is first queued to a queue where it will wait for the first available agent before being transferred.

Trunk A trunk is a switching node that can carry many simultaneous calls. Used for example between PBX telephony server and the office clients.

API workflow

API workflow

Features and constraints

Features

  • Get realtime information for agents, queues or trunks
  • Drill down to individual agent, queue or trunk
  • Fully qualified results including service level, status, aux-reason, etc.

Constraints

  • Data generated is representational only.

Getting started

Setting up your third party accounts

Make sure you have a registered account on the API Store and created an application on the portal, to receive the associated client ID and secret. These are neccessary to request an access token. You will receive these after your app is approved on te API Store.

Authentication

OAuth 2.0

For accessing and/or manipulating the resources, the client application (your application) needs to be granted permission to do so. The OAuth 2.0 standard defines a protocol that allows such third-party authorization through the use of access tokens. Access tokens are central in the protocol: those tokens, in the form of strings, are delivered by an authorization server (our authentication server) and they enable the client application to securely access protected data on behalf of the resource owner (the end-user). We use Client Credentials Grant which means the application makes the request to the authentication service by sending authorization credentials and the service responds with an access token among other useful information.

Get Access Token

Copy your app's credentials (Consumer Key & Consumer Secret) to be used in the Authentication requests below.

Authentication in SwaggerHub:

  1. Upon loading completed within SwaggerHub, look top right for the Authorize button and click it.
  2. In the form, fill in client_id and client_secret fields, using your app's credentials.
  3. Click Authorize.
  4. Now you are authorized to issue the requests provided.

Authentication in Postman:

  1. Select Get Access Token from the collection.
  2. Make sure the right Environment corresponding to the API is selected.
  3. Edit the environment variables client_id and client_secret, using your app's credentials.
  4. Check the response code and message.
  5. Press the Send button to get the access token.
  6. Now you are authorized to issue the other requests in the collection.

The authorization service returns a JSON message that contains the access_token field.

{
    "refresh_token_expires_in": "0",
    "api_product_list": "[xxxxxxx]",
    "api_product_list_json": [
        " xxxxxxx"
    ],
    "organization_name": "kpn",
    "developer_email": "demo123@kpn.com",
    "token_type": "Bearer",
    "issued_at": "1521039195424",
    "client_id": "APP_CONSUMER_KEY",
    "access_token": "haf2SDl07E9N7RluNQ4kJ1TkGgso",
    "application_name": "6e38ed2d-48b1-4362-97d6-04254065d79c",
    "scope": "",
    "expires_in": "3599",
    "refresh_count": "0",
    "status": "approved"
}

How to...

Get data for all agents

Request the data for all agents available on the system.

SwaggerHub:

  1. Select GET /agents.
  2. Click Try it out.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. Select (GET) Agents.
  2. Click Send.
  3. Check the response code and message.

Result example:

{
  "Error": null,
  "DataSet": {
    "agents": [
      {
        "Logid": "40001",
        "Agent": "Agent 1",
        "Status": "ACD",
        "Reason": null,
        "Direction": "IN",
        "Skill": "2",
        "Lvl": "11",
        "Time": "169",
        "VDN": "KPN 1",
        "Dep": "139"
      },
      {
        "Logid": "40002",
        "Agent": "Agent 2",
        "Status": "ACW",
        "Reason": null,
        "Direction": null,
        "Skill": "5",
        "Lvl": "15",
        "Time": "164",
        "VDN": "KPN 0",
        "Dep": "171"
      }
      ....
    ]
  }
}

Get individual agent data

Request the data for an individual agent using the Logid that you get in the response of the above request.

SwaggerHub:

  1. Select GET /agent/logid/{Logid}.
  2. Click Try it out.
  3. Edit the parameters by filling out the Logid parameter (for example: 40001).
  4. Click Execute.
  5. Check the response code and message.

Postman:

  1. Select (GET) Single Agent.
  2. Edit the value of the environment variable Logid (for example: 40001)
  3. Click Send.
  4. Check the response code and message.

Result example:

{
  "Error": null,
  "DataSet": {
    "agent": {
        "Logid": "40001",
        "Agent": "Agent 1",
        "Status": "ACD",
        "Reason": null,
        "Direction": "IN",
        "Skill": "2",
        "Lvl": "11",
        "Time": "169",
        "VDN": "KPN 1",
        "Dep": "139"
      }
}

Get data for all queues

Request the data for all queues available on the system.

SwaggerHub:

  1. Select GET /queues.
  2. Click Try it out.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. Select (GET) Queues.
  2. Click Send.
  3. Check the response code and message.

Result example:

{
  "Error": null,
  "DataSet": {
    "queues": [
      {
        "Name": "Naam skill 1",
        "Number": "1000",
        "InQueueCalls": "38",
        "OfferedCalls": "39",
        "AnsweredCalls": "67",
        "InServiceLevelCalls": "48",
        "TransferredCalls": "7",
        "HoldCalls": "61",
        "RONACalls": "49",
        "RingTime": "99",
        "Answertime": "87",
        "ACDtime": "132",
        "Abandontime": "67",
        "Flowout": "137",
        "LongestWaitingCall": "16",
        "Staffed": "28",
        "Available": "3",
        "InACD": "1",
        "InAUX": "16",
        "InACW": "3",
        "ServiceLevel": "10"
      },
      {
        "Name": "Naam skill 2",
        "Number": "1001",
        "InQueueCalls": "43",
        "OfferedCalls": "57",
        "AnsweredCalls": "65",
        "InServiceLevelCalls": "7",
        "TransferredCalls": "20",
        "HoldCalls": "13",
        "RONACalls": "56",
        "RingTime": "185",
        "Answertime": "43",
        "ACDtime": "19",
        "Abandontime": "140",
        "Flowout": "31",
        "LongestWaitingCall": "193",
        "Staffed": "33",
        "Available": "31",
        "InACD": "1",
        "InAUX": "0",
        "InACW": "0",
        "ServiceLevel": "54"
      },
      ...
    ]
  }
}     

Get single queue data

Request the data for a single queue using the Number that you get in the response of the above request.

SwaggerHub:

  1. Select GET /queue/number/{Number}.
  2. Click Try it out.
  3. Edit the parameters by filling out the Number parameter (for example: 1001).
  4. Click Execute.
  5. Check the response code and message.

Postman:

  1. Select (GET) Single Queue.
  2. Edit the value of the environment variable Number (for example: 1001)
  3. Click Send.
  4. Check the response code and message.

Result example:

{
  "Error": null,
  "DataSet": {
    "queue": {
        "Name": "Naam skill 1",
        "Number": "1000",
        "InQueueCalls": "38",
        "OfferedCalls": "39",
        "AnsweredCalls": "67",
        "InServiceLevelCalls": "48",
        "TransferredCalls": "7",
        "HoldCalls": "61",
        "RONACalls": "49",
        "RingTime": "99",
        "Answertime": "87",
        "ACDtime": "132",
        "Abandontime": "67",
        "Flowout": "137",
        "LongestWaitingCall": "16",
        "Staffed": "28",
        "Available": "3",
        "InACD": "1",
        "InAUX": "16",
        "InACW": "3",
        "ServiceLevel": "10"
      }
  }
}

Get data for all trunks

Request the data for all trunks available on the system.

SwaggerHub:

  1. Select GET /trunks.
  2. Click Try it out.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. Select (GET) Trunks.
  2. Click Send.
  3. Check the response code and message.

Result example:

{
  "Error": null,
  "DataSet": {
    "trunks": [
      {
        "Name": "Naam Trunk 1",
        "Number": "1000",
        "TotalPorts": "120",
        "PortsInUse": "25",
        "PortsIdle": "48",
        "Usage": "21",
        "Ports": [
          {
            "Number": "1",
            "State": "SEIZED"
          },
          {
            "Number": "2",
            "State": "SEIZED"
          },
          {
            "Number": "3",
            "State": "QUEUEDIN"
          },
          {
            "Number": "4",
            "State": "IDLE"
          },
          {
            "Number": "5",
            "State": "QUEUEDIN"
          },
          {
            "Number": "6",
            "State": "SEIZED"
          },
          {
            "Number": "7",
            "State": "IDLE"
          },
          {
            "Number": "8",
            "State": "FAULT"
          }
          ...
        ]
      }
    ]
  }
}         

Get single trunk data

Request the data for a single trunk using the Number that you get in the response of the above request.

SwaggerHub:

  1. Select GET /trunk/number/{Number}.
  2. Click Try it out.
  3. Edit the parameters by filling out the Number parameter (for example: 1001).
  4. Click Execute.
  5. Check the response code and message.

Postman:

  1. Select (GET) Single Trunk.
  2. Edit the value of the environment variable Number (for example: 1001)
  3. Click Send.
  4. Check the response code and message.

Result example:

{
  "Error": null,
  "DataSet": {
    "trunk": {
        "Name": "Naam Trunk 1",
        "Number": "1000",
        "TotalPorts": "120",
        "PortsInUse": "25",
        "PortsIdle": "48",
        "Usage": "21",
        "Ports": [
          {
            "Number": "1",
            "State": "SEIZED"
          },
          {
            "Number": "2",
            "State": "SEIZED"
          },
          {
            "Number": "3",
            "State": "QUEUEDIN"
          },
          {
            "Number": "4",
            "State": "IDLE"
          },
          {
            "Number": "5",
            "State": "QUEUEDIN"
          },
          {
            "Number": "6",
            "State": "SEIZED"
          },
          {
            "Number": "7",
            "State": "IDLE"
          },
          {
            "Number": "8",
            "State": "FAULT"
          }
          ...
        ]
      }
    }
}    

Return codes

Code   Description
200   Success
201   Created
202   Accepted
302   Found. Link in location header
400   Bad request
401   Unauthorized
403   Forbidden
404   Not found
405   Method not allowed
412   Precondition failed
429   Too many requests
500   Internal server error
502   Bad gateway
503   Service unavailable

API versions

Version   Description
1.0   Initial version