CreateEvaluationFormCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ConnectClient, CreateEvaluationFormCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, CreateEvaluationFormCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // CreateEvaluationFormRequest
  InstanceId: "STRING_VALUE", // required
  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 CreateEvaluationFormCommand(input);
const response = await client.send(command);
// { // CreateEvaluationFormResponse
//   EvaluationFormId: "STRING_VALUE", // required
//   EvaluationFormArn: "STRING_VALUE", // required
// };

CreateEvaluationFormCommand Input

Parameter
Type
Description
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 .

Description
string | undefined

The description of the evaluation form.

ScoringStrategy
EvaluationFormScoringStrategy | undefined

A scoring strategy of the evaluation form.

CreateEvaluationFormCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
EvaluationFormArn
Required
string | undefined

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

EvaluationFormId
Required
string | undefined

The unique identifier for the evaluation form.

Throws

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.