Skip to content

submit_contact_evaluation

submit_contact_evaluation(
    instance_id: InstanceId,
    evaluation_id: ResourceId,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    answers: Optional[EvaluationAnswersInputMap] = None,
    notes: Optional[EvaluationNotesMap] = None,
    submitted_by: Optional[EvaluatorUserUnion] = None,
) -> SubmitContactEvaluationResponse

Submits a contact evaluation in the specified Connect Customer instance. Answers included in the request are merged with existing answers for the given evaluation. If no answers or notes are passed, the evaluation is submitted with the existing answers and notes. You can delete an answer or note by passing an empty object ({}) to the question identifier.

If a contact evaluation is already in submitted state, this operation will trigger a resubmission.

Parameters:

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def submit_contact_evaluation(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    evaluation_id: "capo_connect.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    answers: Optional[
        "capo_connect.types.evaluation_answers_input_map.EvaluationAnswersInputMap"
    ] = None,
    notes: Optional[
        "capo_connect.types.evaluation_notes_map.EvaluationNotesMap"
    ] = None,
    submitted_by: Optional[
        "capo_connect.types.evaluator_user_union.EvaluatorUserUnion"
    ] = None,
) -> "capo_connect.types.submit_contact_evaluation_response.SubmitContactEvaluationResponse":
    """<p>Submits a contact evaluation in the specified Connect Customer instance. Answers included in the request are merged with existing answers for the given evaluation. If no answers or notes are passed, the evaluation is submitted with the existing answers and notes. You can delete an answer or note by passing an empty object (<code>{}</code>) to the question identifier. </p> <p>If a contact evaluation is already in submitted state, this operation will trigger a resubmission.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        evaluation_id: <p>A unique identifier for the contact evaluation.</p>
        answers: <p>A map of question identifiers to answer value.</p>
        notes: <p>A map of question identifiers to note value.</p>
        submitted_by: <p>The ID of the user who submitted the contact evaluation.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.resource_conflict_exception.ResourceConflictException: <p>A resource already has that name.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.submit_contact_evaluation_request.SubmitContactEvaluationRequest]",
    ) -> OperationResponse[
        "capo_connect.types.submit_contact_evaluation_response.SubmitContactEvaluationResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.submit_contact_evaluation

        output, http_response = (
            capo_connect._operations.amazon_connect_service.submit_contact_evaluation.submit_contact_evaluation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SubmitContactEvaluation")
    )
    input_: capo_connect.types.submit_contact_evaluation_request.SubmitContactEvaluationRequest = {
        "instance_id": instance_id,
        "evaluation_id": evaluation_id,
    }
    if answers is not None:
        input_["answers"] = answers
    if notes is not None:
        input_["notes"] = notes
    if submitted_by is not None:
        input_["submitted_by"] = submitted_by

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output