Quality Management API - Get Question Score

Hi everyone.

I have a question related to Quality Management API.

My client wants a report where for a given form it shows the average score of each question.

For this I consulted these two pages:

However there’s no information about any metric that retrieves the score of each question. The only scores that I found were Critical Score (oTotalCriticalScore) or Total Score (oTotalScore).

So my question is: Is there a way to get the score of each question by form in order to build this report?

Thank you in advance.

Best regards,
Ana Laia

Hi Ana,

oSurveyQuestionScore is the metric it sounds like you're looking for.

Please let us know if you have any further questions!

--Becky

Hi Becky,

Thank you for your answer, but still I have a question.

Can oSurveyQuestionScore metric be use with Evaluation forms, since it’s a Survey metric?

Also, when I tried to use this metric with POST/api/v2/analytics/evaluations/aggregates/query I got:

{
"status": 400,
"code": "invalid.value",
"message": "Value [oSurveyQuestionScore] is not valid for field type [EvaluationAggregateMetric]. Allowable values are: nEvaluations, oTotalCriticalScore, oTotalScore"
}

Best regards,
Ana Laia

Hi Ana,

I am so sorry! I misread your original question.

You can query evaluations by calling https://developer.mypurecloud.com/api/rest/v2/quality/#get-api-v2-quality-evaluations-query, which will return the score of the evaluation questions in the response.

Please let me know if this endpoint provides what you're requesting!

--Becky

1 Like

Hi Becky,

Thank you for your answer. Now I’m able to get the score for each individual question. However, I still have a small problem.

My client wants this report by Evaluation Form Id and since /api/v2/quality/evaluations/query only returns evaluations by conversationId, evaluatorUserId, or agentUserId I need to know who were the evaluators that used the evaluation form or who were the agents evaluated by the evaluation form, in order to use them on /api/v2/quality/evaluations/query and get the evaluations with the requested evaluation form.

So my questions are:

Is there another way to get the question score by evaluation form id?

Or, is it possible to get the evaluators who used the evaluation form or the agents who were evaluated by the evaluation form in order to use them on /api/v2/quality/evaluations/query?

The best I got was get the number of evaluations used by evaluation form Id (nEvaluations) with /api/v2/analytics/evaluations/aggregates/query.

{
"interval": " YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss / YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss ",
"formId": ["FormId"]
}

And get

      "metrics": [
        {
          "metric": "nEvaluations",
          "stats": {
            "count": 15
          }
        },

Best regards,
Ana Laia

There are a few approaches to getting evaluation data filtered by the evaluation form ID depending on exactly which data points you need:

Use an EvaluationDetailQueryFilter specifying the formId dimension with POST /api/v2/analytics/conversations/details/query. This will return a list of conversations that have an evaluation using that given form. You will then need to use GET /api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId} to retrieve details about the evaluation as it will not be fully expanded in the analytics result.

GET /api/v2/quality/evaluations/query will return a list of evaluations, but you can't filter by the formId like you can with analytics APIs. This means your app will have to iterate over the results to figure out which ones are using the desired formId. Depending on the ratio of signal to noise, and size of your dataset, and what specific data points you need, this approach might be efficient than the analytics conversation detail filter approach because you'll get the evaluation data without having to request each evaluation individually.

POST /api/v2/analytics/evaluations/aggregates/query with a filter on the desired formId will return aggregate stats for evaluations using the given form.

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.