JET | 2021-08-13 17:19:17 UTC | #1
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:
- Where do we pass the evaluation name, preferably as a list?
- 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!
anon11147534 | 2021-08-17 13:42:20 UTC | #2
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:
- 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.
- Expand the evaluationIds you got back from the analytics query via the GET /api/v2/quality/conversations/{conversationId}/evaluations/{evaluationId} endpoint
JET | 2021-08-18 13:26:02 UTC | #3
Thank you, Ronan. This is a good start. I appreciate it!
JET | 2021-08-20 15:15:41 UTC | #4
Hi @anon11147534 : Just a follow up. Am I posting to the right endpoint here? I am querying conversationaggregationquery() and posting postanalyticsconversationsdetailsquery. 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
queryresult = analyticsapi.postanalyticsconversationsdetailsquery(SLquery)
anon11147534 | 2021-08-24 11:16:05 UTC | #5
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 postanalyticsconversationsdetailsquery for more information.
JET | 2021-08-27 02:22:56 UTC | #6
Thank you, Ronan.
system | 2021-09-27 02:23:10 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11740