startContactEvaluation method
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.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw ResourceConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
Parameter contactId :
The identifier of the contact in this instance of Connect Customer.
Parameter evaluationFormId :
The unique identifier for the evaluation form.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter autoEvaluationConfiguration :
Whether automated evaluations are enabled.
Parameter clientToken :
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.
Parameter tags :
The tags used to organize, track, or control access for this resource. For
example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Implementation
Future<StartContactEvaluationResponse> startContactEvaluation({
required String contactId,
required String evaluationFormId,
required String instanceId,
AutoEvaluationConfiguration? autoEvaluationConfiguration,
String? clientToken,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'ContactId': contactId,
'EvaluationFormId': evaluationFormId,
if (autoEvaluationConfiguration != null)
'AutoEvaluationConfiguration': autoEvaluationConfiguration,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/contact-evaluations/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return StartContactEvaluationResponse.fromJson(response);
}