onOutgoingEvent
This event is used to listen to an outgoing communication event that generates from Fusion application application.
This is a non controllable event. Using this listener CTI can wire up the logic to start a call, for example, to call the UEF NewComm API, based on the information in the event response of this event.
Example Use Case
Agent clicking on a Contact mobile number link from Fusion application application from Service Request Edit page, or agent clicking a mobile link of a Contact from Digital Sales Contact page. These actions will trigger the OnOutgoingEvent and the CTI application will get the notification if it has added a subscription for this event.
Here's a Typescript example for adding subscription for onOutgoingEvent event.
/// <reference path="uiEventsFramework.d.ts"/>
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
const request: IMcaEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('onOutgoingEvent') as IMcaEventRequest;
request.setAppClassification('_appClassfication');
phoneContext.subscribe(request, (response: IEventResponse) => {
const dataUpdateResponse = response as IMcaonOutgoingEventResponse;
const data: IMcaOnOutgoingEventData = dataUpdateResponse.getResponseData();
// Custom Code
});
Here's a JavaScript example adding subscription for adding subscription for onOutgoingEvent event.
const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const multiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
const phoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE');
const request = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('onOutgoingEvent');
request.setAppClassification('_appClassfication');
phoneContext.subscribe(request, (response) => {
const dataUpdateResponse = response;
const data = dataUpdateResponse.getResponseData();
// Custom Code
});