UpdateEvaluationForm
Updates details about a specific evaluation form version in the specified Amazon Connect instance. Question and section identifiers cannot be duplicated within the same evaluation form.
This operation does not support partial updates. Instead it does a full update of evaluation form content.
Request Syntax
PUT /evaluation-forms/InstanceId/EvaluationFormId HTTP/1.1
Content-type: application/json
{
"AsDraft": boolean,
"AutoEvaluationConfiguration": {
"Enabled": boolean
},
"ClientToken": "string",
"CreateNewVersion": boolean,
"Description": "string",
"EvaluationFormVersion": number,
"Items": [
{ ... }
],
"LanguageConfiguration": {
"FormLanguage": "string"
},
"ScoringStrategy": {
"Mode": "string",
"Status": "string"
},
"TargetConfiguration": {
"ContactInteractionType": "string"
},
"Title": "string"
}
URI Request Parameters
The request uses the following URI parameters.
- EvaluationFormId
-
The unique identifier for the evaluation form.
Length Constraints: Minimum length of 1. Maximum length of 500.
Required: Yes
- 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.
- AsDraft
-
A boolean flag indicating whether to update evaluation form to draft state.
Type: Boolean
Required: No
- AutoEvaluationConfiguration
-
Whether automated evaluations are enabled.
Type: EvaluationFormAutoEvaluationConfiguration object
Required: No
- 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
- CreateNewVersion
-
A flag indicating whether the operation must create a new version.
Type: Boolean
Required: No
- Description
-
The description of the evaluation form.
Type: String
Required: No
- EvaluationFormVersion
-
A version of the evaluation form to update.
Type: Integer
Required: Yes
- 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
Required: Yes
- LanguageConfiguration
-
Configuration for language settings of the evaluation form.
Type: EvaluationFormLanguageConfiguration object
Required: No
- ScoringStrategy
-
A scoring strategy of the evaluation form.
Type: EvaluationFormScoringStrategy object
Required: No
- TargetConfiguration
-
Configuration that specifies the target for the evaluation form.
Type: EvaluationFormTargetConfiguration object
Required: No
- Title
-
A title of the evaluation form.
Type: String
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"EvaluationFormArn": "string",
"EvaluationFormId": "string",
"EvaluationFormVersion": number
}
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 contact evaluation resource.
Type: String
- EvaluationFormId
-
The unique identifier for the evaluation form.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 500.
- EvaluationFormVersion
-
The version of the updated evaluation form resource.
Type: Integer
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.
- 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 updates version 2 of an evaluation form. This results in another, new version.
Sample Request
{
"InstanceId": "[instance_id]",
"EvaluationFormId": "[evaluation_form_id]",
"EvaluationFormVersion": 2,
"CreateNewVersion": true,
"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-11",
"RefId": "question-1-111",
"Instructions": "question-instructions",
"NotApplicableEnabled": false,
"QuestionType": "TEXT"
}
},
{
"Question": {
"Title": "question-title-12",
"RefId": "question-1-222",
"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-21",
"RefId": "question-2-1",
"QuestionType": "TEXT",
"NotApplicableEnabled": true
}
},
{
"Question": {
"Title": "question-title-2-2",
"RefId": "question-2-222",
"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]",
"EvaluationFormVersion": 2
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: