Oracle B2C Service continues to add helpful features for agents that handle live chats within the Browser UI (BUI). This article provides information about how to configure the chat “wrap-up” button, so it triggers a workspace rule. The Agent Browser UI Extensibility Framework API allows you to write JavaScript code to read and write data to contact, incident, organization, task, and custom object records, and to create UI mashups. By allowing tighter integrations, browser extensibility provides a more unified agent experience.
The example use case provided here includes:
- The Engagement Panel API event “Concluded”
- A sample Workspace Rule which includes the Interaction Workspace event “InteractionEvent”
- And, sample code for the BUI Extension
What is the “Concluded” event?
Given an agent is handling a live chat within the BUI, when the wrap-up button is clicked, then the ‘Concluded’ event is available. And the ‘Concluded’ event can be utilized within an extension to add custom logic as part of the wrap-up process. The ‘Concluded’ event is part of the Engagement Panel API, refer to this documentation for more information.
Is there a sample workspace rule?
When an agent is handling a live chat, and clicks the wrap-up button, then a workspace rule fires, and a dialog box displays within the Interaction Workspace. In our sample code below, the named event that triggers the message box in the Interaction Workspace is the InteractionEvent. The sample name we have provided (InteractionEvent) can be replaced with an event name of your choosing, feel free to choose a name that works best for your implementation. The action can also be customized from the options available in the “Then Actions” section of the workspace rules editor.
This is an example of the workspace rule that is defined in the Rules editor in the Interaction Workspace:

This is an example of the agent’s experience on chat wrap-up:

Is there sample code for the BUI extension?
This sample BUI extension code uses the “Concluded” event and triggers the named event (InteractionEvent in this example):
IOracleChatClient.getAgentSession().then((as) => {
// get the engagement. Engagement can also be obtained from engagementAccepted callback
return as.getCurrentEngagement();
})
.then((engagement) => {
return engagement.concluded() => {
console.log("Engagement has been concluded.");
// fetch the workspace record
extensionProvider.registerWorkspaceExtension(function(workspaceRecord){
// get the current workspace record
var currentWorkspaceObj = workspaceRecord.getCurrentWorkspace();
// make sure the workspace type is Interaction
if (currentWorkspaceObj.objectType === 'Interaction') {
// Trigger the workspace event
workspaceRecord.triggerNamedEvent('InteractionEvent');
}
});
})
})
.catch((error) => {
console.log("Error ... " + error);
});
This sample code triggers the named event ‘InteractionEvent’, which then executes according to the workspace rule we created on the interaction workspace. With this approach we can customize the wrap-up behaviour by executing workspace rules.
Helpful Resources:
Agent Browser UI Extensibility Framework Developer Guide:
https://documentation.custhelp.com/euf/assets/devdocs/unversioned/BUI_Extensibility/topicrefs/Workspace_functions.html
Engagement Panel JavaScript API Developer Guide:
https://documentation.custhelp.com/euf/assets/devdocs/unversioned/Engagement_Panel/topicrefs/c_eng_Concluded.html
