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

  1. Make sure you’ve enabled Chat in your Salesforce organization.

  2. Access the Lightning Service Console, and then open an existing Chat session.

  3. In the upper-right corner of the page, click Settings, and then select Edit Page.

  4. 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.

  5. If the new page isn’t already activated, activate it.

    1. Click Assign as Org Default.

      Note

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

    2. Once you’re done with the assignment rules, click Save.

  6. In the upper-right corner of the page, click Back.

  7. In the Coveo Insight Panel component, click Set Up a Search Page.

  8. 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

  1. Create a Coveo Machine Learning (Coveo ML) Automatic Relevance Tuning (ART) model.

    Note

    If you don’t use a Coveo ML ART model, you can configure the partial match feature as a fallback solution.

  2. 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.

    1. For the first association, enable the Comply with Intelligent Term Detection (ITD) option, and then add the following condition: Large Query Is populated.

    2. For the second association, disable the Comply with Intelligent Term Detection (ITD) option, and then add the following condition: Large Query Is not populated.

    Tip
    Tip

    By 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).

  3. 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.

  4. On the subpage that opens, select the Advanced tab, and then click Query parameters on the left side of the page.

  5. 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.

    1. Click dots, and then select Add query parameters rule with code.

      1. On the Add a Rule With Code subpage, enter the following rule:

        override query lq:"<@+ $context.LiveAgent_AllVisitorMessages +@>"
        Note

        The context can either be LiveAgent_LastVisitorMessage, LiveAgent_LastAgentMessage, LiveAgent_AllVisitorMessages, or LiveAgent_AllAgentMessages.

        The LiveAgent_AllVisitorMessages context value provides all the customer messages and context, allowing Coveo Machine Learning to identify relevant keywords. With LiveAgent_LastVisitorMessage, the context values of previous messages are excluded. The LiveAgent_LastAgentMessage and LiveAgent_AllAgentMessages context values show only agent results.

      2. Click Add with code.

    2. 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.

      Tip
      Leading practice

      You can use the same query pipeline for both of your Case and Chat pages, but you have to enter different SearchHub names, typically AgentCase and AgentChat.

      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:

      Query parameter rule | Coveo for Salesforce
      Note

      Depending 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, or context_liveagent_lastagentmessage.