Skip to content

Contact center integration guide

Integrating nps.today into your contact center gives agents real-time data about their performance while they answer calls. This guide will answer as many questions as possible and guide you through a flow on how to implement in any contact center solution. It is important to familiarize with the prerequisites before starting to integrate, since there are some limitations.

Prerequisites

In order to integrate the contact center to our solution, it is important that the system is capable of:

  • Sending HTTP requests (GET and POST) with authorization header.
  • If implementing p-gap, it is also important that the system can react on the HTTP response, and display a dialog for the employee to answer.
  • Have an API key for your nps.today account. See Create an API key.

For all endpoints, see the API reference. For the authentication header and rate limits, see Developers.

Flow

The following flow is an example of what to implement in your solution. Implement what you need for your scope. Each step links to the endpoint in the API reference.

Agent logs in to the contact center

When the agent has logged in, first fetch the employee's data. This includes the agent's rating and can be queried for a selected number of days.

Endpoint: GET /employees/analytics

Next, fetch the employee's responses. These include the name of the person who rated, the comment and the rating.

Endpoint: GET /responses with the employee's email address in the employee-email query parameter

It is suggested to query these results in a given time interval to keep the agent updated. It is also possible to query after the agent finished a call, there are many possibilities, but the most important thing is to keep updating the agent with newest results.

Important: fetch the IVR map. It includes the queue ID and the campaign linked to each queue.

Endpoint: GET /ivr/maps

Save at least the agent's mail or ID. It is used to link the employee, for example when an employee changes team. Other fields to consider can be found in the request.

IVR map

Customer calls agent

When the customer calls the agent (probably through a queue), the responses that the customer has given can be fetched using the phone number.

Endpoint: POST /responses/phone

When the call has ended, send the survey: match the queue with the campaign using the IVR map, and add the respondent to that campaign. A phone number is enough, but the more data you send, the more personalized the survey can be.

Endpoint: POST /campaigns/{campaignId}/respondent

Agent calls customer (callback/callout)

Important: when an agent calls the customer, use the same principle as when the customer calls the agent. Note that the call can go to voicemail. If the contact center system detects this, do not send the survey. If it does not, a workaround is to only send a survey if the call lasts more than 1 minute. Adjust the duration to your needs, but most voicemails activate after at most 30 seconds.

Agent is in a P-GAP period

If you use P-GAP, check the HTTP response when you add a respondent. If the employee is in a P-GAP period, the response contains "pgap": true. The respondent has not been added, and therefore the survey has not been sent. To send the survey, add the agentRating field with the agent's rating to the request. The picture below shows what an agent P-GAP estimation UI could look like. See P-GAP (perception gap).

Example agent UI asking the agent to estimate the customer's rating (P-GAP)

Use POST /campaigns/{campaignId}/respondent with checkPgap=true to add a respondent with an agent rating. See P-GAP (perception gap) for the full flow.

IVR with P-Gap

Verify it worked

  1. Make a test call through a queue that is linked to a campaign in the IVR map.
  2. Check the result in app.nps.today, as described in Test an integration.