Deep links allow navigation between Pricefx and Enable by enabling URLs that can be added to a Pricefx document (e.g., a Quote). This functionality improves the user experience by allowing direct access to specific location in Enable Rebate Management.
Important Link Parameters
targetPage: Defines the specific page to which the deep link will redirect.
targetPageState: Contains additional parameters (e.g.,
id
) that specify the state of the target page.targetPageTarget (optional): Specifies whether the link opens in the same tab (
"same"
) or a new tab ("new"
). Default is"new"
.AppPages: Represents predefined references for Enable pages in Pricefx Groovy API.
There are two ways to create links:
Using AppPages: If AppPages for the desired link location exist, they can be used to create the link easily.
Manual Link Creation: If AppPages are unavailable, links can be manually created based on predefined /wiki/spaces/PMDEV/pages/5773656124.
Example 1: When AppPages
is Available
The following example shows how to create a deep link to Enable using AppPages:
return [ label: "Settings", //the text displayed for the link targetPage: AppPages.ENABLE_SETTINGS, //Refers to AppPages.ENABLE_SETTINGS, a predefined reference for the Enable settings page targetPageState: [ id: "183" //Specifies additional parameters for the deep link, "id" in this case. ] ]
Example 2: Employing Links Defined in PlatformManager
Creates matrix with links to Enable where the constants are used as a value for the targetPage
parameter.
You can find the link to available constants in the isvConnection_pages
file under Administration > Configuration > System Configuration > Advanced Configuration Options.
def matrix = api.newMatrix( "Trading Program ID", "Program Line Description", "Program Line URL" ) // Set column formats matrix.setColumnFormat("Trading Program ID", FieldFormatType.LINK) matrix.setColumnFormat("Program Line URL", FieldFormatType.LINK) matrix.addRow([ "Trading Program ID": [ label: "Program 123", targetPage: "isvEnableProgramLinesPage", targetPageState: [ id: "123" ], targetPageTarget: "new" // Opens in a new tab ], "Program Line URL": [ label: "View Details", targetPage: "isvEnableProgramLinePage", targetPageState: [ id: "456" ] ] ]) return matrix
You can also define a prefix path parameter value in the URL:
“prefix” placeholder in isvConnection_pages
(Advanced Configuration Options):
Construction of the link via Groovy:
controller.addLink("Earnings", AppPages.ENABLE_EARNINGS + 'WithPrefix', [ id: "183", prefix: 'asd' ])
Result URI: https://uk.trading-programs.enable.com/Client/pfx-integration-dev/Deals/Deals/DealEarnings/183?prefix=asd