:doc:`Connect <../../connect>` / Client / update_evaluation_form

**********************
update_evaluation_form
**********************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/UpdateEvaluationForm>`_  


  **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'|'MULTISELECT'|'DATETIME',
                    'QuestionTypeProperties': {
                        'Numeric': {
                            'MinValue': 123,
                            'MaxValue': 123,
                            'Options': [
                                {
                                    'MinValue': 123,
                                    'MaxValue': 123,
                                    'Score': 123,
                                    'AutomaticFail': True|False,
                                    'AutomaticFailConfiguration': {
                                        'TargetSection': 'string'
                                    }
                                },
                            ],
                            'Automation': {
                                'PropertyValue': {
                                    'Label': 'OVERALL_CUSTOMER_SENTIMENT_SCORE'|'OVERALL_AGENT_SENTIMENT_SCORE'|'CUSTOMER_SENTIMENT_SCORE_WITHOUT_AGENT'|'CUSTOMER_SENTIMENT_SCORE_WITH_AGENT'|'NON_TALK_TIME'|'NON_TALK_TIME_PERCENTAGE'|'NUMBER_OF_INTERRUPTIONS'|'CONTACT_DURATION'|'AGENT_INTERACTION_DURATION'|'CUSTOMER_HOLD_TIME'|'LONGEST_HOLD_DURATION'|'NUMBER_OF_HOLDS'|'AGENT_INTERACTION_AND_HOLD_DURATION'
                                },
                                'AnswerSource': {
                                    'SourceType': 'CONTACT_LENS_DATA'|'GEN_AI'
                                }
                            }
                        },
                        'SingleSelect': {
                            'Options': [
                                {
                                    'RefId': 'string',
                                    'Text': 'string',
                                    'Score': 123,
                                    'AutomaticFail': True|False,
                                    'AutomaticFailConfiguration': {
                                        'TargetSection': 'string'
                                    }
                                },
                            ],
                            'DisplayAs': 'DROPDOWN'|'RADIO',
                            'Automation': {
                                'Options': [
                                    {
                                        'RuleCategory': {
                                            'Category': 'string',
                                            'Condition': 'PRESENT'|'NOT_PRESENT',
                                            'OptionRefId': 'string'
                                        }
                                    },
                                ],
                                'DefaultOptionRefId': 'string',
                                'AnswerSource': {
                                    'SourceType': 'CONTACT_LENS_DATA'|'GEN_AI'
                                }
                            }
                        },
                        'Text': {
                            'Automation': {
                                'AnswerSource': {
                                    'SourceType': 'CONTACT_LENS_DATA'|'GEN_AI'
                                }
                            }
                        },
                        'MultiSelect': {
                            'Options': [
                                {
                                    'RefId': 'string',
                                    'Text': 'string'
                                },
                            ],
                            'DisplayAs': 'DROPDOWN'|'CHECKBOX',
                            'Automation': {
                                'Options': [
                                    {
                                        'RuleCategory': {
                                            'Category': 'string',
                                            'Condition': 'PRESENT'|'NOT_PRESENT',
                                            'OptionRefIds': [
                                                'string',
                                            ]
                                        }
                                    },
                                ],
                                'DefaultOptionRefIds': [
                                    'string',
                                ],
                                'AnswerSource': {
                                    'SourceType': 'CONTACT_LENS_DATA'|'GEN_AI'
                                }
                            }
                        }
                    },
                    'Enablement': {
                        'Condition': {
                            'Operands': [
                                {
                                    'Expression': {
                                        'Source': {
                                            'Type': 'QUESTION_REF_ID',
                                            'RefId': 'string'
                                        },
                                        'Values': [
                                            {
                                                'Type': 'OPTION_REF_ID',
                                                'RefId': 'string'
                                            },
                                        ],
                                        'Comparator': 'IN'|'NOT_IN'|'ALL_IN'|'EXACT'
                                    },
                                    'Condition': {'... recursive ...'}
                                },
                            ],
                            'Operator': 'OR'|'AND'
                        },
                        'Action': 'DISABLE'|'ENABLE',
                        'DefaultAction': 'DISABLE'|'ENABLE'
                    },
                    'Weight': 123.0
                }
            },
        ],
        ScoringStrategy={
            'Mode': 'QUESTION_ONLY'|'SECTION_ONLY',
            'Status': 'ENABLED'|'DISABLED'
        },
        AutoEvaluationConfiguration={
            'Enabled': True|False
        },
        ReviewConfiguration={
            'ReviewNotificationRecipients': [
                {
                    'Type': 'USER_ID',
                    'Value': {
                        'UserId': 'string'
                    }
                },
            ],
            'EligibilityDays': 123
        },
        AsDraft=True|False,
        ClientToken='string',
        TargetConfiguration={
            'ContactInteractionType': 'AGENT'|'AUTOMATED'
        },
        LanguageConfiguration={
            'FormLanguage': 'de-DE'|'en-US'|'es-ES'|'fr-FR'|'it-IT'|'pt-BR'
        }
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    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.

    

  
  :type EvaluationFormId: string
  :param EvaluationFormId: **[REQUIRED]** 

    The unique identifier for the evaluation form.

    

  
  :type EvaluationFormVersion: integer
  :param EvaluationFormVersion: **[REQUIRED]** 

    A version of the evaluation form to update.

    

  
  :type CreateNewVersion: boolean
  :param CreateNewVersion: 

    A flag indicating whether the operation must create a new version.

    

  
  :type Title: string
  :param Title: **[REQUIRED]** 

    A title of the evaluation form.

    

  
  :type Description: string
  :param Description: 

    The description of the evaluation form.

    

  
  :type Items: list
  :param Items: **[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``, ``Text``, ``MultiSelect``. 

        
          - **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.

                  

                
                - **AutomaticFailConfiguration** *(dict) --* 

                  A configuration for automatic fail.

                  

                
                  - **TargetSection** *(string) --* 

                    The referenceId of the target section for auto failure.

                    

                  
                
              
          
            - **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``, ``AnswerSource``. 

            
              - **PropertyValue** *(dict) --* 

                The property value of the automation.

                

              
                - **Label** *(string) --* **[REQUIRED]** 

                  The property label of the automation.

                  

                
              
              - **AnswerSource** *(dict) --* 

                A source of automation answer for numeric question.

                

              
                - **SourceType** *(string) --* **[REQUIRED]** 

                  The automation answer source type.

                  

                
              
            
          
          - **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.

                  

                
                - **AutomaticFailConfiguration** *(dict) --* 

                  Whether automatic fail is configured on a single select question.

                  

                
                  - **TargetSection** *(string) --* 

                    The referenceId of the target section for auto failure.

                    

                  
                
              
          
            - **DisplayAs** *(string) --* 

              The display mode of the single select question.

              

            
            - **Automation** *(dict) --* 

              The display mode of the single select question.

              

            
              - **Options** *(list) --* 

                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.

                

              
              - **AnswerSource** *(dict) --* 

                Automation answer source.

                

              
                - **SourceType** *(string) --* **[REQUIRED]** 

                  The automation answer source type.

                  

                
              
            
          
          - **Text** *(dict) --* 

            The properties of the text question.

            

          
            - **Automation** *(dict) --* 

              The automation properties of the text question.

              

            
              - **AnswerSource** *(dict) --* 

                Automation answer source.

                

              
                - **SourceType** *(string) --* **[REQUIRED]** 

                  The automation answer source type.

                  

                
              
            
          
          - **MultiSelect** *(dict) --* 

            Properties for multi-select question types.

            

          
            - **Options** *(list) --* **[REQUIRED]** 

              Options available for this multi-select question.

              

            
              - *(dict) --* 

                An option for a multi-select question in an evaluation form.

                

              
                - **RefId** *(string) --* **[REQUIRED]** 

                  Reference identifier for this option.

                  

                
                - **Text** *(string) --* **[REQUIRED]** 

                  Display text for this option.

                  

                
              
          
            - **DisplayAs** *(string) --* 

              Display format for the multi-select question.

              

            
            - **Automation** *(dict) --* 

              Automation configuration for this multi-select question.

              

            
              - **Options** *(list) --* 

                Automation options for the multi-select question.

                

              
                - *(dict) --* 

                  An automation option for a multi-select question.

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

                
                  - **RuleCategory** *(dict) --* 

                    Rule category configuration for this automation option.

                    

                  
                    - **Category** *(string) --* **[REQUIRED]** 

                      The category name for this automation rule.

                      

                    
                    - **Condition** *(string) --* **[REQUIRED]** 

                      The condition for this automation rule.

                      

                    
                    - **OptionRefIds** *(list) --* **[REQUIRED]** 

                      Reference IDs of options for this automation rule.

                      

                    
                      - *(string) --* 

                      
                  
                  
                
            
              - **DefaultOptionRefIds** *(list) --* 

                Reference IDs of default options.

                

              
                - *(string) --* 

                
            
              - **AnswerSource** *(dict) --* 

                A question automation answer.

                

              
                - **SourceType** *(string) --* **[REQUIRED]** 

                  The automation answer source type.

                  

                
              
            
          
        
        - **Enablement** *(dict) --* 

          A question conditional enablement.

          

        
          - **Condition** *(dict) --* **[REQUIRED]** 

            A condition for item enablement configuration.

            

          
            - **Operands** *(list) --* **[REQUIRED]** 

              Operands of the enablement condition.

              

            
              - *(dict) --* 

                An operand of the enablement condition.

                .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``Expression``, ``Condition``. 

              
                - **Expression** *(dict) --* 

                  An expression of the enablement condition.

                  

                
                  - **Source** *(dict) --* **[REQUIRED]** 

                    A source item of enablement expression.

                    

                  
                    - **Type** *(string) --* **[REQUIRED]** 

                      A type of source item.

                      

                    
                    - **RefId** *(string) --* 

                      A referenceId of the source item.

                      

                    
                  
                  - **Values** *(list) --* **[REQUIRED]** 

                    A list of values from source item.

                    

                  
                    - *(dict) --* 

                      An enablement expression source value.

                      

                    
                      - **Type** *(string) --* **[REQUIRED]** 

                        A type of source item value.

                        

                      
                      - **RefId** *(string) --* 

                        A referenceId of the source value.

                        

                      
                    
                
                  - **Comparator** *(string) --* **[REQUIRED]** 

                    A comparator to be used against list of values.

                    

                  
                
                - **Condition** *(dict) --* 

                  A condition for item enablement.

                  

                
              
          
            - **Operator** *(string) --* 

              The operator to be used to be applied to operands if more than one provided.

              

            
          
          - **Action** *(string) --* **[REQUIRED]** 

            An enablement action that if condition is satisfied.

            

          
          - **DefaultAction** *(string) --* 

            An enablement action that if condition is not satisfied.

            

          
        
        - **Weight** *(float) --* 

          The scoring weight of the section.

          

        
      
    

  :type ScoringStrategy: dict
  :param ScoringStrategy: 

    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.

      

    
  
  :type AutoEvaluationConfiguration: dict
  :param AutoEvaluationConfiguration: 

    Whether automated evaluations are enabled.

    

  
    - **Enabled** *(boolean) --* **[REQUIRED]** 

      When automated evaluation is enabled.

      

    
  
  :type ReviewConfiguration: dict
  :param ReviewConfiguration: 

    Configuration for evaluation review settings of the evaluation form.

    

  
    - **ReviewNotificationRecipients** *(list) --* **[REQUIRED]** 

      List of recipients who should be notified when a review is requested.

      

    
      - *(dict) --* 

        Information about a recipient who should be notified when an evaluation review is requested.

        

      
        - **Type** *(string) --* **[REQUIRED]** 

          The type of notification recipient.

          

        
        - **Value** *(dict) --* **[REQUIRED]** 

          The value associated with the notification recipient type.

          

        
          - **UserId** *(string) --* 

            The user identifier for the notification recipient.

            

          
        
      
  
    - **EligibilityDays** *(integer) --* 

      Number of days during which a request for review can be submitted for evaluations created from this form.

      

    
  
  :type AsDraft: boolean
  :param AsDraft: 

    A boolean flag indicating whether to update evaluation form to draft state.

    

  
  :type ClientToken: string
  :param ClientToken: 

    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 <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/>`__.

    This field is autopopulated if not provided.

  
  :type TargetConfiguration: dict
  :param TargetConfiguration: 

    Configuration that specifies the target for the evaluation form.

    

  
    - **ContactInteractionType** *(string) --* **[REQUIRED]** 

      The contact interaction type for this evaluation form.

      

    
  
  :type LanguageConfiguration: dict
  :param LanguageConfiguration: 

    Configuration for language settings of the evaluation form.

    

  
    - **FormLanguage** *(string) --* 

      The language for the evaluation form.

      

    
  
  
  :rtype: 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**
  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Connect.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceConflictException`

  