Configure the Coveo Case Deflection Panel

A Coveo™ case deflection panel is a search interface that’s meant to be embedded in a Service Portal record creation form. As the end user fills the form fields, the Coveo case deflection panel automatically updates to display the most contextually relevant items from a Coveo unified index. The goal is to provide users with potential solutions prior to creating a case. When a user clicks a suggested item, they are redirected to the item page.

The Coveo case deflection panel, as its name indicates, is typically used to proactively suggest content to end users intending to create a support case. However, this feature can be used with any record producer. The procedure in this article explains how to add a case deflection panel to a case creation page, but you can follow and adapt it for any record creation page.

Implement the Case Deflection Panel

The following procedure explains how a ServiceNow instance administrator or developer can add a Coveo case deflection panel to a Service Portal case creation form.

  1. In the Now Platform UI of your ServiceNow instance:

    1. Navigate to Service Portal > Pages.

    2. Create a copy of your Service Portal display catalog item record (typically, this is the record whose ID is sc_cat_item) by clicking Clone Page in the upper-right corner of the record form. Then:

      • If you want Coveo widgets to display in all catalog items, open the original catalog item record. The page copy will be your backup page.

      • If you want Coveo widgets to display only in certain catalog items, open your copy of sc_cat_item. When using this method, you must ensure that the desired catalog items use this item record.

    3. In the Related Links section, click Open in Designer.

  2. In the Service Portal Designer:

    1. Delete all widgets and all containers in the page, or reorganize them to make room for the widgets mentioned below.

    2. Add a two-column container.

    3. In the left column, drag and drop a SC Catalog Item widget.

    4. Click the SC Catalog Item widget you just added, and then click Edit.

    5. In the Instance dialog, deselect Order Item Section On Top, and then click Save.

    6. In the right column, drag and drop a Coveo Case Deflection widget (see Case Deflection).

      For navigation and search purposes, you can also add a two-column container with a breadcrumbs and a Coveo Searchbox widget on top of the container with the SC Catalog Item and Coveo Case Deflection widgets.

    7. Optionally, customize the Case Deflection widget. Thanks to the Scope and Component options, you can name your widget according to your convention.

  3. To leverage the text typed in your case form to provide relevant suggestions in the Coveo Case Deflection widget:

    1. In the UI of your ServiceNow instance, navigate to Service Catalog > Catalog Definitions > Record Producers.

    2. Find and open your case creation record producer. If the ServiceNow Customer Service Management application is installed, the record Name is typically Create Case.

    3. At the bottom of the record form, select the Variables tab.

    4. In the table:

      1. Find and delete the Contextual Search Results variable.

        Assuming you have a ServiceNow source, you no longer require this variable.

      2. Click New.

      3. In the new record form that opens:

        1. In the Type drop-down menu:

          For ServiceNow version Select
          Paris or earlier Macro
          Quebec or later Custom
        2. Select the Question tab and set the Question and Name fields to the name you want to give to the new variable (e.g., Coveo_case_deflection_panel).

        3. Select the Type Specifications tab and set the Widget field to Coveo Field Change. This invisible widget provides the Coveo Case Deflection widget with any changes in the form fields as the user is typing. This information is used to contextualize the queries of the Coveo Case Deflection widget.

        4. Click Submit.

    5. Navigate to one of your Customer Service Portal service catalog items. If everything is set up properly, the Coveo case deflection panel should be visible in the case creation form and should automatically refresh as you type in the form fields.

Configure Your Query Pipeline

Once you have implemented the widget in your ServiceNow instance, you must link it to a query pipeline in your Coveo organization.

  1. On the Query Pipelines page of theCoveo Administration Console, do one of the following:

    • Click an existing pipeline, and then in the Action bar, click Edit components.

    • Create a new pipeline for your Coveo for ServiceNow widget to use.

  2. In the query pipeline panel, create a condition enforcing a specific search hub (Search hub is) for the pipeline. The filter value to enter depends on your widget configuration:

    • If you didn’t provide Scope and Component values in the widget options, enter ServiceNow.

    • If you provided a scope and a component, enter them in the following format: Scope_Component.

      For a widget with a Portal scope and a MyWidget component, your condition value should be Portal_MyWidget. Your complete pipeline condition is therefore Search Hub is Portal_MyWidget.

    With such a condition, your pipeline will be used for all queries originating from the widget.

    If your pipeline already has a condition, ensure to include this previous condition in your new one with an OR operator.

    For example, your pipeline has the following condition: Search Hub is Portal_MyWidget. You want to link a new portal widget to this pipeline, so your new condition is Search Hub is Portal_MyWidget OR Search Hub is Portal_MySecondWidget. With this condition, your pipeline will be used for all queries originating from one of these widgets.

  3. In the query pipeline panel, click the Advanced tab, and then on the left side of the panel, click Query parameters.

  4. Add a rule to override the large query expression (lq) parameter value so that it uses the textual data a user enters in the issue description field of the case creation form:

    1. In the upper-right corner, click , and then click Add query parameters rule with code.

      1. In the Add a Rule With Code dialog, enter the following rule to set the large query expression (lq) to the name attribute of the issue description field in the case creation form, which is comments:

        override query lq:"<@+ $context.comments +@>"
        
      2. Click Add with code.

    2. Click the rule you just created, and then in the Action bar, click Edit.

    3. In the Edit a Query Parameter Rule panel, under Condition, select or add a Query is empty condition.

      This condition is required as the Coveo case deflection panel leverages the large query expression (lq) value instead of the basic query expression (q), which is empty.

What’s Next?

Embed a Coveo insight panel in your case forms to empower your support agents with a dynamic and proactive search panel.

Recommended Articles