08-16-2022 03:36 PM
i.e. if I start my app and subscribe to agent webhooks I don't know what state they are in, listing all activities from /v1/agents/activities doesn't seem very usable as I don't know how far back I need to go
Solved! Go to Solution.
12-16-2022 12:55 PM - edited 12-16-2022 01:01 PM
This has since been fixed - using AgentSession is the way to get the latest states.
Along with isActive
isActive
08-18-2022 09:13 PM
thanks, I can get results if I leave state out, but this still requires the agent to have a state change within this from-to period?
08-19-2022 06:27 AM
08-18-2022 11:09 AM - edited 12-16-2022 12:55 PM
Today there are a few unfinished items in the below API for agentSession, as it is still early beta - however you should be able to
curl --location --request POST 'https://api.wxcc-us1.cisco.com/search?orgId=1c71287f-2f41-458b-b101-c4e616123554' \
--header 'Authorization: Bearer yourToken' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"{\n # Agent Session \"All Fields\" example - Gets all the Agent Session fields - All fields in the ASR\n agentSession(from: 1658965592151, to: 1660845638003, \n filter: {isActive: {equals: true}}) {\n agentSessions {\n agentId\n userLoginId\n agentName\n agentSessionId\n isActive\n startTime\n endTime\n teamId\n teamName\n siteId\n siteName\n channelInfo {\n totalDuration\n channelId\n agentToAgentTransferCount\n agentTransferToQueueRequestCount\n availableCount\n blindTransferCount\n channelId\n channelType\n connectedCount\n consultAnswerCount\n consultAnswerDuration\n consultRequestCount\n consultRequestDuration\n consultToQueueAnswerCount\n consultToQueueAnswerDuration\n consultToQueueCount\n consultToQueueDuration\n consultToQueueRequestCount\n consultToQueueRequestDuration\n disconnectedCount\n disconnectedHoldCallsCount\n holdCount\n holdDuration\n idleCount\n idleDuration\n notRespondedCount\n notRespondedDuration\n outdialAgentToAgentTransferCount\n agentTransferToQueueRequestCount\n outdialBlindTransferCount\n outdialConferenceCount\n outdialConferenceDuration\n outdialConnectedCount\n outdialConnectedDuration\n outdialConsultAnswerCount\n outdialConsultAnswerDuration\n outdialConsultCount\n outdialConsultDuration\n outdialConsultRequestCount\n outdialConsultRequestDuration\n outdialCount\n outdialConsultToQueueAnswerCount\n outdialConsultToQueueAnswerDuration\n outdialConsultToQueueRequestCount\n outdialConsultToQueueRequestDuration\n outdialHoldCount\n outdialHoldDuration\n outdialNotRespondedCount\n outdialNotRespondedDuration\n outdialRingingCount\n outdialRingingDuration\n outdialTransferCount\n outdialWrapupCount\n outdialWrapupDuration\n ringingCount\n ringingDuration\n subChannelType\n availableDuration\n conferenceDuration\n connectedDuration\n consultAnswerDuration\n consultDuration\n consultRequestDuration\n consultToQueueAnswerDuration\n consultToQueueDuration\n consultToQueueRequestDuration\n holdDuration\n idleDuration\n notRespondedDuration\n outdialConferenceDuration\n outdialConnectedDuration\n outdialConsultAnswerDuration\n outdialConsultDuration\n outdialConsultRequestDuration\n outdialConsultToQueueAnswerDuration\n outdialConsultToQueueRequestDuration\n outdialHoldDuration\n outdialNotRespondedDuration\n outdialRingingDuration\n outdialWrapupDuration\n ringingDuration\n wrapupDuration\n transferCount\n wrapupCount\n }\n }\n }\n}","variables":{}}'
12-16-2022 12:55 PM - edited 12-16-2022 01:01 PM
This has since been fixed - using AgentSession is the way to get the latest states.
Along with isActive
isActive
08-17-2022 05:28 AM
Is there a reason you couldn't use an analyzer report for this? Is there a business case where you need to look at it directly vs. the GUI for instance?
08-17-2022 01:11 PM
we are developing wallboards with queue & agent stats that go on TV's etc
08-16-2022 06:30 PM
Wouldn't this be better handled by a subscription to events? You will still not know their state, but over time you'll get everyone's current state.
david
08-16-2022 07:56 PM
yeah, I do that, but it can take hours or days if the agent has no new events, and if I i.e. restart my app or it's offline for maintenance I may miss events and agents may be reported incorrectly
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide