I'm trying to create evaluation of an interaction using Python SDK by following this documentation reference:-
https://developer.genesys.cloud/devapps/sdk/docexplorer/purecloudpython/EvaluationCreateBody
My request body is in this following format:-
{
"evaluation_form": {
"id": ""
},
"evaluator": {
"id": ""
},
"agent": {
"id": ""
},
"answers": {
"question_group_scores": [
{
"question_group_id": "",
"question_group_scores": [
{
"question_id": "",
"answer_id": "",
"comments": ""
},
{
"question_id": "",
"answer_id": "",
"comments": ""
}
]
}
]
},
"status": "INPROGRESS"
}
But it is returning this error in response:-
PureCloudPlatformClientV2.rest.ApiException: (400)
Reason: Bad Request
HTTP response body:
{
"message":"Agent user is required to create an evaluation",
"code":"qm.evaluation.create.error.no.agent",
"status":400,
"contextId":"98ec39a6-f573-47c9-adc5-3fb56140a799",
"details":[],
"errors":[]
}
I already tried various possible ways(agent_id:"", agentId:"", agent.id:"", agent_id:{"id":""}) to send agent id in the request body but it is returning only this error in response.
Also I tried using https://api.usw2.pure.cloud/api/v2/quality/conversations/{conversationId}/evaluations in postman and it is working. But for Python SDK it is throwing Agent User required error.