- Integrating a Coveo Insight Panel Lightning Component
Configuring a Coveo Insight Panel Lightning Component for Chat (Live Agent)
To configure the Coveo Insight Panel Lightning Component for Chat (formerly Live Agent), follow the instructions provided in this article.
Step 1: Add the Coveo Insight Panel Lightning Component to a Chat Page in Salesforce
Ensure that you have enabled Chat in your Salesforce organization.
In Salesforce, access your Lightning Service Console, and then open any of your Chat sessions.
At the top right of the page, click , and then select Edit Page.
In the Lightning App Builder, on the Live Chat Transcript Record Page, drag and drop the Coveo Insight Panel component to the right side panel.
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.
In the Coveo Insight Panel component, click Set Up a Search Page.
Choose the tabs that you want to have in your panel, and then select Create Page. You can always change the tabs later.
You should now have a functional Coveo Insight Panel Lightning Component.
Step 2: Configure the Coveo Insight Panel Lightning Component for Chat
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 the following rule:
override query lq:"<@+ $context.LiveAgent_AllVisitorMessages +@>"
The context can either be
LiveAgent_AllVisitorMessagescontext value provides all the customers messages and context from which Coveo Machine Learning can identify relevant keywords. With
LiveAgent_LastVisitorMessage, the previous messages context values are excluded. The
LiveAgent_AllAgentMessagescontext values only show agent results.
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.
You can use the same query pipeline for both of your Case and Chat pages, but you have to enter different
Ensure that, when adding the overriding rules in your Query Parameters for each Coveo Insight Panel Lightning Component, you create a condition
Search hub is [SearchHub name]for each Search hub.
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).
For a Chat Page, add