- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateEvaluationFormCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ConnectClient, UpdateEvaluationFormCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, UpdateEvaluationFormCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // UpdateEvaluationFormRequest
InstanceId: "STRING_VALUE", // required
EvaluationFormId: "STRING_VALUE", // required
EvaluationFormVersion: Number("int"), // required
CreateNewVersion: true || false,
Title: "STRING_VALUE", // required
Description: "STRING_VALUE",
Items: [ // EvaluationFormItemsList // required
{ // EvaluationFormItem Union: only one key present
Section: { // EvaluationFormSection
Title: "STRING_VALUE", // required
RefId: "STRING_VALUE", // required
Instructions: "STRING_VALUE",
Items: [ // required
{// Union: only one key present
Section: {
Title: "STRING_VALUE", // required
RefId: "STRING_VALUE", // required
Instructions: "STRING_VALUE",
Items: "<EvaluationFormItemsList>", // required
Weight: Number("double"),
},
Question: { // EvaluationFormQuestion
Title: "STRING_VALUE", // required
Instructions: "STRING_VALUE",
RefId: "STRING_VALUE", // required
NotApplicableEnabled: true || false,
QuestionType: "TEXT" || "SINGLESELECT" || "NUMERIC", // required
QuestionTypeProperties: { // EvaluationFormQuestionTypeProperties Union: only one key present
Numeric: { // EvaluationFormNumericQuestionProperties
MinValue: Number("int"), // required
MaxValue: Number("int"), // required
Options: [ // EvaluationFormNumericQuestionOptionList
{ // EvaluationFormNumericQuestionOption
MinValue: Number("int"), // required
MaxValue: Number("int"), // required
Score: Number("int"),
AutomaticFail: true || false,
},
],
Automation: { // EvaluationFormNumericQuestionAutomation Union: only one key present
PropertyValue: { // NumericQuestionPropertyValueAutomation
Label: "OVERALL_CUSTOMER_SENTIMENT_SCORE" || "OVERALL_AGENT_SENTIMENT_SCORE" || "NON_TALK_TIME" || "NON_TALK_TIME_PERCENTAGE" || "NUMBER_OF_INTERRUPTIONS" || "CONTACT_DURATION" || "AGENT_INTERACTION_DURATION" || "CUSTOMER_HOLD_TIME", // required
},
},
},
SingleSelect: { // EvaluationFormSingleSelectQuestionProperties
Options: [ // EvaluationFormSingleSelectQuestionOptionList // required
{ // EvaluationFormSingleSelectQuestionOption
RefId: "STRING_VALUE", // required
Text: "STRING_VALUE", // required
Score: Number("int"),
AutomaticFail: true || false,
},
],
DisplayAs: "DROPDOWN" || "RADIO",
Automation: { // EvaluationFormSingleSelectQuestionAutomation
Options: [ // EvaluationFormSingleSelectQuestionAutomationOptionList // required
{ // EvaluationFormSingleSelectQuestionAutomationOption Union: only one key present
RuleCategory: { // SingleSelectQuestionRuleCategoryAutomation
Category: "STRING_VALUE", // required
Condition: "PRESENT" || "NOT_PRESENT", // required
OptionRefId: "STRING_VALUE", // required
},
},
],
DefaultOptionRefId: "STRING_VALUE",
},
},
},
Weight: Number("double"),
},
},
],
Weight: Number("double"),
},
Question: {
Title: "STRING_VALUE", // required
Instructions: "STRING_VALUE",
RefId: "STRING_VALUE", // required
NotApplicableEnabled: true || false,
QuestionType: "TEXT" || "SINGLESELECT" || "NUMERIC", // required
QuestionTypeProperties: {// Union: only one key present
Numeric: {
MinValue: Number("int"), // required
MaxValue: Number("int"), // required
Options: [
{
MinValue: Number("int"), // required
MaxValue: Number("int"), // required
Score: Number("int"),
AutomaticFail: true || false,
},
],
Automation: {// Union: only one key present
PropertyValue: {
Label: "OVERALL_CUSTOMER_SENTIMENT_SCORE" || "OVERALL_AGENT_SENTIMENT_SCORE" || "NON_TALK_TIME" || "NON_TALK_TIME_PERCENTAGE" || "NUMBER_OF_INTERRUPTIONS" || "CONTACT_DURATION" || "AGENT_INTERACTION_DURATION" || "CUSTOMER_HOLD_TIME", // required
},
},
},
SingleSelect: {
Options: [ // required
{
RefId: "STRING_VALUE", // required
Text: "STRING_VALUE", // required
Score: Number("int"),
AutomaticFail: true || false,
},
],
DisplayAs: "DROPDOWN" || "RADIO",
Automation: {
Options: [ // required
{// Union: only one key present
RuleCategory: {
Category: "STRING_VALUE", // required
Condition: "PRESENT" || "NOT_PRESENT", // required
OptionRefId: "STRING_VALUE", // required
},
},
],
DefaultOptionRefId: "STRING_VALUE",
},
},
},
Weight: Number("double"),
},
},
],
ScoringStrategy: { // EvaluationFormScoringStrategy
Mode: "QUESTION_ONLY" || "SECTION_ONLY", // required
Status: "ENABLED" || "DISABLED", // required
},
ClientToken: "STRING_VALUE",
};
const command = new UpdateEvaluationFormCommand(input);
const response = await client.send(command);
// { // UpdateEvaluationFormResponse
// EvaluationFormId: "STRING_VALUE", // required
// EvaluationFormArn: "STRING_VALUE", // required
// EvaluationFormVersion: Number("int"), // required
// };
UpdateEvaluationFormCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
EvaluationFormId Required | string | undefined | The unique identifier for the evaluation form. |
EvaluationFormVersion Required | number | undefined | A version of the evaluation form to update. |
InstanceId Required | string | undefined | The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. |
Items Required | EvaluationFormItem[] | undefined | 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. |
Title Required | string | undefined | A title of the evaluation form. |
ClientToken | string | undefined | 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 . |
CreateNewVersion | boolean | undefined | A flag indicating whether the operation must create a new version. |
Description | string | undefined | The description of the evaluation form. |
ScoringStrategy | EvaluationFormScoringStrategy | undefined | A scoring strategy of the evaluation form. |
UpdateEvaluationFormCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
EvaluationFormArn Required | string | undefined | The Amazon Resource Name (ARN) for the contact evaluation resource. |
EvaluationFormId Required | string | undefined | The unique identifier for the evaluation form. |
EvaluationFormVersion Required | number | undefined | The version of the updated evaluation form resource. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | server | Request processing failed because of an error or failure with the service. |
InvalidParameterException | client | One or more of the specified parameters are not valid. |
ResourceConflictException | client | A resource already has that name. |
ResourceNotFoundException | client | The specified resource was not found. |
ServiceQuotaExceededException | client | The service quota has been exceeded. |
ThrottlingException | client | The throttling limit has been exceeded. |
ConnectServiceException | Base exception class for all service exceptions from Connect service. |