InsightsContext

This context enables you to do actions and events insights CCA. For example, Show Insights, Dismiss Insights, Listen to dismiss Insights, Listen to actions in Insights.

You can get the reference to InsightsContext, using getInsightsContext function.

Syntax

Here's the syntax:
getInsightsContext(): Promise<IInsightsContext>;

Here's a Typescript example of get notification context from a record context:

/// <reference path="uiEventsFramework.d.ts"/>
const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'V1'); 
const tabContext: ITabContext = await frameworkProvider.getCurrentBrowserTabContext() as ITabContext;
const recordContext: IRecordContext = await tabContext.getActiveRecord();        
const insightContext: IInsightsContext = await recordContext.getInsightsContext();

Here's a Javascript example of get notification context from a record context:

const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'V1');
const tabContext = await frameworkProvider.getCurrentBrowserTabContext();
const recordContext = await tabContext.getActiveRecord();
const insightContext = await recordContext.getInsightsContext();

Supported Operations

Supported Operations

Operation Name Description Example
ShowInsights Used to show insights. Show Insights
DismissInsights Used to dismiss insights. Dismiss Insights
GetAllInsights Used to get all insights in the select RecordContext. Get All Insights

Supported Events

UEF supports subscribe and getSupportedEvents

Supported Events

Method Name Description Example
Listen Dismiss event Listens to dismiss action of an Insight. Show Insights
Listen Action Trigger event Listens to Action button click triggered in Insights. Listen Action Trigger event with details

Supported Methods

UEF supports publish and getSupportedActions

Supported Methods

Operation Name Description Example
publish Publish an operation insights context. Publish
getSupportedActions Returns actions supported by the context as an array. Get supported actions
getSupportedEvents Returns actions supported by the context of an array. Get supported events