Integrating a Coveo Lightning Insight Panel

Pro and Enterprise editions only

Coveo for Salesforce 3 (May 2018)

The Lightning Insight Panel is a search interface meant to be included in the sidebar of your Lightning applications and that suggests contextually relevant information to your agents. This panel is typically used to propose your support agents relevant solutions alongside their cases. However, you can use it with other Salesforce object types (e.g., Account, Opportunity, etc).

It is the Lightning Experience equivalent of the Coveo Classic Insight Panel (see Integrating a Coveo Classic Insight Panel).

This article shows the recommended way of integrating the Coveo Lightning Insight Panel in a Lightning application.


  1. Ensure that you have a Lightning application (e.g., Lightning Service Console, Sales, etc).

  2. Ensure that you have set up a domain name for your organization (see Set Up a My Domain Name).

  3. Ensure that you have installed and configured the Coveo for Salesforce V3 package (see Installing the Coveo for Salesforce Application).

Step 1 - Add the Coveo Lightning Insight Panel Component in Salesforce

When adding a Lightning Insight Panel component, you should always put it at the top right of the page to make it visible. It is recommended to place it beside your record information.

Adding a Lightning Insight Panel to a Record Page

  1. In Salesforce, access your Lightning Application (e.g., Lightning Service Console, Sales), and then open any of your record (e.g., Case, Opportunity, Account).

  2. At the top right of the page, click the cog icon (), and then select Edit Page.

  3. In the Lightning App Builder, drag the Record Detail from the right side of the page to the left side of the page.

  4. Drag and drop the Coveo Insight Panel component to the right side panel.

    Depending on the record page you are modifying, the Lightning Insight Panel may display warnings such as:

     Invalid field definition: Case_Subject

    By default, the component Record Fields value is set to:

     Case_Subject, Case_Description

    In order to perform contextual search, you must specify the fields that are relevant for your specific object type. For instance, with Opportunity, you should set the Record Fields value to:

     Opportunity_Name, Opportunity_Description

    For a more complete list of context fields, see table in Common Context Fields by Object Type.

  5. At the top right, click Save.

  6. If not already done, activate the new page.

    1. Click Assign as Org Default.

      You can make these changes available as default, or edit the assignment rules to only activate this page for specific users or profiles.

    2. Once you are done with the assignment rules, click the Save button.

  7. Now that your page is saved, at the top right of the page, select Back.

  8. Select the Coveo Insight Panel component, and select the Set Up a Search Page button.

  9. Choose the tabs you want to have in your panel, and select Create Page. You can always change the tabs later.

  10. Repeat these steps for the other Coveo component in your right side panel.

Common Context Fields by Object Type

The following table provides examples of fields that are useful to contextualize search. The Record fields column indicates the value to set depending on the object type.

Object type Record fields
Account Account_Description
Case Case_Subject, Case_Description
Opportunity Opportunity_Name, Opportunity_Description

Step 2 - Configure Your Lightning Insight Panel Component in Coveo Cloud

  1. In your Coveo Cloud Administration Console (see Logging in to Coveo Cloud V2), select the query pipeline used by your Insight Panel and access the query pipeline Query Parameters (see Adding and Managing Query Pipeline Query Parameters).

    By default, your Insight Panel uses the Default pipeline .

  2. Note the name of your query pipeline, as you will need it later.

  3. In the Machine Learning tab, add an Automatic Relevance Tuning (ART) model with the Enable Intelligent Term Detection (ITD) option selected (see Activating Machine Learning Intelligent Term Detection (ITD) in Salesforce).

  4. In the Query Parameters tab, add a rule overriding the large query (lq) parameter value:

    1. Click Add Rule, and then select Query Parameters With Code.

      1. In the Add a Rule With Code dialog, in the form editor box, enter a rule that uses the record fields defined earlier.

        For example, if the record fields are: Case_Subject and Case_Description, then the rule will look like this:

        override query lq:"<@+ $context.Case_Subject $context.Case_Description +@>"
      2. Click Add Rule.

    2. In the Action bar, click More, and then select Select condition.

    3. Add a Condition that is applied when an empty query is performed (see Create a Condition).

  5. Your Query Parameters tab should now look like this:

Depending on your use case, you must add the custom dimensions to make the search and click events metadata available in your usage analytics reports (see Adding and Managing Dimensions on Custom Metadata).

Most of the time, it would make sense to add dimensions that match the record fields. If those fields are Case_Subject and Case_Description, the dimension names would be respectively context_case_subject and context_case_description.

What’s Next?

If you are integrating the Coveo Lightning Insight Panel in a Case record page, see Configuring a Coveo Lightning Insight Panel for Cases.

With the option panel, you can:

You can also:

Recommended Articles