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

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

Authentication

To authenticate you'll need to request an access token. Use your API Store app's credentials (Consumer Key and Consumer Secret) to make an authentication request. The authorization service returns a JSON message that contains the access_token field.

Use one of the following 3 options:

cURL

Execute below cURL command to receive an access token. Replace APP_CONSUMER_KEY and APP_CONSUMER_SECRET with your app's credentials.

curl -X POST \
 'https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials' \
 -H 'content-type: application/x-www-form-urlencoded' \
 -d 'client_id=APP_CONSUMER_KEY&client_secret=APP_CONSUMER_SECRET'

If you are using cURL for Windows, please use the command below instead.

curl -X POST "https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials" -H "content-type: application/x-www-form-urlencoded" -d "client_id=APP_CONSUMER_KEY&client_secret=APP_CONSUMER_SECRET"

The authentication 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": "6e38edxxxxxxxxxxxxxxxx4065d79c",
    "scope": "",
    "expires_in": "3599",
    "refresh_count": "0",
    "status": "approved"
}

SwaggerHub

  1. Click on the Authorize button on the top right.
  2. In the form, fill in client_id and client_secret, using your app's credentials.
  3. Click Authorize.

Postman

When using Postman, you will have to import the Swagger file into a Postman collection as follows:

  1. Open the API reference on SwaggerHub.
  2. On the top right, click Export, click Download API and click 'YAML Unresolved'.
  3. In Postman from the menu click File and click Import... Choose the YAML file you downloaded in the previous step. A new collection will be added.
  4. Select Get Access Token from the collection.
  5. Make sure the right environment is selected, corresponding to the API.
  6. Edit the environment variables client_id and client_secret, using your app's credentials.
  7. Check the response code and message.
  8. Press the Send button to get an access token.

Note: Request variables are no longer linked to an environment, but to the collection.

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