2022/06/06 - Amazon Connect Service - 1 new api methods
Changes This release adds a new API, GetCurrentUserData, which returns real-time details about users' current activity.
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', ] } }, NextToken='string', MaxResults=123 )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
dict
[REQUIRED]
Filters up to 100 Queues , or up to 9 ContactStates . The user data is retrieved only for those users who are associated with the queues and have contacts that are in the specified ContactState .
Queues (list) --
Contains information about a queue resource for which metrics are returned.
(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) --
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.
integer
The maximum number of results to return per page.
dict
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' }, 'AvailableSlotsByChannel': { 'string': 123 }, 'MaxSlotsByChannel': { 'string': 123 }, 'ActiveSlotsByChannel': { 'string': 123 }, 'Contacts': [ { 'ContactId': 'string', 'Channel': 'VOICE'|'CHAT'|'TASK', 'InitiationMethod': 'INBOUND'|'OUTBOUND'|'TRANSFER'|'QUEUE_TRANSFER'|'CALLBACK'|'API', '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' } }, ] }, ] }
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 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.
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.