Overview of integrating MCA with different suppliers

Required Components

This integration requires the following components:
  • The Fusion application.
  • The Media toolbar
    • Acts as a placeholder for rendering your CTI application.
    • The URL of the partner CTI application can be configured through Fusion configuration management screen. Once this configuration is set, this URL is rendered in an iFrame in the partner application view.
    • The Media toolbar enables communication between the Fusion application and the CTI supplier
    • The communication between the Fusion application and the partner application is enabled through a JavaScript library which can be used by the partner application.
  • Third party CTI suppliers.
    • You can choose your own supplier for the integration.
While integrating a 3rd party supplier, Fusion CTI provides a library having 2 types of APIs:
  • Actions
  • Events
General steps to execute actions and events APIs:
  • Get the proper context.
  • Create the request object.
  • Call the API.

Actions

You use Action APIs when a partner application wants the Fusion application to perform certain operations. For example, a Partner application notifies the Fusion application to render an incoming call dialog when an incoming call is received, the NewCommEvent action.

A graphic showing the relationship between the Fusion application on the MCA toolbar and third party suppliers.

A graphic showing the relationship between the Fusion application on the MCA toolbar and third party suppliers.

Supported Actions

Action Description
agentStateEvent This action can be fired from the partner application to make the current logged in agent ready to make or accept calls. This will make the phone icon enabled in the Fusion application.
newCommEvent When an incoming call is received from the CTI supplier to the partner application, the newCommEvent action is fired from the partner application to inform the Fusion application about the incoming call. The the Fusion application will render a dialog box with the name and incoming phone number.
startCommEvent When the CTI supplier notifies the partner application that a call is accepted, the partner application should fire the startCommEvent action to inform Fusion application that the call is accepted.
closeCommEvent The partner application can fire this action whenever the call is disconnected from the CTI supplier or from the Fusion application by the agent.
outboundCommErro The partner application can fire this action to notify the Fusion application that an error occurred during initiation of the outbound event.
getConfiguration The partner application can fire this action to get configuration information that enables the toolbar to evaluate the features supported by the Fusion application.
disableFeature Informs the Fusion application that a subset of available functionality must be disabled because the toolbar hasn't implemented it.
readyForOperation Notifies the Fusion application that the toolbar is ready for the operation.

Here's example code showing the firing of actions:

// Step 1: Get the proper context
const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;

// Step 2: Create the request object
const request: IMcaNewCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('<Action Name>');
// Set request object properties

// Step 3: Invoke the API
phoneContext.publish(request).then((res: IOperationResponse) => {
    // response after firing the action
}).catch(() => {
})

Events

Whenever an agent performs an action on the Fusion application, the Fusion application will raise some events through the MCA library and these events can be listened by the partner application.

Use Events APIs whenever the partner application needs to listen to the actions performed by the agent in the Fusion application.

For example, the Fusion application raises an event when an outbound call is begun from the Fusion application – onOutgoingEvent.

A graphic showing theFusion application on the MCA toolbar third party events.

Supported Events

Event Description
onToolbarInteractionCommand

Once a call is received in the Fusion application, the agent can accept, reject or disconnect it. onToolbarInteractionCommand is fired from the Fusion application based on the agent's action (accept, reject or disconnect).

  • accept: onToolbarInteractionCommand is fired with command as accept when the agent accepts the call from the Fusion application.
  • reject: onToolbarInteractionCommand is fired with command as reject when the agent declines the call from the Fusion application.
  • disconnect: onToolbarInteractionCommand is fired with command as disconnect when the agent hangup the call from the Fusion application.
onDataUpdated This event is used to listen to a DataUpdate event that happens in Fusion application.
onOutgoingEvent Whenever an outbound call is started from the Fusion application, this event will gets fired and the partner application can listen to this event and inform the CTI supplier to make the outbound call.

Here's an example of subscribing to any of the events:

// Step 1: Get the proper context
const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;

// Step 2: Create the request object
const request: IMcaEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('<Event Name>');
// Set request object properties

// Step 3: Invoke the API
phoneContext.subscribe(request, (response: IEventResponse) => {
    // subscription response
});