Amazon Connect Service

2023/01/05 - Amazon Connect Service - 2 updated api methods

Changes  Documentation update for a new Initiation Method value in DescribeContact API

DescribeContact (updated) Link ¶
Changes (response)
{'Contact': {'InitiationMethod': {'MONITOR', 'DISCONNECT'}}}

This API is in preview release for Amazon Connect and is subject to change.

Describes the specified contact.

See also: AWS API Documentation

Request Syntax

client.describe_contact(
    InstanceId='string',
    ContactId='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

type ContactId:

string

param ContactId:

[REQUIRED]

The identifier of the contact.

rtype:

dict

returns:

Response Syntax

{
    'Contact': {
        'Arn': 'string',
        'Id': 'string',
        'InitialContactId': 'string',
        'PreviousContactId': 'string',
        'InitiationMethod': 'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API'|'DISCONNECT'|'MONITOR',
        'Name': 'string',
        'Description': 'string',
        '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),
        'LastUpdateTimestamp': datetime(2015, 1, 1),
        'ScheduledTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Contact (dict) --

      Information about the contact.

      • Arn (string) --

        The Amazon Resource Name (ARN) for the contact.

      • Id (string) --

        The identifier for the contact.

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

      • Name (string) --

        The name of the contact.

      • Description (string) --

        The description of the contact.

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

      • DisconnectTimestamp (datetime) --

        The timestamp when the customer endpoint disconnected from Amazon Connect.

      • LastUpdateTimestamp (datetime) --

        The timestamp when contact was last updated.

      • ScheduledTimestamp (datetime) --

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

GetCurrentUserData (updated) Link ¶
Changes (response)
{'UserDataList': {'Contacts': {'InitiationMethod': {'MONITOR', 'DISCONNECT'}}}}

Gets the real-time active user data from the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.get_current_user_data(
    InstanceId='string',
    Filters={
        'Queues': [
            'string',
        ],
        'ContactFilter': {
            'ContactStates': [
                'INCOMING'|'PENDING'|'CONNECTING'|'CONNECTED'|'CONNECTED_ONHOLD'|'MISSED'|'ERROR'|'ENDED'|'REJECTED',
            ]
        },
        'RoutingProfiles': [
            'string',
        ],
        'Agents': [
            'string',
        ],
        'UserHierarchyGroups': [
            'string',
        ]
    },
    NextToken='string',
    MaxResults=123
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

type Filters:

dict

param Filters:

[REQUIRED]

The filters to apply to returned user data. You can filter up to the following limits:

  • Queues: 100

  • Routing profiles: 100

  • Agents: 100

  • Contact states: 9

  • User hierarchy groups: 1

The user data is retrieved for only the specified values/resources in the filter. A maximum of one filter can be passed from queues, routing profiles, agents, and user hierarchy groups.

Currently tagging is only supported on the resources that are passed in the filter.

  • Queues (list) --

    A list of up to 100 queues or ARNs.

    • (string) --

  • ContactFilter (dict) --

    A filter for the user data based on the contact information that is associated to the user. It contains a list of contact states.

    • ContactStates (list) --

      A list of up to 9 contact states.

      • (string) --

  • RoutingProfiles (list) --

    A list of up to 100 routing profile IDs or ARNs.

    • (string) --

  • Agents (list) --

    A list of up to 100 agent IDs or ARNs.

    • (string) --

  • UserHierarchyGroups (list) --

    A UserHierarchyGroup ID or ARN.

    • (string) --

type NextToken:

string

param NextToken:

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.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'UserDataList': [
        {
            'User': {
                'Id': 'string',
                'Arn': 'string'
            },
            'RoutingProfile': {
                'Id': 'string',
                'Arn': 'string'
            },
            'HierarchyPath': {
                'LevelOne': {
                    'Id': 'string',
                    'Arn': 'string'
                },
                'LevelTwo': {
                    'Id': 'string',
                    'Arn': 'string'
                },
                'LevelThree': {
                    'Id': 'string',
                    'Arn': 'string'
                },
                'LevelFour': {
                    'Id': 'string',
                    'Arn': 'string'
                },
                'LevelFive': {
                    'Id': 'string',
                    'Arn': 'string'
                }
            },
            'Status': {
                'StatusStartTimestamp': datetime(2015, 1, 1),
                'StatusArn': 'string',
                'StatusName': 'string'
            },
            'AvailableSlotsByChannel': {
                'string': 123
            },
            'MaxSlotsByChannel': {
                'string': 123
            },
            'ActiveSlotsByChannel': {
                'string': 123
            },
            'Contacts': [
                {
                    'ContactId': 'string',
                    'Channel': 'VOICE'|'CHAT'|'TASK',
                    'InitiationMethod': 'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API'|'DISCONNECT'|'MONITOR',
                    'AgentContactState': 'INCOMING'|'PENDING'|'CONNECTING'|'CONNECTED'|'CONNECTED_ONHOLD'|'MISSED'|'ERROR'|'ENDED'|'REJECTED',
                    'StateStartTimestamp': datetime(2015, 1, 1),
                    'ConnectedToAgentTimestamp': datetime(2015, 1, 1),
                    'Queue': {
                        'Id': 'string',
                        'Arn': 'string'
                    }
                },
            ],
            'NextStatus': 'string'
        },
    ],
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • NextToken (string) --

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

    • UserDataList (list) --

      A list of the user data that is returned.

      • (dict) --

        Data for a user.

        • User (dict) --

          Information about the user for the data that is returned. It contains the resourceId and ARN of the user.

          • Id (string) --

            The unique identifier for the user.

          • Arn (string) --

            The Amazon Resource Name (ARN) for the user.

        • RoutingProfile (dict) --

          Information about the routing profile that is assigned to the user.

          • Id (string) --

            The identifier of the routing profile.

          • Arn (string) --

            The Amazon Resource Name (ARN) of the routing profile.

        • HierarchyPath (dict) --

          Contains information about the levels of a hierarchy group assigned to a user.

          • LevelOne (dict) --

            Information about level one.

            • Id (string) --

              The unique identifier for the hierarchy group.

            • Arn (string) --

              The Amazon Resource Name (ARN) for the hierarchy group.

          • LevelTwo (dict) --

            Information about level two.

            • Id (string) --

              The unique identifier for the hierarchy group.

            • Arn (string) --

              The Amazon Resource Name (ARN) for the hierarchy group.

          • LevelThree (dict) --

            Information about level three.

            • Id (string) --

              The unique identifier for the hierarchy group.

            • Arn (string) --

              The Amazon Resource Name (ARN) for the hierarchy group.

          • LevelFour (dict) --

            Information about level four.

            • Id (string) --

              The unique identifier for the hierarchy group.

            • Arn (string) --

              The Amazon Resource Name (ARN) for the hierarchy group.

          • LevelFive (dict) --

            Information about level five.

            • Id (string) --

              The unique identifier for the hierarchy group.

            • Arn (string) --

              The Amazon Resource Name (ARN) for the hierarchy group.

        • Status (dict) --

          The status of the agent that they manually set in their Contact Control Panel (CCP), or that the supervisor manually changes in the real-time metrics report.

          • StatusStartTimestamp (datetime) --

            The start timestamp of the agent's status.

          • StatusArn (string) --

            The Amazon Resource Name (ARN) of the agent's status.

          • StatusName (string) --

            The name of the agent status.

        • AvailableSlotsByChannel (dict) --

          A map of available slots by channel. The key is a channel name. The value is an integer: the available number of slots.

          • (string) --

            • (integer) --

        • MaxSlotsByChannel (dict) --

          A map of maximum slots by channel. The key is a channel name. The value is an integer: the maximum number of slots. This is calculated from MediaConcurrency of the RoutingProfile assigned to the agent.

          • (string) --

            • (integer) --

        • ActiveSlotsByChannel (dict) --

          A map of active slots by channel. The key is a channel name. The value is an integer: the number of active slots.

          • (string) --

            • (integer) --

        • Contacts (list) --

          A list of contact reference information.

          • (dict) --

            Information about the contact associated to the user.

            • ContactId (string) --

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

            • Channel (string) --

              The channel of the contact.

            • InitiationMethod (string) --

              How the contact was initiated.

            • AgentContactState (string) --

              The state of the contact.

            • StateStartTimestamp (datetime) --

              The epoch timestamp when the contact state started.

            • ConnectedToAgentTimestamp (datetime) --

              The time at which the contact was connected to an agent.

            • Queue (dict) --

              Contains information about a queue resource for which metrics are returned.

              • Id (string) --

                The identifier of the queue.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the queue.

        • NextStatus (string) --

          The Next status of the agent.

    • ApproximateTotalCount (integer) --

      The total count of the result, regardless of the current page size.