function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Basha sk 16Basha sk 16 

How to get the live agent user details ?

Hi,

   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

Thanks
 
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,
Nagendra.P