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 Component
- Integrating a Coveo Recommendation Component
- Accessing the Coveo for Salesforce Interface Editor
- Integrate a Coveo VisitorIdAccessor Lightning Component
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.
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 My Domain).
Ensure that you have installed and configured the Coveo for Salesforce V3 or later 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 Setup , 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
If you don’t use a Coveo ML ART model, you can configure the Partial Match feature as a fallback solution.
Associate the ART model with the query pipeline used by your Coveo Insight Panel Lightning Component.
Ensure to select the Comply with Intelligent Term Detection (ITD) check box when associating the model.
- On the Query Pipelines page, click the query pipeline used by your Coveo Insight Panel Lightning Component, and then click Edit components in the Action bar.
- On the subpage that opens, select the Advanced tab, and then click Query parameters on the left side of the page.
Add a rule overriding the large query (lq) parameter value with the
contextobject. This rule allows the Coveo Insight Panel Lightning Component to display items that are relevant to the current Salesforce object before a query is sent.
Click , and then select Add query parameters rule with code.
On the Add a Rule With Code subpage, enter a rule that uses the record fields defined in Step 1.
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 with code.
Add a condition to the rule you just created that’s applied when a query is empty. This condition ensures that the
contextof the current Salesforce object will only apply to the automatic queries that are made by the Coveo Insight Panel Lightning Component.
Your Query Parameters rule should now look like this:
Depending on your use case, you must add 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 the options covered in this section.
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.
Excluding Custom Actions
An exclusion filter to hide custom actions (based on
value) from the User Activity Timeline.
In some cases, you may want to exclude custom actions that provide no value from being displayed in the User Activity Timeline (e.g., if they’re too numerous or don’t have relevant metadata).
Uses the format
value1, value2, value3.
The filter’s default values are
ticket_create_start, ticket_field_update, ticket_next_stage, ticket_classification_click because they don’t display relevant or valuable data for the agent.
Optimize the Coveo Insight Panel Lightning Component Configuration for Cases
The Coveo Insight Panel Lightning Component offers some functionalities that are specific to the Case object type. You should perform this additional step to get the best of the component.
Since the case you’re currently working on doesn’t need to appear in your results, you can filter it out by following these steps:
On the Case page, click Setup and then select Edit Page.
After clicking anywhere in the Coveo Insight Panel Lightning Component, in the Record Fields, add
In your Coveo Administration Console, in the Filters tab, click Add Rule.
On the Add a Filter Rule page, under Query parameter, select cq (constant query)
Under Query Filter, add the following code:
Click Add Rule.