+ Start a Discussion
Basha sk 16Basha sk 16 

How to get the live agent user details ?


   How to get the live agent user details ?
  i enabled a live agent user checkbox in multiple users but in chatting window one agent create a new case in case details page how ot i achieve that agent related user details

NagendraNagendra (Salesforce Developers) 
Hi Basha,

According to the docs(https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm), the API name of the field is UserPermissionsLiveAgentUser.
Type: boolean

Properties: Create, Filter, Update

Description: Indicates whether the user is enabled to use Live Agent (true) or not (false). Label is Live Agent User.
So in order to get a List of Users who have this ticked, the query you're looking for is:
[SELECT Id, Name FROM User WHERE UserPermissionsLiveAgentUser = true]
Check that you actually have a Contact related to the User. Using your query in the comments below, I was able to successfully get related Contacts.
User-added image

Best Regards,