Adding a Contextual Query to the Insight Panel V2 with the Legacy Interface Editor

Coveo for Salesforce 2.26 - July 2016  The July 2016 release of Coveo for Salesforce introduced the new JavaScript Search Interface Editor. When using the new JavaScript Search Interface Editor, see Adding a Contextual Query to the Insight Panel V2.

The out-of-the-box Insight Panel (see Creating a Coveo for Salesforce V2 Insight Panel) provides search result that are relevant to the Salesforce case being reviewed, based on basic case fields such as the Subject. You can improve the search result relevance by adding a custom contextual query to your Insight Panel.

Your cases feature a Product field for which customers must select a value when entering a case. You can add a contextual query to your Insight Panel, automatically including the product specified for the case in the query, ensuring the Insight Panel search results include the product name, which helps to get more relevant results.

You can easily add such contextual queries using the JavaScript Search Interface Editor. You however need a good grasp of your Salesforce objects and fields to ensure you pick fields that can best improve the relevance.

To add a contextual query to the Insight Panel

  1. If not already done, log in to Salesforce using an administrator account.

  2. In your Salesforce support console, navigate to a case to see your Coveo Insight Panel.

  3. In the Insight Panel, below the search box, click Customize Panel.

    SF-InsightPanel-CustomizePanel1

  4. In the JavaScript Interface Editor, while the Components tab is selected:

    1. Drag-and-drop the Related Items component, from the panel on the right to the zone above the search box.

      SF-InsightPanelIntEditRelatedItems1

    2. In the Related items configuration panel, in the Contextual fields to include box, select one or more case fields for which the content should be automatically included in the query.

      SF-InsightPanelIntEditRelatedItems2

      By default, the filter resulting from this selection applies to all Insight Panel tabs.

    3. Optionally, when your Insight Panel has more than one tab, you can apply the added filter to specific tabs:

      1. Next to Use in the following tabs, deselect the All tabs toggle.

        Toggles for all available tabs appear.

      2. Leave selected only the toggles for tabs for which you want the filter to be applied.

      You added a filter based on the Product field of your Case object, which make sense to add to the Case tab, but not to the All Content, Chatter, or YouTube tabs.

When you want to take advantage of your developer skills, you can also use the Query component to add more sophisticated dynamic filters:

  1. In the Interface Editor, drag-and-drop the Query component, from the panel on the right to the zone above the search box.

  2. Fine-tune the search results relevance by entering an appropriate query extension (see Query Extension Language).