CreateEvaluationForm - Amazon Connect

CreateEvaluationForm

Creates an evaluation form in the specified Amazon Connect 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.

Request Syntax

PUT /evaluation-forms/InstanceId HTTP/1.1 Content-type: application/json { "ClientToken": "string", "Description": "string", "Items": [ { ... } ], "ScoringStrategy": { "Mode": "string", "Status": "string" }, "Title": "string" }

URI Request Parameters

The request uses the following URI parameters.

InstanceId

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

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes

Request Body

The request accepts the following data in JSON format.

ClientToken

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

Type: String

Length Constraints: Maximum length of 500.

Required: No

Description

The description of the evaluation form.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Required: No

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.

Type: Array of EvaluationFormItem objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: Yes

ScoringStrategy

A scoring strategy of the evaluation form.

Type: EvaluationFormScoringStrategy object

Required: No

Title

A title of the evaluation form.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "EvaluationFormArn": "string", "EvaluationFormId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

EvaluationFormArn

The Amazon Resource Name (ARN) for the evaluation form resource.

Type: String

EvaluationFormId

The unique identifier for the evaluation form.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceException

Request processing failed because of an error or failure with the service.

HTTP Status Code: 500

InvalidParameterException

One or more of the specified parameters are not valid.

HTTP Status Code: 400

ResourceConflictException

A resource already has that name.

HTTP Status Code: 409

ResourceNotFoundException

The specified resource was not found.

HTTP Status Code: 404

ServiceQuotaExceededException

The service quota has been exceeded.

HTTP Status Code: 402

ThrottlingException

The throttling limit has been exceeded.

HTTP Status Code: 429

Examples

Example

The following example creates an evaluation form with two sections and two questions for each section.

Sample Request

{ "InstanceId": "[instance_id]", "Title": "form-title", "Description": "form-description", "ScoringStrategy": { "Mode": "SECTION_ONLY", "Status": "ENABLED" }, "Items": [ { "Section": { "Title": "section-title-1", "RefId": "section-1", "Instructions": "section-instruction-1", "Weight": 50, "Items": [ { "Question": { "Title": "question-title-1-1", "RefId": "question-1-1", "Instructions": "question-instructions", "NotApplicableEnabled": false, "QuestionType": "TEXT" } }, { "Question": { "Title": "question-title-1-2", "RefId": "question-1-2", "QuestionType": "SINGLESELECT", "NotApplicableEnabled": false, "QuestionTypeProperties": { "SingleSelect": { "Options": [ { "RefId": "option-1-2-1", "Text": "first-option", "Score": 1, "AutomaticFail": true }, { "RefId": "option-1-2-2", "Text": "second-option", "Score": 1, "AutomaticFail": false }, { "RefId": "option-1-2-3", "Text": "third-option", "Score": 1, "AutomaticFail": true } ], "DisplayAs": "DROPDOWN", "Automation": { "Options": [ { "RuleCategory": { "Category": "CATEGORY_LABEL", "Condition": "PRESENT", "OptionRefId": "option-1-2-2" } } ], "DefaultOptionRefId": "option-1-2-1" } } } } } ] } }, { "Section": { "Title": "section-title-2", "RefId": "section-2", "Instructions": "section-instruction-2", "Weight":50, "Items": [ { "Question": { "Title": "question-title-2-1", "RefId": "question-2-1", "QuestionType": "TEXT", "NotApplicableEnabled": true } }, { "Question": { "Title": "question-title-2-2", "RefId": "question-2-2", "QuestionType": "NUMERIC", "QuestionTypeProperties": { "Numeric": { "MinValue": 0, "MaxValue": 28800, "Options": [ { "MinValue": 0, "MaxValue": 28800, "Score": 1, "AutomaticFail": false } ], "Automation": { "PropertyValue": { "Label": "AGENT_INTERACTION_DURATION" } } } } } } ] } } ] }

Sample Response

{ "EvaluationFormId": "[evaluation_form_id]", "EvaluationFormArn": "arn:aws:connect:[aws_region_code]:[account_id]:instance/[instance_id]/evaluation-form/[evaluation_form_id]" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: