Inserting Coveo Components
- Integrating a Coveo Full Search Page
- Integrating a Coveo Insight Panel Lightning Component
- Integrating a Coveo Case Deflection Component
- Integrating Coveo in a Lightning Community
- Integrating a Coveo Insight Panel Classic Component
- Integrating a Case Creation Page
- Integrating a Coveo Recommendation Component
- Accessing the Coveo for Salesforce Interface Editor
Integrating a Coveo Insight Panel Lightning Component
The Coveo Insight Panel Lightning Component is a search interface that’s meant to be included in the sidebar of your Lightning applications. This panel is typically used to propose contextually relevant information to your support agents alongside their cases. However, you can also use it with other Salesforce object types (e.g., Account, Opportunity, etc).
It’s the Lightning Experience equivalent of the Coveo Insight Panel Classic Component (see Integrating a Coveo Insight Panel Classic Component).
This article shows the recommended way of integrating the Coveo Insight Panel Lightning Component in a Lightning application.
Ensure that you have a Lightning application (e.g., Lightning Service Console, Sales, etc).
Ensure that you have set up a domain name for your organization (see Set Up a My Domain Name).
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 Insight Panel Lightning Component in Salesforce
Adding a Coveo Insight Panel Lightning Component to a Record Page
In Salesforce, access your Lightning Application (e.g., Lightning Service Console, Sales), and then open any record (e.g., Case, Opportunity, Account).
At the top right of the page, click Settings , and then select Edit Page.
In your record page, ensure you have the Record Detail Lightning component. The Record Detail component should be placed in the left side of the page.
For an optimal page configuration, you should use the Pinned Left Sidebar Lightning page layout for your record pages. This layout allows your agents to see the record details while they perform other actions such as using the Coveo Insight Panel Lightning Component or drafting a knowledge article.
Drag and drop the Coveo Insight Panel component to the right side panel (beside the Record Detail component).
Depending on the record page you’re modifying, the Coveo Insight Panel Lightning Component may display warnings such as:
Invalid field definition: Case_Subject
By default, the component Record Fields value is set to:
In order to perform contextual search, you must specify the fields that are relevant for your specific object type. For example, with Opportunity, you should set the Record Fields value to:
For more information on adding object context on a search interface in Salesforce Lightning, see Adding Object Context.
At the top right, click Save.
Activate the new page, if not already done.
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.
Once you’re done with the assignment rules, click Save.
Now that your page is saved, at the top right of the page, select Back.
Select the Coveo Insight Panel component, and click Set Up a Search Page.
Choose the tabs you want to have in your panel, and select Create Page. You can always change the tabs later.
Step 2: Configure Your Coveo Insight Panel Lightning Component in Coveo Cloud
On the Query Pipelines page of the Coveo Administration Console, select the query pipeline used by your Coveo Insight Panel Lightning Component and access the query pipeline Query Parameters tab (see Manage Query Parameter Rules).
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).
In the Query Parameters tab, add a rule overriding the large query (lq) parameter value with the
context. This rule allows the Coveo Insight Panel Lightning Component to display items that are relevant to the current Salesforce object before a query has been sent.
Click Add Rule, and then select Query Parameters With Code.
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_Description, then the rule will look like this:
override query lq:"<@+ $context.Case_Subject $context.Case_Description +@>"
Click Add Rule.
In the Action bar, click More, and then select Select condition.
Add a Condition that’s applied when an empty query is performed (see Create a Condition). This condition implies that the
contextof the current Salesforce object only applies to empty queries, which allows a less restricted search experience for your agents.
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 Manage 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_Description, the dimension names would be respectively
Step 3: Customize the Coveo Insight Panel Lightning Component Options
After having created your Coveo Insight Panel Lightning Component, you may want to customize some of its options. This article explains the different options of the Coveo Insight Panel Lightning Component.
Changing the Name of the Component
The name of the Visualforce component to use as your search interface for the component.
If that component doesn’t exist in your organization, you will be prompted to create it.
The default value is
Modifying the Search Hub
The name of the search hub to enforce when authenticating a query with this search token, which can also be used in query pipeline condition statements.
Adding Record Fields
The record fields to send with every query to be used in query pipeline rules.
This option expects a comma-separated list of Salesforce field names.
By default, the
Case_Description fields are used.
Description fields are used by default, you may want to declare other fields to better contextualize the search experience.
You can easily find the formatted field names in your Salesforce organization through the Object Manager. Access the desired object, and then select the Fields & Relationships tab.
In the Fields & Relationships tab, use the format of the desired field as written in the Field Name column.
To declare the field, you must prefix the field name by the name of the object as follows:
Where you replace:
<OBJECT_NAME> with the name of the object
<FIELD_NAME> with the name of the field as written in the Field Name column.
Modifying the Full Search Component Name
The name of the Visualforce component that should open when clicking Full Search.
The value for this option should follow the
When empty, the default search page is used.
This option is empty by default.
Adding the Debug Mode
Whether to load the non-minified versions of the resources. This enables more logging, and should only be used when troubleshooting the custom code in your component.
By default, this option is unchecked.
If you’re integrating the Coveo Insight Panel Lightning Component in a Case record page, see Configuring a Coveo Insight Panel Lightning Component for Cases.
With the option panel, you can:
You can also: