Survey Aggregates Query
Survey aggregates queries provide metrics which summarize quality management survey data for a specific queue, form, or user.
Metrics
Metric | Description | Preview |
nSurveyErrors | Number of surveys that ended in an error | |
nSurveyFullResponses | Number of full survey responses | ✔ |
nSurveyNpsDetractors | Number of NPS detractors | |
nSurveyNpsPromoters | Number of NPS promoters | |
nSurveyNpsResponses | Total number of NPS responses | |
nSurveyPartialResponses | Number of partial survey responses | ✔ |
nSurveyQuestionGroupResponses | Number of responses to a question group on a survey | |
nSurveyQuestionResponses | Number of responses to a question on a survey | |
nSurveyResponses | Number of surveys responses | |
nSurveysAbandoned | Number of abandoned surveys | |
nSurveysDeleted | Number of deleted surveys | |
nSurveysExpired | Number of expired surveys | |
nSurveysSent | Number of surveys sent | |
nSurveysStarted | Number of surveys sent | |
nVoiceSurveys | Number of voice surveys | ✔ |
nWebSurveys | Number of web surveys | ✔ |
oSurveyQuestionGroupScore | Score of a question group on the survey | |
oSurveyQuestionScore | Score of a question on the survey | |
oSurveyTotalScore | Total score of the survey |
Dimensions
Dimension | Type | Description | Preview |
conversationId | UUID | Conversation ID this survey is tied to. | |
divisionId | UUID | Identifier(s) of division(s) associated with this conversation. | |
externalContactId | UUID | The ID of the external contact that will be taking the survey. | |
mediaType | String | Media type(s) associated with the conversation. | |
queueId | UUID | The ID of the associated queue. | |
requestedLanguageId | UUID | Language ID(s) used to assign the conversation. | |
requestedRoutingSkillId | UUID | Skill ID(s) used to assign the conversation. | |
surveyAnswerId | UUID | The ID(s) of selectable answer(s) in a question on a survey. | |
surveyCreatedDate | DateTime | Creation datetime of the survey in ISO 8601 format. | |
surveyErrorReason | String | The cause of the survey error state. | |
surveyFormContextId | UUID | Unique identifier for the survey form, regardless of version. | |
surveyFormId | UUID | ID of the survey form used. | |
surveyFormName | String | Name of the survey form used. | |
surveyId | UUID | ID of the survey. | |
surveyPartialResponse | Boolean | Whether the survey was completed with any required questions unanswered. | ✔ |
surveyPreviousStatus | String | The previous status of the survey. | |
surveyPromoterScore | Integer | Score of the survey used with NPS. | |
surveyQuestionGroupId | UUID | The ID(s) of question group(s) on a survey. | |
surveyQuestionId | UUID | The ID(s) of question(s) on a survey. | |
surveyStatus | String | The status of the survey. | |
surveyType | Enum (Voice, Web) | The type of the survey. | ✔ |
teamId | UUID | Team ID(s) associated with the conversation. | |
userId | UUID | ID of the agent the survey was performed against. | |
wrapUpCode | String | Wrap-up code(s) associated with this survey's conversation. |
Metrics and dimensions that are marked as preview may not have been released yet and are subject to change at any time without notice.
The syntax of this query conforms to the general template for aggregate queries.
Note: You can also retrieve survey data in a conversation detail query.
Example query
The following is an example query.
{
"interval": "2021-11-10T00:00:00.000Z/2021-11-12T00:00:00.000Z",
"granularity": "PT30M",
"groupBy": [
"queueId",
"surveyFormId",
"userId"
],
"metrics": [
"oSurveyTotalScore",
"oSurveyQuestionScore",
"nSurveysSent",
"nSurveysStarted",
"nSurveysAbandoned",
"nSurveysExpired"
]
}