if you have a ContactID and you need to get the user name that handled the contact. It is a two step process.
First use describeContact with the ContatID https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeContact.html if the contact is handled by an agent, the AgentInfo will have an object in the response with the "Id" which is the agent id but you still do not have the actual user name.
then using the agent id, call DescribeUser https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html then you will get the name of the user and the rest of the user info
To avoid hitting the API limit, best practice is to cache the DescribeUser info into a table like DynamoDB. So you can query DynamoDB to get the username without using the Connect API DescribeUser everytime if this is used a lot.
We can make use of AgentInfo API call. [+] https://docs.aws.amazon.com/connect/latest/APIReference/API_AgentInfo.html
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 3 years ago
- How do I raise the priority of agent to agent or agent to queue transferred calls in Amazon Connect?AWS OFFICIALUpdated 3 years ago
- How can agents in my Amazon Connect contact center transfer contacts directly to another agent who isn't available?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- EXPERTpublished 10 months ago