Two-Way Rep Status Syncing
Rep status (that is, rep presence) can be changed from the Omni-Channel widget, which sends status information to the partner connector. We added the ability to change the rep status from the connector, which passes status information back to Salesforce.
For example, a telephony partner system can have scheduled time breaks for the reps where the partner wants to change the rep status in Omni accordingly. If a rep is on a call, status change is ignored and doesn’t have any impact. In order to support complete two-way syncing of the status between Omni and the telephony system, the telephony system must persist a table with mapping between the Salesforce status ID and the partner status.
When the connector loads, the init() API is called, and the argument callCenterConfig contains a JSON field called userPresenceStatuses that can be parsed into a map of statusId: statusInfo. For example:
The statusId 0 is reserved for the Offline status. Other statusIDs represent Salesforce Omni-Channel presence statuses that are available for the user.
The statusInfo fields are:
statusName: The name of the status.hasChannels:falseindicates that the status is busy or offline.trueindicates that it’s routable by a channel.isOffline:trueindicates that it’s an offline status (with statusId 0).statusId: Salesforce status ID
In order to invoke the status change from the connector, call publishEvent() with the event SET_AGENT_STATUS and the required status ID. For example:
To change the status to offline:
See setAgentStatus() for information on how to update the vendor rep status when the Omni-Channel status changes.
See Also