get_current_user_data
(**kwargs)¶Gets the real-time active user data from the specified Amazon Connect instance.
See also: AWS API Documentation
Request Syntax
response = 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
)
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
[REQUIRED]
The filters to apply to returned user data. You can filter up to the following limits:
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.
A list of up to 100 queues or ARNs.
A filter for the user data based on the contact information that is associated to the user. It contains a list of contact states.
A list of up to 9 contact states.
A list of up to 100 routing profile IDs or ARNs.
A list of up to 100 agent IDs or ARNs.
A UserHierarchyGroup ID or ARN.
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',
'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.
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.
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.
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.
Exceptions
Connect.Client.exceptions.InvalidRequestException
Connect.Client.exceptions.InvalidParameterException
Connect.Client.exceptions.InternalServiceException
Connect.Client.exceptions.ThrottlingException
Connect.Client.exceptions.ResourceNotFoundException