P-GAP (perception gap)
P-GAP is short for perception gap and is a method that measures the emotional distance between two people in a particular touchpoint. P-GAP calculates the difference between the customer’s and the employee’s experience in the situation and generates a P-GAP number. The larger the number the larger the gap between the experience of the employee and the customer. In practice, the employee will be prompted with a question when ending a customer interaction. The question is answered on a scale between 0 and 10.
A P-GAP question could sound like this:
"Based on your recent interaction on this case, how satisfied do you think the customer is?"
After the agent rating is set by the employee a survey is sent to the customer.
Below is an example of an agent who is prompted with a survey inside of a third-party system:

The technicalities behind P-GAP
We will now describe what a P-GAP setup could look like.
Below is a flow that shows how a survey with an agent rating can look like:

Set up a P-GAP period
P-GAP periods (training sessions) are set up in app.nps.today. The employee must exist in nps.today first. This happens automatically the first time an employee ends an interaction that triggers a survey. See Run a P-GAP training session.
To manage periods from your own system, use the pgapperiod endpoints in the Employee section of the API reference.
Asking nps.today if the employee is in P-GAP
When the employee is ending an interaction with the customer, the system calls the API at nps.today to ask if the employee is in a P-GAP period.
Trying to send a survey
To send a survey, call POST /campaigns/{campaignId}/respondent with checkPgap=true. If checkPgap is not true, the employee is not prompted for a P-GAP rating.
https://api.nps.today/campaigns/{campaignId}/respondent?checkPgap=true
To add several respondents in one call, use POST /campaigns/{campaignId}/respondents with an array body instead. To only check whether an employee is in a P-GAP period, without adding a respondent, use GET /employees/isinpgap with the campaign ID and the employee's ID, email or external ID. It returns true or false.
The system tries to send a survey and gets a status response from the nps.today API looking like this:
{
"status":0,
"message":"",
"pgap":true
}
0 = Added to a campaign
pgap:
true = employee is in a P-GAP period
Example:
If pgap is true, the request to add the respondent is ignored until the employee has given an agent rating. We recommend that you only ask for an agent rating if status is 0.
Prompting the employee with an agent rating
Now that the system has verified that the employee is in a P-GAP period, the employee is prompted to give an agent rating.
When the employee gives a rating, call the same endpoint again:
https://api.nps.today/campaigns/{campaignId}/respondent?checkPgap=true
Now the agent rating is added to the payload:
{
"respondent":{
"firstName":"john",
"lastName":"doe",
"phoneNumber":"+4512345678"
},
"employee":{
"email":"[email protected]"
},
"agentRating":5
}
Now that the rating is added to the payload the survey is sent.
Sending the customer survey
When the agent rating is given by the employee a survey to the customer is triggered. See Trigger surveys.