Skip to content

start_contact_evaluation async

start_contact_evaluation(
    instance_id: InstanceId,
    contact_id: ContactId,
    evaluation_form_id: ResourceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    auto_evaluation_configuration: Optional[AutoEvaluationConfiguration] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagMap] = None,
) -> StartContactEvaluationResponse

Starts an empty evaluation in the specified Connect Customer instance, using the given evaluation form for the particular contact. The evaluation form version used for the contact evaluation corresponds to the currently activated version. If no version is activated for the evaluation form, the contact evaluation cannot be started.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • contact_id (ContactId) –

    The identifier of the contact in this instance of Connect Customer.

  • evaluation_form_id (ResourceId) –

    The unique identifier for the evaluation form.

  • auto_evaluation_configuration (Optional[AutoEvaluationConfiguration], default: None ) –

    Whether automated evaluations are enabled.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

  • tags (Optional[TagMap], default: None ) –

    The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def start_contact_evaluation(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    contact_id: "capo_connect.types.contact_id.ContactId",
    evaluation_form_id: "capo_connect.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    auto_evaluation_configuration: Optional[
        "capo_connect.types.auto_evaluation_configuration.AutoEvaluationConfiguration"
    ] = None,
    client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
    tags: Optional["capo_connect.types.tag_map.TagMap"] = None,
) -> "capo_connect.types.start_contact_evaluation_response.StartContactEvaluationResponse":
    """<p>Starts an empty evaluation in the specified Connect Customer instance, using the given evaluation form for the particular contact. The evaluation form version used for the contact evaluation corresponds to the currently activated version. If no version is activated for the evaluation form, the contact evaluation cannot be started. </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>
        contact_id: <p>The identifier of the contact in this instance of Connect Customer. </p>
        evaluation_form_id: <p>The unique identifier for the evaluation form.</p>
        auto_evaluation_configuration: <p>Whether automated evaluations are enabled.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
        tags: <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.start_contact_evaluation_request.StartContactEvaluationRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.start_contact_evaluation_response.StartContactEvaluationResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.start_contact_evaluation

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.start_contact_evaluation.async_start_contact_evaluation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartContactEvaluation")
    )
    input_: capo_connect.types.start_contact_evaluation_request.StartContactEvaluationRequest = {
        "instance_id": instance_id,
        "contact_id": contact_id,
        "evaluation_form_id": evaluation_form_id,
    }
    if auto_evaluation_configuration is not None:
        input_["auto_evaluation_configuration"] = auto_evaluation_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output