Legacy Dev Forum Posts

 View Only

Sign Up

New evaluation for interaction using python SDK

  • 1.  New evaluation for interaction using python SDK

    Posted 06-05-2025 18:09

    Andy_Pa | 2024-03-14 12:13:30 UTC | #1

    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(agentid:"", agentId:"", agent.id:"", agentid:{"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.


    system | 2024-04-14 12:05:13 UTC | #2

    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: 25195