Connect / Client / search_contact_evaluations

search_contact_evaluations

Connect.Client.search_contact_evaluations(**kwargs)

Searches contact evaluations in an Connect Customer instance, with optional filtering.

Use cases

Following are common uses cases for this API:

  • Find contact evaluations by using specific search criteria.

  • Find contact evaluations that are tagged with a specific set of tags.

Important things to know

  • A Search operation, unlike a List operation, takes time to index changes to resource (create, update or delete). If you don’t see updated information for recently changed contact evaluations, try calling the API again in a few seconds.

Endpoints: See Connect Customer endpoints and quotas.

See also: AWS API Documentation

Request Syntax

response = client.search_contact_evaluations(
    InstanceId='string',
    NextToken='string',
    MaxResults=123,
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        },
        'NumberCondition': {
            'FieldName': 'string',
            'MinValue': 123,
            'MaxValue': 123,
            'ComparisonType': 'GREATER_OR_EQUAL'|'GREATER'|'LESSER_OR_EQUAL'|'LESSER'|'EQUAL'|'NOT_EQUAL'|'RANGE'
        },
        'BooleanCondition': {
            'FieldName': 'string',
            'ComparisonType': 'IS_TRUE'|'IS_FALSE'
        },
        'DateTimeCondition': {
            'FieldName': 'string',
            'MinValue': 'string',
            'MaxValue': 'string',
            'ComparisonType': 'GREATER_THAN'|'LESS_THAN'|'GREATER_THAN_OR_EQUAL_TO'|'LESS_THAN_OR_EQUAL_TO'|'EQUAL_TO'|'RANGE'
        },
        'DecimalCondition': {
            'FieldName': 'string',
            'MinValue': 123.0,
            'MaxValue': 123.0,
            'ComparisonType': 'GREATER_OR_EQUAL'|'GREATER'|'LESSER_OR_EQUAL'|'LESSER'|'EQUAL'|'NOT_EQUAL'|'RANGE'
        }
    },
    SearchFilter={
        'AttributeFilter': {
            'OrConditions': [
                {
                    'TagConditions': [
                        {
                            'TagKey': 'string',
                            'TagValue': 'string'
                        },
                    ]
                },
            ],
            'AndCondition': {
                'TagConditions': [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ]
            },
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        },
        'ContactEvaluationAttributeFilter': {
            'OrConditions': [
                {
                    'TagConditions': [
                        {
                            'TagKey': 'string',
                            'TagValue': 'string'
                        },
                    ],
                    'AttributeConditions': [
                        {
                            'AttributeKey': 'ContactAgentId',
                            'AttributeValue': {
                                'StringValue': 'string'
                            },
                            'ComparisonType': 'EXACT'
                        },
                    ]
                },
            ],
            'AndCondition': {
                'TagConditions': [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
                'AttributeConditions': [
                    {
                        'AttributeKey': 'ContactAgentId',
                        'AttributeValue': {
                            'StringValue': 'string'
                        },
                        'ComparisonType': 'EXACT'
                    },
                ]
            },
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            },
            'ContactEvaluationAttributeCondition': {
                'AttributeKey': 'ContactAgentId',
                'AttributeValue': {
                    'StringValue': 'string'
                },
                'ComparisonType': 'EXACT'
            }
        }
    }
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

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

  • NextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • MaxResults (integer) – The maximum number of results to return per page.

  • SearchCriteria (dict) –

    The search criteria to be used to return contact evaluations.

    • OrConditions (list) –

      A list of conditions which would be applied together with an OR condition.

      • (dict) –

        The search criteria to be used to return evaluations.

    • AndConditions (list) –

      A list of conditions which would be applied together with an AND condition.

      • (dict) –

        The search criteria to be used to return evaluations.

    • StringCondition (dict) –

      A leaf node condition which can be used to specify a string condition.

      • FieldName (string) –

        The name of the field in the string condition.

      • Value (string) –

        The value of the string.

      • ComparisonType (string) –

        The type of comparison to be made when evaluating the string condition.

    • NumberCondition (dict) –

      A leaf node condition which can be used to specify a numeric condition.

      Note

      The currently supported value for FieldName is limit.

      • FieldName (string) –

        The name of the field in the number condition.

      • MinValue (integer) –

        The minValue to be used while evaluating the number condition.

      • MaxValue (integer) –

        The maxValue to be used while evaluating the number condition.

      • ComparisonType (string) –

        The type of comparison to be made when evaluating the number condition.

    • BooleanCondition (dict) –

      The boolean condition search criteria for searching evaluations.

      • FieldName (string) –

        A name of the property to be searched.

      • ComparisonType (string) –

        Boolean property comparison type.

    • DateTimeCondition (dict) –

      The datetime condition search criteria for searching evaluations.

      • FieldName (string) –

        A name of the datetime property to be searched

      • MinValue (string) –

        A minimum value of the property.

      • MaxValue (string) –

        A maximum value of the property.

      • ComparisonType (string) –

        Datetime property comparison type.

    • DecimalCondition (dict) –

      The decimal condition search criteria for searching evaluations.

      • FieldName (string) –

        A name of the decimal property to be searched.

      • MinValue (float) –

        A minimum value of the decimal property.

      • MaxValue (float) –

        A maximum value of the decimal property.

      • ComparisonType (string) –

        The type of comparison to be made when evaluating the decimal condition.

  • SearchFilter (dict) –

    Filters to be applied to search results.

    • AttributeFilter (dict) –

      An object that can be used to specify tag conditions.

      • OrConditions (list) –

        A list of conditions which would be applied together with an OR condition.

        • (dict) –

          A list of conditions which would be applied together with an AND condition.

          • TagConditions (list) –

            A leaf node condition which can be used to specify a tag condition.

            • (dict) –

              A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

              • TagKey (string) –

                The tag key in the tag condition.

              • TagValue (string) –

                The tag value in the tag condition.

      • AndCondition (dict) –

        A list of conditions which would be applied together with an AND condition.

        • TagConditions (list) –

          A leaf node condition which can be used to specify a tag condition.

          • (dict) –

            A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

            • TagKey (string) –

              The tag key in the tag condition.

            • TagValue (string) –

              The tag value in the tag condition.

      • TagCondition (dict) –

        A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

        • TagKey (string) –

          The tag key in the tag condition.

        • TagValue (string) –

          The tag value in the tag condition.

    • ContactEvaluationAttributeFilter (dict) –

      An object that can be used to specify tag conditions and attribute conditions for contact evaluations.

      • OrConditions (list) –

        A list of conditions which would be applied together with an OR condition.

        • (dict) –

          A list of conditions which would be applied together with an AND condition.

          • TagConditions (list) –

            A list of tag conditions to apply.

            • (dict) –

              A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

              • TagKey (string) –

                The tag key in the tag condition.

              • TagValue (string) –

                The tag value in the tag condition.

          • AttributeConditions (list) –

            A list of attribute conditions to apply.

            • (dict) –

              An attribute condition for contact evaluation filtering.

              • AttributeKey (string) –

                The key of the attribute.

              • AttributeValue (dict) –

                The value of the attribute.

                • StringValue (string) –

                  A string value for the attribute.

              • ComparisonType (string) –

                The comparison type for the condition.

      • AndCondition (dict) –

        A list of conditions which would be applied together with an AND condition.

        • TagConditions (list) –

          A list of tag conditions to apply.

          • (dict) –

            A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

            • TagKey (string) –

              The tag key in the tag condition.

            • TagValue (string) –

              The tag value in the tag condition.

        • AttributeConditions (list) –

          A list of attribute conditions to apply.

          • (dict) –

            An attribute condition for contact evaluation filtering.

            • AttributeKey (string) –

              The key of the attribute.

            • AttributeValue (dict) –

              The value of the attribute.

              • StringValue (string) –

                A string value for the attribute.

            • ComparisonType (string) –

              The comparison type for the condition.

      • TagCondition (dict) –

        A tag condition to apply.

        • TagKey (string) –

          The tag key in the tag condition.

        • TagValue (string) –

          The tag value in the tag condition.

      • ContactEvaluationAttributeCondition (dict) –

        An attribute condition to apply.

        • AttributeKey (string) –

          The key of the attribute.

        • AttributeValue (dict) –

          The value of the attribute.

          • StringValue (string) –

            A string value for the attribute.

        • ComparisonType (string) –

          The comparison type for the condition.

Return type:

dict

Returns:

Response Syntax

{
    'EvaluationSearchSummaryList': [
        {
            'EvaluationId': 'string',
            'EvaluationArn': 'string',
            'EvaluationFormId': 'string',
            'EvaluationFormVersion': 123,
            'EvaluationFormTitle': 'string',
            'Metadata': {
                'ContactId': 'string',
                'EvaluatorArn': 'string',
                'ContactAgentId': 'string',
                'CalibrationSessionId': 'string',
                'ScorePercentage': 123.0,
                'ScoreAutomaticFail': True|False,
                'ScoreNotApplicable': True|False,
                'AutoEvaluationEnabled': True|False,
                'AutoEvaluationStatus': 'IN_PROGRESS'|'FAILED'|'SUCCEEDED',
                'AcknowledgedTime': datetime(2015, 1, 1),
                'AcknowledgedBy': 'string',
                'AcknowledgerComment': 'string',
                'SamplingJobId': 'string',
                'ReviewId': 'string',
                'ContactParticipantRole': 'AGENT'|'SYSTEM'|'CUSTOM_BOT'|'CUSTOMER',
                'ContactParticipantId': 'string',
                'EarnedPoints': 123,
                'MaxBasePoint': 123,
                'PerformanceCategory': 'NEEDS_IMPROVEMENT'|'EXCEEDS_EXPECTATIONS'
            },
            'Status': 'DRAFT'|'SUBMITTED'|'REVIEW_REQUESTED'|'UNDER_REVIEW',
            'EvaluationType': 'STANDARD'|'CALIBRATION',
            'CreatedTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) –

    • EvaluationSearchSummaryList (list) –

      Contains information about contact evaluations.

      • (dict) –

        Summary of evaluation obtained from the search operation.

        • EvaluationId (string) –

          A unique identifier for the contact evaluation.

        • EvaluationArn (string) –

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

        • EvaluationFormId (string) –

          The unique identifier for the evaluation form.

        • EvaluationFormVersion (integer) –

          A version of the evaluation form.

        • EvaluationFormTitle (string) –

          Title of the evaluation form.

        • Metadata (dict) –

          Summary information about the evaluation search.

          • ContactId (string) –

            The identifier of the contact in this instance of Connect Customer.

          • EvaluatorArn (string) –

            The Amazon Resource Name (ARN) of the person who evaluated the contact.

          • ContactAgentId (string) –

            The unique ID of the agent who handled the contact.

          • CalibrationSessionId (string) –

            The calibration session ID that this evaluation belongs to.

          • ScorePercentage (float) –

            The total evaluation score expressed as a percentage.

          • ScoreAutomaticFail (boolean) –

            The flag that marks the item as automatic fail. If the item or a child item gets an automatic fail answer, this flag is true.

          • ScoreNotApplicable (boolean) –

            The flag to mark the item as not applicable for scoring.

          • AutoEvaluationEnabled (boolean) –

            Whether auto-evaluation is enabled.

          • AutoEvaluationStatus (string) –

            The status of the contact auto evaluation.

          • AcknowledgedTime (datetime) –

            When the evaluation was acknowledged by the agent.

          • AcknowledgedBy (string) –

            The agent who acknowledged the evaluation.

          • AcknowledgerComment (string) –

            The comment from the agent when they acknowledged the evaluation.

          • SamplingJobId (string) –

            Identifier of the sampling job.

          • ReviewId (string) –

            Identifier for the review.

          • ContactParticipantRole (string) –

            Role of a contact participant in the evaluation.

          • ContactParticipantId (string) –

            Identifier for a contact participant in the evaluation.

          • EarnedPoints (integer) –

            The points earned for the evaluation.

          • MaxBasePoint (integer) –

            The maximum base points possible for the evaluation.

          • PerformanceCategory (string) –

            The performance category for the evaluation score.

        • Status (string) –

          The status of the evaluation.

        • EvaluationType (string) –

          Type of the evaluation.

        • CreatedTime (datetime) –

          The date and time when the evaluation was created, in UTC time.

        • LastModifiedTime (datetime) –

          The date and time when the evaluation was modified last time, in UTC time.

        • Tags (dict) –

          The tags used to organize, track, or control access for this resource. For example, { “Tags”: {“key1”:”value1”, “key2”:”value2”} }.

          • (string) –

            • (string) –

    • NextToken (string) –

      If there are additional results, this is the token for the next set of results.

    • ApproximateTotalCount (integer) –

      The total number of contact evaluations that matched your search query.

Exceptions

  • Connect.Client.exceptions.InvalidRequestException

  • Connect.Client.exceptions.InvalidParameterException

  • Connect.Client.exceptions.ResourceNotFoundException

  • Connect.Client.exceptions.ThrottlingException

  • Connect.Client.exceptions.InternalServiceException