Get all evaluations completed for the day

Hello: Good afternoon! Successfully pulling in the evaluation aggregates, but we're looking at pulling all evaluations completed for the day along with the line item questions and scores. I was looking at POST /api/v2/quality/evaluations/scoring, but I am not that familiar with the usage of the json request. If this endpoint is best to get all evaluations for the day, question / request then:

  1. Where do we pass the evaluation name, preferably as a list?
  2. Are we able to pass an interval date on this endpoint? I am seeing just the modified date.

Thank you, and I appreciate your help!

1 Like

Hi,

POST /api/v2/quality/evaluations/scoring is not used for getting lists of evaluations.

The following steps are necessary for getting a list of completed evaluations for a specific date range:

  1. Get the evaluationIds from the POST /api/v2/analytics/conversations/details/query endpoint. The analytics query builder is useful for generating analytics requests.
    The response will give you the following fields for the evaluations:
    evaluationId, evaluatorId, userId, eventTime, queueId, formId, contextId, formName, calibrationId, oTotalScore, and oTotalCriticalScore.

If the conversation details record doesn't contain the evaluation data you were looking for, continue to step 2.

  1. Expand the evaluationIds you got back from the analytics query via the GET /api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId} endpoint

Thank you, Ronan. This is a good start. I appreciate it!

Hi @anon11147534 : Just a follow up. Am I posting to the right endpoint here? I am querying conversationaggregationquery() and posting post_analytics_conversations_details_query. I am unsure if the structure is correct.

I have the test query below:

query = PureCloudPlatformClientV2.ConversationAggregationQuery()
interval = "2021-08-17T00:00:00.000Z/2021-08-18T00:00:00.000Z"
query = {
"interval": interval,
"order": "asc",
"orderBy": "conversationStart",
"evaluationFilters": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "evaluationId",
"operator": "exists"
}
]
}
]
}

Execute analytics query

query_result = analytics_api.post_analytics_conversations_details_query(SLquery)

Nearly there. The request bodies have to be generated using their corresponding python models.

The request format is like so:

body = PureCloudPlatformClientV2.ConversationQuery()
body.interval = "2021-08-17T00:00:00.000Z/2021-08-18T00:00:00.000Z"
body.order = "asc"
body.order_by = "conversationStart"

evaluationFilter = PureCloudPlatformClientV2.EvaluationDetailQueryFilter()
evaluationFilter.type = "or"

evaluationFilterPredicate = PureCloudPlatformClientV2.EvaluationDetailQueryPredicate()
evaluationFilterPredicate.type = "dimension"
evaluationFilterPredicate.dimension = "evaluationId"
evaluationFilterPredicate.operator = "exists"

evaluationFilter.predicates = []
evaluationFilter.predicates.append(evaluationFilterPredicate)

body.evaluation_filters = []
body.evaluation_filters.append(evaluationFilter)

And to call the API:

result = analyticsApi.post_analytics_conversations_details_query(body)

See post_analytics_conversations_details_query for more information.

Thank you, Ronan.

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