Question


Coforge
IN
Last activity: 23 Jul 2025 1:43 EDT
Opening a insight from custom DX component
We have custom DX component and it contains a link. On click of that link we want to open a insight directly. Any one knows any options? Note: We know we can open the UIPages using OpenPage api using this we can open explore data landing page. but we want to open a specific insight directly
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 23 Jul 2025 1:43 EDT


Coforge
IN
@RameshSangili as i have mentioned in earlier comment in this thread. your suggested code only gets the insights meta data. So not useful. Finally found the solution in Pega undocumented PConnect Actions. Indeed Pega supports opening the insight directly, but they haven't documented it.
/**
* This API performs loading the insight with semantic url.
* <br>
* @example <caption>Example for showInsight()</caption>
* Example usage -
* const showInsight = getPConnect().getActionsApi().showInsight("sample_insightID"); <br>
* showInsight.then(() => {
* // show insight success handling
* }).catch(() => {
* // show insight failure handling
* });
*
* // The success callback is called if the showInsight action is successfully.
*
* @param insightID - Id of the Insight <br>
* For example: "d68f3f66-5ff3-443d-9ef9-544051fb74a4"
*
* @returns A promise associated with the action (and stored in ActionManager)
* @function
* @private
*/
You have simply call showInsight api
@RameshSangili as i have mentioned in earlier comment in this thread. your suggested code only gets the insights meta data. So not useful. Finally found the solution in Pega undocumented PConnect Actions. Indeed Pega supports opening the insight directly, but they haven't documented it.
/**
* This API performs loading the insight with semantic url.
* <br>
* @example <caption>Example for showInsight()</caption>
* Example usage -
* const showInsight = getPConnect().getActionsApi().showInsight("sample_insightID"); <br>
* showInsight.then(() => {
* // show insight success handling
* }).catch(() => {
* // show insight failure handling
* });
*
* // The success callback is called if the showInsight action is successfully.
*
* @param insightID - Id of the Insight <br>
* For example: "d68f3f66-5ff3-443d-9ef9-544051fb74a4"
*
* @returns A promise associated with the action (and stored in ActionManager)
* @function
* @private
*/
You have simply call showInsight api
getPconnect.getActionsAPI.showInsight(insightID: string, options?: {
skipSemanticUrl?: boolean;
}): Promise<object>;


Pegasystems Inc.
CA
This could be feasible with the help of Pega Web Embed to display the landing page inside a DX component. Configure the Landing Page to display the desired Insight according to your requirements.


Coforge
IN
@RameshSangili For this does not require web embed and it creates unnecessary overhead, You can create the landing page with your desired page and use openpage api to lunch the landing page from dx component. OpenPage API: https://docs.pega.com/bundle/pcore-pconnect/page/pcore-pconnect-public-apis/api/openpage-pagename-classname-targetcontext.html But above is not scalable, If we want to open multiple insights directly(populating cards component each corresponding to a insight, on click of them/link) should open the insight.


HCA Healthcare
US
Yes, you can open a specific Insight directly from a custom DX component by creating a deep link using the Insight ID. Each Insight in Pega has a unique ID, and the URL to open it looks like /app/{app-name}/insights/{insight-id}
. In your custom component, you can add a link and on click, use window.location.href
to redirect the user to that Insight. Make sure the user has permission to view that Insight and that the app uses Constellation UI. This is similar to how openPage
works for UI Pages, but here you directly link to the Insight. You can find the Insight ID from Dev Studio or by copying the URL when opening the Insight manually. This allows a smooth user experience from your custom UI to the Insight view.


Coforge
IN
@Sairohith Thanks for replying. This is what we have tried at the end and its called semanticURL. But keep in mind that its like you are moving user from SPA to another website not a good design suggestion wrt SPA, thats why i have created this question to know the alternatives. but not found any
Solution:
const environmentInfo = PCore.getEnvironmentInfo(); const applicationURL = environmentInfo.applicationUrl; <a href="applicationURL/insights/{insight-id}">Open Insight</a> I have checked the insight react code of Pega, it wasn't modular thats why they haven't have PCore api to open the insight directly.


Pegasystems Inc.
CA
Could you please check this article?
Code Snippet:
const insightID = "124e9385-a623-4c55-ba8e-5af8cbd0ae64";
PCore.getAnalyticsUtils().getInsightByID(insightID).then(response => {
console.log(response.data);
}).catch(() => {
...
});
Accepted Solution
Updated: 23 Jul 2025 1:43 EDT


Coforge
IN
@RameshSangili as i have mentioned in earlier comment in this thread. your suggested code only gets the insights meta data. So not useful. Finally found the solution in Pega undocumented PConnect Actions. Indeed Pega supports opening the insight directly, but they haven't documented it.
/**
* This API performs loading the insight with semantic url.
* <br>
* @example <caption>Example for showInsight()</caption>
* Example usage -
* const showInsight = getPConnect().getActionsApi().showInsight("sample_insightID"); <br>
* showInsight.then(() => {
* // show insight success handling
* }).catch(() => {
* // show insight failure handling
* });
*
* // The success callback is called if the showInsight action is successfully.
*
* @param insightID - Id of the Insight <br>
* For example: "d68f3f66-5ff3-443d-9ef9-544051fb74a4"
*
* @returns A promise associated with the action (and stored in ActionManager)
* @function
* @private
*/
You have simply call showInsight api
@RameshSangili as i have mentioned in earlier comment in this thread. your suggested code only gets the insights meta data. So not useful. Finally found the solution in Pega undocumented PConnect Actions. Indeed Pega supports opening the insight directly, but they haven't documented it.
/**
* This API performs loading the insight with semantic url.
* <br>
* @example <caption>Example for showInsight()</caption>
* Example usage -
* const showInsight = getPConnect().getActionsApi().showInsight("sample_insightID"); <br>
* showInsight.then(() => {
* // show insight success handling
* }).catch(() => {
* // show insight failure handling
* });
*
* // The success callback is called if the showInsight action is successfully.
*
* @param insightID - Id of the Insight <br>
* For example: "d68f3f66-5ff3-443d-9ef9-544051fb74a4"
*
* @returns A promise associated with the action (and stored in ActionManager)
* @function
* @private
*/
You have simply call showInsight api
getPconnect.getActionsAPI.showInsight(insightID: string, options?: {
skipSemanticUrl?: boolean;
}): Promise<object>;