How to get agent details for any particular contact in Amazon Connect using Amazon Connect SDK for Javascript?

0

Building a lambda that fetches the agent details like Agent Name, Id for any particular contact ID in Amazon Connect using the aws-sdk-javascript

2개 답변
1

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.

profile pictureAWS
답변함 일 년 전
  • This works. Do you know if there are any other APIs that can extract details like: Connect to agent timestamp ACW (start, end, duration) Interaction duration

  • DescribeContact will get you "ConnectedToAgentTimestamp" but not ACW start/stop, which need the actual CTR to get, as well as interaction duration

-2

Hello!

We can make use of AgentInfo API call. [+] https://docs.aws.amazon.com/connect/latest/APIReference/API_AgentInfo.html

Thank you!

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠