SalesforceAdaptiveResultLink Component

In this article

The SalesforceAdaptiveResultLink component uses contextual information to determine which ResultLink component (that is, ConsoleResultLink, SalesforceResultLink, or ResultLink) is most appropriate to open a search result. It then instantiates this component.

Under the hood, the SalesforceAdaptiveResultLink component uses the following matrix to determine which component to instantiate.

Environment Component Local Salesforce object Remote Salesforce object Non-Salesforce and Salesforce Community

Classic Console

Insight Panel (Case record)

SalesforceResultLink

Not Supported

ResultLink

Full Search

SalesforceResultLink

SalesforceResultLink

ResultLink

Lightning Console

Insight Panel (Any record type)

ConsoleResultLink

ResultLink

ResultLink

Full Search

ConsoleResultLink

ResultLink

ResultLink

Lightning App

Insight Panel

SalesforceResultLink

ResultLink

ResultLink

Experience Cloud site

Case Deflection

SalesforceResultLink

ResultLink

ResultLink

Community Search

SalesforceResultLink

ResultLink

ResultLink

Other

Generic Search Page

ResultLink

ResultLink

ResultLink

Options

To reference the SalesforceAdaptiveResultLink component in a custom component, you must specify the following context options to enable the component to perform the appropriate logic.

The browser console will display a warning message whenever a mandatory option is missing.

sfOrganizationId

The Salesforce organization ID. This value is used to determine whether or not a Salesforce result belongs to the current Salesforce organization.

environment

The environment in which the search interface is running.

This option is mandatory.

Available values:

  • classic

  • lightning-app

  • lightning-community

  • lightning-console

  • other

component

The Coveo for Salesforce component that’s hosting the search interface.

This option is mandatory.

Available values:

  • Community_CaseDeflection

  • Community_Search

  • Internal_AttachedResults

  • Internal_FullSearch

  • Internal_InsightPanel

  • other

Methods

This component doesn’t offer any methods.

Usage

Reference it in a Coveo for Salesforce component as follows:

<a class="CoveoSalesforceAdaptiveResultLink"></a>
Example

To use the SalesforceAdaptiveResultLink component in a custom Coveo Insight Panel Lightning Component, you would declare the component as follows in a result template:

<a class="CoveoSalesforceAdaptiveResultLink" data-sf-organization-id="your-salesforce-org-id" data-environment="lightning-console" component="Internal_InsightPanel"></a>