1

Is there a reliable way to get an Agent's current Omni-Channel presence status using APEX?

The UserServicePresence table records some status changes, but notably offline is not a status change that gets stored there.

Incidentally, the code will need to execute in a trigger context, so I don't think there is a way to make use of the Console Toolkit.

3

UserServicePresence is the right place to look. Offline is simply the absence of a status. If there are no UserServicePresence records where IsCurrentState==true, the user is in an offline state.

  • Funny thing, I just got this answer back from SFDC support. In fact, the comments appear to be a copy-paste from your answer and the follow-up date is after your answer was posted. – Mike Ginou Jan 25 '16 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.