Newer Version Available

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

Methods for Omni-Channel Console Events

JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. In addition to the standard methods for console events, there are a few events that are specific to Omni-Channel.

Omni-Channel Console Events

Event Description Payload
sforce.console.ConsoleEvent.​PRESENCE.LOGIN_SUCCESS Fired when a Omni-Channel user logs into Omni-Channel successfully.

Available in API version 32.0 or later.

  • statusId—the ID of the agent’s current presence status
sforce.console.ConsoleEvent.​PRESENCE.STATUS_CHANGED Fired when a user changes his or her presence status.

Available in API version 32.0 or later.

  • statusId—the ID of the agent’s current presence status
  • channels—an array of channel objects
sforce.console.ConsoleEvent.​PRESENCE.SFDC_LOGOUT Fired when a user logs out of Omni-Channel.

Available in API version 32.0 or later.

None
sforce.console.ConsoleEvent.​PRESENCE.WORK_ASSIGNED Fired when a user is assigned a new work item.

Available in API version 32.0 or later.

  • workItemId—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a workId when it’s assigned to an agent.
  • workId—the ID of a work assignment that’s routed to an agent.
sforce.console.ConsoleEvent.​PRESENCE.WORK_ACCEPTED Fired when a user accepts a work assignment, or when a work assignment is automatically accepted.

Available in API version 32.0 or later.

  • workItemId—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a workId when it’s assigned to an agent.
  • workId—the ID of a work assignment that’s routed to an agent.
sforce.console.ConsoleEvent.​PRESENCE.WORK_DECLINED Fired when a user declines a work assignment.

Available in API version 32.0 or later.

  • workItemId—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a workId when it’s assigned to an agent.
  • workId—the ID of a work assignment that’s routed to an agent.
sforce.console.ConsoleEvent.​PRESENCE.WORK_CLOSED Fired when a user closes a tab in the console that’s associated with a work item. When the tab for that work item is closed, the status of the Omni-Channel object associated with it automatically changes to “Closed.”

Available in API version 32.0 or later.

  • workItemId —the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a workId when it’s assigned to an agent.
  • workId — the ID of a work assignment that’s routed to an agent.

channel

The channel object contains the following functions:

Name Type Description
channelId function Retrieves the ID of a service channel that’s associated with a presence status.
getDeveloperName function Retrieves the developer name of the the service channel that’s associated with the channelId.