Configure the AgentWork Connector API
Bring Your Own Channel for CCaaS introduces the AgentWork Connector API class object and the onAgentWork Connector API method. AgentWork is a Salesforce object that automatically gets created when the routing system finds a potential agent to handle the work item. It contains information about the work item and the routing status. AgentWork goes through different routing lifecycle stages in Salesforce. Whenever a work item routing status changes, such as when the work item is accepted, assigned, declined, closed, or completed, the partner system is notified of these changes via the onAgentWorkEvent(agentWork) method. AgentWork displays information about the agentWork object that’s passed in to the onAgentWork API.
See the vendor-sdk.js file in GitHub for a sample implementation of the AgentWork Connector API.
The agentWork payload contains the following values:
-
workEvent
- The type of AgentWork event. Possible event type values from WORK_EVENT include: ACCEPTED, ASSIGNED, DECLINED, CLOSED, and COMPLETED. -
workId
- The unique ID of the AgentWork record. -
workItemId
- The unique ID of the associated MessagingSession record.The AgentWork Connector API is only available for Bring Your Own Channel for CCaaS. To configure voice-related agent work events, use the Connector API to configure the Voice Connector API methods, such as acceptCall, declineCall, decline.
See Also
- Service Cloud Voice for Partner Telephony Developer Guide: AgentWork