Skip Navigation
Expand
Disable the Chat Transfer
Answer ID 12329   |   Last Review Date 08/02/2022

Is there a way to disable the Chat Transfer Option on BUI for Agents?

Environment:

Agent Browser UI (BUI), B2C Service Chat API, Oracle B2C Service

Issue:

I am unable to manipulate the chat API to disable the transfer button.

Resolution:

The chat API is managed through the

Engagement Panel JavaScript API Developer Guide: hideTransferButton.

A basic extension can be used to handle this functionality. This basic extension will use the IChatAPIInfo to setup the IOracleChatClient object handling.

 

Agent Browser UI Extensibility Framework Developer Guide: IChatAPIInfo


function run_chat_handler() {
  IOracleChatClient.getAgentSession()
    .then((session) => {
    console.log("Got the session");
      console.log(session.getConfig());
      return session.getConfig();
    })
    .then((config) => {
      //hides the transfer button on chats.
      return config.hideTransferButton();
    })
    .catch((ex) => {
      console.log("Failed to get session");
      console.log(ex);
    });
}

ORACLE_SERVICE_CLOUD.extension_loader.load("disableChatTransfer", "1")
.then(function(extensionProvider) {
  extensionProvider.getGlobalContext().then(function(globalContext) {
	globalContext.getChatAPIInfo().then(function(chatAPIInfo) {

	  //Load the chat handler here
	  ORACLE_SERVICE_CLOUD.scriptLoader.loadScript([chatAPIInfo.getChatAPIURL()]).then(() => {
		//Wait for scriptloader to load the script.
		setTimeout(() => {
		  run_chat_handler()
		   }, 5000);

		}
	  )

	}).catch(function(err) {
	  console.log(err)
	});
  });
});
}
 
The sample code in this document or accessed through this document is not certified or supported by Oracle. It is intended for educational or testing purposes only. Use of this sample code implies acceptance of the License Agreement.
File Attachment