Connect / Client / update_evaluation_form

update_evaluation_form#

Connect.Client.update_evaluation_form(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.update_evaluation_form(
    InstanceId='string',
    EvaluationFormId='string',
    EvaluationFormVersion=123,
    CreateNewVersion=True|False,
    Title='string',
    Description='string',
    Items=[
        {
            'Section': {
                'Title': 'string',
                'RefId': 'string',
                'Instructions': 'string',
                'Items': {'... recursive ...'},
                'Weight': 123.0
            },
            'Question': {
                'Title': 'string',
                'Instructions': 'string',
                'RefId': 'string',
                'NotApplicableEnabled': True|False,
                'QuestionType': 'TEXT'|'SINGLESELECT'|'NUMERIC',
                'QuestionTypeProperties': {
                    'Numeric': {
                        'MinValue': 123,
                        'MaxValue': 123,
                        'Options': [
                            {
                                'MinValue': 123,
                                'MaxValue': 123,
                                'Score': 123,
                                'AutomaticFail': True|False
                            },
                        ],
                        'Automation': {
                            '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'
                            }
                        }
                    },
                    'SingleSelect': {
                        'Options': [
                            {
                                'RefId': 'string',
                                'Text': 'string',
                                'Score': 123,
                                'AutomaticFail': True|False
                            },
                        ],
                        'DisplayAs': 'DROPDOWN'|'RADIO',
                        'Automation': {
                            'Options': [
                                {
                                    'RuleCategory': {
                                        'Category': 'string',
                                        'Condition': 'PRESENT'|'NOT_PRESENT',
                                        'OptionRefId': 'string'
                                    }
                                },
                            ],
                            'DefaultOptionRefId': 'string'
                        }
                    }
                },
                'Weight': 123.0
            }
        },
    ],
    ScoringStrategy={
        'Mode': 'QUESTION_ONLY'|'SECTION_ONLY',
        'Status': 'ENABLED'|'DISABLED'
    },
    ClientToken='string'
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

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

  • EvaluationFormId (string) –

    [REQUIRED]

    The unique identifier for the evaluation form.

  • EvaluationFormVersion (integer) –

    [REQUIRED]

    A version of the evaluation form to update.

  • CreateNewVersion (boolean) – A flag indicating whether the operation must create a new version.

  • Title (string) –

    [REQUIRED]

    A title of the evaluation form.

  • Description (string) – The description of the evaluation form.

  • Items (list) –

    [REQUIRED]

    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.

    • (dict) –

      Information about an item from an evaluation form. The item must be either a section or a question.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: Section, Question.

      • Section (dict) –

        The information of the section.

        • Title (string) – [REQUIRED]

          The title of the section.

        • RefId (string) – [REQUIRED]

          The identifier of the section. An identifier must be unique within the evaluation form.

        • Instructions (string) –

          The instructions of the section.

        • Items (list) –

          The items of the section.

        • Weight (float) –

          The scoring weight of the section.

      • Question (dict) –

        The information of the question.

        • Title (string) – [REQUIRED]

          The title of the question.

        • Instructions (string) –

          The instructions of the section.

        • RefId (string) – [REQUIRED]

          The identifier of the question. An identifier must be unique within the evaluation form.

        • NotApplicableEnabled (boolean) –

          The flag to enable not applicable answers to the question.

        • QuestionType (string) – [REQUIRED]

          The type of the question.

        • QuestionTypeProperties (dict) –

          The properties of the type of question. Text questions do not have to define question type properties.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: Numeric, SingleSelect.

          • Numeric (dict) –

            The properties of the numeric question.

            • MinValue (integer) – [REQUIRED]

              The minimum answer value.

            • MaxValue (integer) – [REQUIRED]

              The maximum answer value.

            • Options (list) –

              The scoring options of the numeric question.

              • (dict) –

                Information about the option range used for scoring in numeric questions.

                • MinValue (integer) – [REQUIRED]

                  The minimum answer value of the range option.

                • MaxValue (integer) – [REQUIRED]

                  The maximum answer value of the range option.

                • Score (integer) –

                  The score assigned to answer values within the range option.

                • AutomaticFail (boolean) –

                  The flag to mark the option as automatic fail. If an automatic fail answer is provided, the overall evaluation gets a score of 0.

            • Automation (dict) –

              The automation properties of the numeric question.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: PropertyValue.

              • PropertyValue (dict) –

                The property value of the automation.

                • Label (string) – [REQUIRED]

                  The property label of the automation.

          • SingleSelect (dict) –

            The properties of the numeric question.

            • Options (list) – [REQUIRED]

              The answer options of the single select question.

              • (dict) –

                Information about the automation configuration in single select questions.

                • RefId (string) – [REQUIRED]

                  The identifier of the answer option. An identifier must be unique within the question.

                • Text (string) – [REQUIRED]

                  The title of the answer option.

                • Score (integer) –

                  The score assigned to the answer option.

                • AutomaticFail (boolean) –

                  The flag to mark the option as automatic fail. If an automatic fail answer is provided, the overall evaluation gets a score of 0.

            • DisplayAs (string) –

              The display mode of the single select question.

            • Automation (dict) –

              The display mode of the single select question.

              • Options (list) – [REQUIRED]

                The automation options of the single select question.

                • (dict) –

                  Information about the automation option of a single select question.

                  Note

                  This is a Tagged Union structure. Only one of the following top level keys can be set: RuleCategory.

                  • RuleCategory (dict) –

                    The automation option based on a rule category for the single select question.

                    • Category (string) – [REQUIRED]

                      The category name, as defined in Rules.

                    • Condition (string) – [REQUIRED]

                      The condition to apply for the automation option. If the condition is PRESENT, then the option is applied when the contact data includes the category. Similarly, if the condition is NOT_PRESENT, then the option is applied when the contact data does not include the category.

                    • OptionRefId (string) – [REQUIRED]

                      The identifier of the answer option.

              • DefaultOptionRefId (string) –

                The identifier of the default answer option, when none of the automation options match the criteria.

        • Weight (float) –

          The scoring weight of the section.

  • ScoringStrategy (dict) –

    A scoring strategy of the evaluation form.

    • Mode (string) – [REQUIRED]

      The scoring mode of the evaluation form.

    • Status (string) – [REQUIRED]

      The scoring status of the evaluation form.

  • ClientToken (string) –

    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.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'EvaluationFormId': 'string',
    'EvaluationFormArn': 'string',
    'EvaluationFormVersion': 123
}

Response Structure

  • (dict) –

    • EvaluationFormId (string) –

      The unique identifier for the evaluation form.

    • EvaluationFormArn (string) –

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

    • EvaluationFormVersion (integer) –

      The version of the updated evaluation form resource.

Exceptions

  • Connect.Client.exceptions.InvalidParameterException

  • Connect.Client.exceptions.ResourceNotFoundException

  • Connect.Client.exceptions.ThrottlingException

  • Connect.Client.exceptions.InternalServiceException

  • Connect.Client.exceptions.ServiceQuotaExceededException

  • Connect.Client.exceptions.ResourceConflictException