Configure a Coveo Insight Panel Lightning Component for Chat (Live Agent)
Configure a Coveo Insight Panel Lightning Component for Chat (Live Agent)
This article describes how to configure the Coveo Insight Panel Lightning Component for Chat (formerly Live Agent).
Step 1: Add the Coveo Insight Panel Lightning Component to a Chat page in Salesforce
-
Make sure you’ve enabled Chat in your Salesforce organization.
-
Access the Lightning Service Console, and then open an existing Chat session.
-
In the upper-right corner of the page, click , and then select Edit Page.
-
In the Lightning App Builder, on the Live Chat Transcript Record Page, drag the Coveo Insight Panel component to the panel on the right, and then click Save.
-
If the new page isn’t already activated, activate it.
-
Click Assign as Org Default.
NoteYou can make these changes available as the default or edit the assignment rules to activate this page only for specific users or profiles.
-
Once you’re done with the assignment rules, click Save.
-
-
In the upper-right corner of the page, click Back.
-
In the Coveo Insight Panel component, click Set Up a Search Page.
-
Select the tabs that you want to include in your panel, and then click Create Page. You can always modify the tabs later.
Step 2: Configure the Coveo Insight Panel Lightning Component for Chat
-
Create a Coveo Machine Learning (Coveo ML) Automatic Relevance Tuning (ART) model.
NoteIf 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.
We recommend associating the model twice. The first association aims at optimizing the model when a large query expression (
lq
) is populated, while the second aims at optimizing the model when a basic query expression (q
) is populated.-
For the first association, enable the Comply with Intelligent Term Detection (ITD) option, and then add the following condition:
Large Query Is populated
. -
For the second association, disable the Comply with Intelligent Term Detection (ITD) option, and then add the following condition:
Large Query Is not populated
.
TipBy default, the Coveo Insight Panel Lightning Component uses the Default query pipeline. However, we recommend creating a specific pipeline for this audience and using a condition based on the Coveo Insight Panel Lightning Component searchHub (see Set the search hub).
-
-
On the Query Pipelines (platform-ca | platform-eu | platform-au) 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.
-
On the Query Parameters tab, add a rule overriding the large query expression (lq) parameter value with the
context
object. This rule lets the Coveo Insight Panel Lightning Component display items 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 +@>"
NoteThe context can either be
LiveAgent_LastVisitorMessage
,LiveAgent_LastAgentMessage
,LiveAgent_AllVisitorMessages
, orLiveAgent_AllAgentMessages
.The
LiveAgent_AllVisitorMessages
context value provides all the customer messages and context, allowing Coveo Machine Learning to identify relevant keywords. WithLiveAgent_LastVisitorMessage
, the context values of previous messages are excluded. TheLiveAgent_LastAgentMessage
andLiveAgent_AllAgentMessages
context values show only agent results. -
Click Add with code.
-
-
Add a condition to the rule you just created. This condition is applied when a query is empty. It ensures that the
context
of the current Salesforce object will only apply to the automatic queries made by the Coveo Insight Panel Lightning Component.Leading practiceYou can use the same query pipeline for both of your Case and Chat pages, but you have to enter different
SearchHub
names, typicallyAgentCase
andAgentChat
.When adding the overriding rules in your Query Parameters for each Coveo Insight Panel Lightning Component, create a condition
Search hub is [SearchHub name]
for each search hub.Your Query Parameters rule should now look like this:
NoteDepending on your use case, you may need to 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
context_liveagent_allvisitormessages
,context_liveagent_allagentmessages
,context_liveagent_lastvisitormessage
, orcontext_liveagent_lastagentmessage
.
-