Newer Version Available
getServicePresenceStatusId for Lightning Experience
Retrieves an agent’s current presence status.
Arguments
| Name | Type | Description |
|---|---|---|
| callback | function | JavaScript method to call when the agent’s presence status is retrieved. |
Sample Code
Component code:
Controller code:
Response
This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties:
| Name | Type | Description |
|---|---|---|
| success | boolean | true if retrieving the presence status ID was successful; false otherwise. |
| statusName | string | The name of the agent’s current presence status. |
| statusApiName | string | The API name of the agent’s current presence status. |
| statusId | string | The ID of the agent’s current presence status. |