how to check which supervisor has forcefully changed the user status in amazon connect

0

Hello , Can someone please help me to identify how we can check which supervisor or user has changed the agent status forcefully . ?

agent was logged in to available status and his was made offline automatically by someone .

2개 답변
0

Hi Aj,

I know you said the agent was logged in, but just in case, be aware of Amazon Connect Now automatically changes Agent Status to Offline on Logout.

As explained in Logging Amazon Connect API calls with AWS CloudTrail, Amazon Connect is integrated with AWS CloudTrail, a service that provides a record of the Amazon Connect API calls that a user, role, or AWS service makes.

However, as the doc shows, "When you create or update hours of operation, flow, phone number, user hierarchy, agent status, and prompt resources, CloudTrail only logs those events if you use the CLI or public APIs to make the changes.", meaning that if someone made the change to offline in the Connect Real-time Metrics console, the event will not be logged AFAIK.

If the change was made using the CLI or public API, then you can query CloudTrail to see who and when the agent status was updated. The api call to change the agent status is PutUserStatus.

Querying AWS CloudTrail logs covers the basics of how to query CloudTrail logs. If you haven't queried them before, you'll first need to create an Athena table as the linked doc describes. The doc also talks about using CloudTrail Lake as a better alternative.

Here is an example I ran. I have an agent named JoeAgent who is logged in and "Available". Changing his status in the Connect console does not result in any event being logged in CloudTrail.

If I execute the following using the CLI:

# Get Connect Instance ID
export INSTANCE_ID=$(
  aws connect list-instances \
    --output text \
    --query 'InstanceSummaryList[*].Id'
)

# Get Joe Agent's user ID
export AGENT_ID=$(
  aws connect search-users \
    --instance-id $INSTANCE_ID \
    --search-criteria '{"StringCondition":{"FieldName":"username", "Value": "joeAgent","ComparisonType":"EXACT"}}' \
    --output text \
    --query 'Users[*].Id'
)

# Get ID of 'Available' agent status
export AVAILABLE_ID=$(
  aws connect list-agent-statuses \
    --instance-id $INSTANCE_ID \
    --output text \
    --query 'AgentStatusSummaryList[?Name==`Available`].Id'
)

# Get ID of 'Offline' agent status
export OFFLINE_ID=$(
  aws connect list-agent-statuses \
    --instance-id $INSTANCE_ID \
    --output text \
    --query 'AgentStatusSummaryList[?Name==`Offline`].Id'
)

# Change Joe Agent's status to Offline
aws connect put-user-status \
  --instance-id $INSTANCE_ID \
  --user-id $AGENT_ID \
  --agent-status-id $OFFLINE_ID

When I run the following Athena query:

Enter image description here

I then see the following in Athena results (top) or if I search in CloudTrail Event History directly (bottom)

Enter image description here

AWS
Scott_K
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
profile picture
전문가
검토됨 한 달 전
0

Thank you very much Scott for the details and insights .

Aj
답변함 한 달 전

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

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

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

관련 콘텐츠