Initialize UI Events Framework

You must initialize the framework using an application name for any interaction. Once the framework is initialized successfully, you can get the reference to the instance of IUiEventsFrameworkProvider. All the interactions occurring with this object can be tracked with the application name you provide during the initialization.

Here's the syntax:
initialize(applicationName: string, version: string): Promise<IUiEventsFrameworkProvider>;

Here are the parameters:

Parameters

Parameter Name Required? Description
applicationId Yes You must call the initialise function with a unique application ID to use the UI Events Framework. The application ID helps in debugging during testing.
version No

Oracle aims to retain backward compatibility for all releases. If in the future, the framework deprecates some APIs without backward compatibility, you can use this parameter to load older or newer versions of the library. Currently, Version will have the default value as v1. As of this time, you can't set this version value.

Here's an example in Typescript:
/// <reference path="uiEventsFramework.d.ts"/> 
const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID','v1');
Here's an example in Javascript:
const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID','v1');