Connect / Paginator / SearchContacts

SearchContacts#

class Connect.Paginator.SearchContacts#
paginator = client.get_paginator('search_contacts')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from Connect.Client.search_contacts().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    InstanceId='string',
    TimeRange={
        'Type': 'INITIATION_TIMESTAMP'|'SCHEDULED_TIMESTAMP'|'CONNECTED_TO_AGENT_TIMESTAMP'|'DISCONNECT_TIMESTAMP',
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    },
    SearchCriteria={
        'AgentIds': [
            'string',
        ],
        'AgentHierarchyGroups': {
            'L1Ids': [
                'string',
            ],
            'L2Ids': [
                'string',
            ],
            'L3Ids': [
                'string',
            ],
            'L4Ids': [
                'string',
            ],
            'L5Ids': [
                'string',
            ]
        },
        'Channels': [
            'VOICE'|'CHAT'|'TASK',
        ],
        'ContactAnalysis': {
            'Transcript': {
                'Criteria': [
                    {
                        'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT',
                        'SearchText': [
                            'string',
                        ],
                        'MatchType': 'MATCH_ALL'|'MATCH_ANY'
                    },
                ],
                'MatchType': 'MATCH_ALL'|'MATCH_ANY'
            }
        },
        'InitiationMethods': [
            'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API'|'DISCONNECT'|'MONITOR'|'EXTERNAL_OUTBOUND',
        ],
        'QueueIds': [
            'string',
        ],
        'SearchableContactAttributes': {
            'Criteria': [
                {
                    'Key': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            'MatchType': 'MATCH_ALL'|'MATCH_ANY'
        }
    },
    Sort={
        'FieldName': 'INITIATION_TIMESTAMP'|'SCHEDULED_TIMESTAMP'|'CONNECTED_TO_AGENT_TIMESTAMP'|'DISCONNECT_TIMESTAMP'|'INITIATION_METHOD'|'CHANNEL',
        'Order': 'ASCENDING'|'DESCENDING'
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

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

  • TimeRange (dict) –

    [REQUIRED]

    Time range that you want to search results

    • Type (string) – [REQUIRED]

      The type of timestamp to search

    • StartTime (datetime) – [REQUIRED]

      The start time of the time range.

    • EndTime (datetime) – [REQUIRED]

      The end time of the time range.

  • SearchCriteria (dict) –

    The search criteria to be used to return contacts.

    • AgentIds (list) –

      The array of agent ids

      • (string) –

    • AgentHierarchyGroups (dict) –

      The agent hierarchy groups

      • L1Ids (list) –

        The identifiers for level 1 hierarchy groups.

        • (string) –

      • L2Ids (list) –

        The identifiers for level 2 hierarchy groups.

        • (string) –

      • L3Ids (list) –

        The identifiers for level 3 hierarchy groups.

        • (string) –

      • L4Ids (list) –

        The identifiers for level 4 hierarchy groups.

        • (string) –

      • L5Ids (list) –

        The identifiers for level 5 hierarchy groups.

        • (string) –

    • Channels (list) –

      The array of channels

      • (string) –

    • ContactAnalysis (dict) –

      The ContactAnalysis object used in search criteria

      • Transcript (dict) –

        A structure that defines filters can be used to search with text within an Amazon Connect Contact Lens analyzed transcript.

        • Criteria (list) – [REQUIRED]

          The array of transcript search criteria

          • (dict) –

            The transcript criteria used to search

            • ParticipantRole (string) – [REQUIRED]

              The participant role in a transcript

            • SearchText (list) – [REQUIRED]

              The words or phrases used to search within a transcript.

              • (string) –

            • MatchType (string) – [REQUIRED]

              The match type of search texts in a transcript criteria.

        • MatchType (string) –

          The match type of multiple transcript criteira

    • InitiationMethods (list) –

      The array of initiaton methods

      • (string) –

    • QueueIds (list) –

      The array of queue ids.

      • (string) –

    • SearchableContactAttributes (dict) –

      The SearchableContactAttributes object used in search criteria

      • Criteria (list) – [REQUIRED]

        The array of searhale contact attribute criteria

        • (dict) –

          The criteria of searchable contact attributes.

          • Key (string) – [REQUIRED]

            The searchable contact attribute key

          • Values (list) – [REQUIRED]

            The array of contact attribute values used to filter search results.

            • (string) –

      • MatchType (string) –

        The match type of multiple searchable contact attributes criteria.

  • Sort (dict) –

    Specifies a field to sort by and a sort order

    • FieldName (string) – [REQUIRED]

      The name of the field on which to sort.

    • Order (string) – [REQUIRED]

      An ascending or descending sort.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'Contacts': [
        {
            'Arn': 'string',
            'Id': 'string',
            'InitialContactId': 'string',
            'PreviousContactId': 'string',
            'InitiationMethod': 'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API'|'DISCONNECT'|'MONITOR'|'EXTERNAL_OUTBOUND',
            'Channel': 'VOICE'|'CHAT'|'TASK',
            'QueueInfo': {
                'Id': 'string',
                'EnqueueTimestamp': datetime(2015, 1, 1)
            },
            'AgentInfo': {
                'Id': 'string',
                'ConnectedToAgentTimestamp': datetime(2015, 1, 1)
            },
            'InitiationTimestamp': datetime(2015, 1, 1),
            'DisconnectTimestamp': datetime(2015, 1, 1),
            'ScheduledTimestamp': datetime(2015, 1, 1)
        },
    ],
    'TotalCount': 123
}

Response Structure

  • (dict) –

    • Contacts (list) –

      Information about the contacts.

      • (dict) –

        Information of returned contact.

        • Arn (string) –

          The Amazon Resource Name (ARN) of the contact

        • Id (string) –

          The identifier of the contact summary.

        • InitialContactId (string) –

          If this contact is related to other contacts, this is the ID of the initial contact.

        • PreviousContactId (string) –

          If this contact is not the first contact, this is the ID of the previous contact.

        • InitiationMethod (string) –

          Indicates how the contact was initiated.

        • Channel (string) –

          How the contact reached your contact center.

        • QueueInfo (dict) –

          If this contact was queued, this contains information about the queue.

          • Id (string) –

            The unique identifier for the queue.

          • EnqueueTimestamp (datetime) –

            The timestamp when the contact was added to the queue.

        • AgentInfo (dict) –

          Information about the agent who accepted the contact.

          • Id (string) –

            The identifier of the agent who accepted the contact.

          • ConnectedToAgentTimestamp (datetime) –

            The timestamp when the contact was connected to the agent.

        • InitiationTimestamp (datetime) –

          The date and time this contact was initiated, in UTC time. For INBOUND, this is when the contact arrived. For OUTBOUND, this is when the agent began dialing. For CALLBACK, this is when the callback contact was created. For TRANSFER and QUEUE_TRANSFER, this is when the transfer was initiated. For API, this is when the request arrived. For EXTERNAL_OUTBOUND, this is when the agent started dialing the external participant. For MONITOR, this is when the supervisor started listening to a contact.

        • DisconnectTimestamp (datetime) –

          The timestamp when the customer endpoint disconnected from Amazon Connect.

        • ScheduledTimestamp (datetime) –

          The timestamp, in Unix epoch time format, at which to start running the inbound flow.

    • TotalCount (integer) –

      The total number of contacts which matched your search query.