

# 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

{
   "AsDraft": boolean,
   "AutoEvaluationConfiguration": { 
      "Enabled": boolean
   },
   "ClientToken": "string",
   "Description": "string",
   "Items": [ 
      { ... }
   ],
   "LanguageConfiguration": { 
      "FormLanguage": "string"
   },
   "ReviewConfiguration": { 
      "EligibilityDays": number,
      "ReviewNotificationRecipients": [ 
         { 
            "Type": "string",
            "Value": { 
               "UserId": "string"
            }
         }
      ]
   },
   "ScoringStrategy": { 
      "Mode": "string",
      "Status": "string"
   },
   "Tags": { 
      "string" : "string" 
   },
   "TargetConfiguration": { 
      "ContactInteractionType": "string"
   },
   "Title": "string"
}
```

## URI Request Parameters


The request uses the following URI parameters.

 ** [InstanceId](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-uri-InstanceId"></a>
The identifier of the Amazon Connect instance. You can [find the instance ID](https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) 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.

 ** [AsDraft](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-AsDraft"></a>
A boolean flag indicating whether to create evaluation form in draft state.  
Type: Boolean  
Required: No

 ** [AutoEvaluationConfiguration](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-AutoEvaluationConfiguration"></a>
Configuration information about automated evaluations.  
Type: [EvaluationFormAutoEvaluationConfiguration](API_EvaluationFormAutoEvaluationConfiguration.md) object  
Required: No

 ** [ClientToken](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-ClientToken"></a>
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](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).  
Type: String  
Length Constraints: Maximum length of 500.  
Required: No

 ** [Description](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-Description"></a>
The description of the evaluation form.  
Type: String  
Required: No

 ** [Items](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-Items"></a>
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](API_EvaluationFormItem.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 100 items.  
Required: Yes

 ** [LanguageConfiguration](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-LanguageConfiguration"></a>
Configuration for language settings of the evaluation form.  
Type: [EvaluationFormLanguageConfiguration](API_EvaluationFormLanguageConfiguration.md) object  
Required: No

 ** [ReviewConfiguration](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-ReviewConfiguration"></a>
Configuration information about evaluation reviews.  
Type: [EvaluationReviewConfiguration](API_EvaluationReviewConfiguration.md) object  
Required: No

 ** [ScoringStrategy](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-ScoringStrategy"></a>
A scoring strategy of the evaluation form.  
Type: [EvaluationFormScoringStrategy](API_EvaluationFormScoringStrategy.md) object  
Required: No

 ** [Tags](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-Tags"></a>
The tags used to organize, track, or control access for this resource. For example, \$1 "Tags": \$1"key1":"value1", "key2":"value2"\$1 \$1.  
Type: String to string map  
Map Entries: Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `^(?!aws:)[\p{L}\p{Z}\p{N}_.:/=+\-@]*$`   
Value Length Constraints: Maximum length of 256.  
Required: No

 ** [TargetConfiguration](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-TargetConfiguration"></a>
Configuration that specifies the target for the evaluation form.  
Type: [EvaluationFormTargetConfiguration](API_EvaluationFormTargetConfiguration.md) object  
Required: No

 ** [Title](#API_CreateEvaluationForm_RequestSyntax) **   <a name="connect-CreateEvaluationForm-request-Title"></a>
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](#API_CreateEvaluationForm_ResponseSyntax) **   <a name="connect-CreateEvaluationForm-response-EvaluationFormArn"></a>
The Amazon Resource Name (ARN) for the evaluation form resource.  
Type: String

 ** [EvaluationFormId](#API_CreateEvaluationForm_ResponseSyntax) **   <a name="connect-CreateEvaluationForm-response-EvaluationFormId"></a>
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](CommonErrors.md).

 ** InternalServiceException **   
Request processing failed because of an error or failure with the service.    
 ** Message **   
The message.
HTTP Status Code: 500

 ** InvalidParameterException **   
One or more of the specified parameters are not valid.    
 ** Message **   
The message about the parameters.
HTTP Status Code: 400

 ** ResourceConflictException **   
A resource already has that name.  
HTTP Status Code: 409

 ** ResourceNotFoundException **   
The specified resource was not found.    
 ** Message **   
The message about the resource.
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
The service quota has been exceeded.    
 ** Reason **   
The reason for the exception.
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:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/connect-2017-08-08/CreateEvaluationForm) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/connect-2017-08-08/CreateEvaluationForm) 