createEvaluationForm method
- required String instanceId,
- required List<
EvaluationFormItem> items, - required String title,
- bool? asDraft,
- EvaluationFormAutoEvaluationConfiguration? autoEvaluationConfiguration,
- String? clientToken,
- String? description,
- EvaluationFormLanguageConfiguration? languageConfiguration,
- EvaluationReviewConfiguration? reviewConfiguration,
- EvaluationFormScoringStrategy? scoringStrategy,
- Map<
String, String> ? tags, - EvaluationFormTargetConfiguration? targetConfiguration,
Creates an evaluation form in the specified Connect Customer instance. The form can be used to define questions related to agent performance, and create sections to organize such questions. Question and section identifiers cannot be duplicated within the same evaluation form.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw ResourceConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
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 items :
Items that are part of the evaluation form. The total number of sections
and questions must not exceed 100 each. Questions must be contained in a
section.
Parameter title :
A title of the evaluation form.
Parameter asDraft :
A boolean flag indicating whether to create evaluation form in draft
state.
Parameter autoEvaluationConfiguration :
Configuration information about automated evaluations.
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 description :
The description of the evaluation form.
Parameter languageConfiguration :
Configuration for language settings of the evaluation form.
Parameter reviewConfiguration :
Configuration information about evaluation reviews.
Parameter scoringStrategy :
A scoring strategy of the evaluation form.
Parameter tags :
The tags used to organize, track, or control access for this resource. For
example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Parameter targetConfiguration :
Configuration that specifies the target for the evaluation form.
Implementation
Future<CreateEvaluationFormResponse> createEvaluationForm({
required String instanceId,
required List<EvaluationFormItem> items,
required String title,
bool? asDraft,
EvaluationFormAutoEvaluationConfiguration? autoEvaluationConfiguration,
String? clientToken,
String? description,
EvaluationFormLanguageConfiguration? languageConfiguration,
EvaluationReviewConfiguration? reviewConfiguration,
EvaluationFormScoringStrategy? scoringStrategy,
Map<String, String>? tags,
EvaluationFormTargetConfiguration? targetConfiguration,
}) async {
final $payload = <String, dynamic>{
'Items': items,
'Title': title,
if (asDraft != null) 'AsDraft': asDraft,
if (autoEvaluationConfiguration != null)
'AutoEvaluationConfiguration': autoEvaluationConfiguration,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'Description': description,
if (languageConfiguration != null)
'LanguageConfiguration': languageConfiguration,
if (reviewConfiguration != null)
'ReviewConfiguration': reviewConfiguration,
if (scoringStrategy != null) 'ScoringStrategy': scoringStrategy,
if (tags != null) 'Tags': tags,
if (targetConfiguration != null)
'TargetConfiguration': targetConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/evaluation-forms/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return CreateEvaluationFormResponse.fromJson(response);
}