I have a requirement to get the list of online agents with available capacity. I could get the online agent list by querying UserServicePresence, But I can't figure out how to get the current available capacity (not the maximum capacity).
I tried querying
AgentWork, but that doesn't feel like the right way to do it.
Incidentally, the code will need to execute in a batch context, so I don't think there is a way to make use of the
Console Toolkit or