Newer Version Available

This content describes an older version of this product. View Latest

setServicePresenceStatus for Lightning Experience

Sets an agent's presence status to a status with a particular ID. If the specified agent is not already logged in, we log in the agent with the presence status. This method removes the need for you to make more calls.

Arguments

Name Type Description
statusId string The ID of the presence status to which you want to set the agent. Agents must be given access to this presence status through their associated profile or permission set.

Sample Code

Component code:

Controller code:

Response

This method returns a promise that, upon success, resolves to an object containing the following fields.

Name Type Description
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.
channels JSON string of channel objects Returns the IDs and API names of the channels associated with the presence status.