Configure a Coveo Insight Panel Lightning Component for Chat (Live Agent)

Pro and Enterprise editions only

Coveo for Salesforce 3 (May 2018)

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

  1. Ensure that you have enabled Chat in your Salesforce organization.

  2. In Salesforce, access your Lightning Service Console, and then open any of your Chat sessions.

  3. At the upper right of the page, click Settings, and then select Edit Page.

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

  5. At the top right, click Save.

  6. Activate the new page, if not already done.

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

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

  7. Now that your page is saved, at the upper right of the page, select Back.

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

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

  1. Create an Automatic Relevance Tuning (ART) model.

    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 the large query expression is populated, and the second optimizes the model when the basic query expression is populated.

    1. For the first association, make sure to activate the Comply with Intelligent Term Detection (ITD) option and add the following condition to this association: Large Query Is populated.
    2. For the second association, make sure to deactivate the Comply with Intelligent Term Detection (ITD) option and add the following condition: When the Large Query Is not populated.

    By default, your Coveo Insight Panel Lightning Component uses the Default query pipeline. However, you should create a specific pipeline for this audience and use a condition based on the Coveo Insight Panel Lightning Component search hub (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. Add a rule overriding the large query (lq) parameter value with the context object. 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.

    1. Click advanced menu, 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 +@>"
        

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

        The LiveAgent_AllVisitorMessages context 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_LastAgentMessage and LiveAgent_AllAgentMessages context values only show agent results.

      2. Click Add with code.

    2. Add a condition to the rule you just created that’s applied when a query is empty. This condition ensures that the context of 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 SearchHub names, typically AgentCase and AgentChat.

      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:

      Query parameter rule

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 context_liveagent_allvisitormessages, context_liveagent_allagentmessages, context_liveagent_lastvisitormessage, or context_liveagent_lastagentmessage