Replacing the Service Portal Search Boxes

A standalone Coveo™ search box not only forwards queries to a full Coveo search page, but can also provide Coveo Machine Learning (Coveo ML) Query Suggestions (QS) as the end-user is typing.

To take full advantage of the Coveo for ServiceNow integration, one of the first things you should do is replace your current Service Portal home page search box with a standalone Coveo search box. Eventually, you should do the same for all of your other search-enabled Service Portal pages.

Replacing the Search Box in the Service Portal Home Page

This procedure explains how a ServiceNow instance administrator or developer can replace the current search box in their Service Portal home page with a standalone Coveo search box.

  1. In the Now Platform UI of your ServiceNow instance:
    1. Navigate to Service Portal > Pages.
    2. Find and open your Service Portal home page record (typically, this is the record whose ID is index).

      You should create a backup copy of the record by clicking Clone Page in the top-right corner of the record form. When this is done, navigate back to the original record before proceeding with the next step.

    3. In the Related Links section, click Open in Designer.
    4. In the Service Portal Designer application that opens in a new browser tab:
      1. Delete the current search box widget from the page.
      2. Drag and drop the Coveo Searchbox widget inside the container where the default search box widget used to be, or wherever you want your standalone Coveo search box to appear in the page (see Searchbox).
      3. In the widget options, in the Full Search Page ID box, enter the ID of the page in which you added the Coveo Main Search widget (see Customize a Widget and Replacing the Service Portal Search Page). Users will be redirected to this page to view their search results.
      4. Optionally, customize the Searchbox widget (see Searchbox Widget Options).
      5. If you want to define some page-specific CSS rules to ensure that your standalone Coveo search box is rendered as desired (see Customize the CSS of a Widget):
        1. Click Edit Page Properties.
        2. Modify the value of the Page Specific CSS field as needed.

          You add a #CoveoSearchbox { padding: 10% 0; } rule to adjust the vertical alignment of the widget.

        3. Click Save.
      6. Click Preview to see how your Service Portal home page looks on different display sizes with your standalone Coveo search box.

        Your standalone Coveo search box will only start displaying query completion suggestions once you have configured a Coveo ML Query Suggestions model in your query pipeline, and that model has had time to learn from sufficient usage analytics data (see Configuring Coveo Machine Learning Models).

        If you do not want your standalone Coveo search box to display query suggestions at all, you must explicitly set its enableQuerySuggestAddon option to false. To do so, however, you must have at a least basic understanding of how the Coveo JavaScript Search Framework works. The JavaScript Search Framework Tutorial is a good place to start, and the Reference Documentation) can also be very helpful.

Replacing the Search Box in Other Service Portal Pages

You can replace the search box of other search-enabled Service Portal pages to ensure that queries originating from those pages are correctly forwarded to your Coveo search page and to eventually provide your customer with Coveo Machine Learning query suggestions (see Coveo Machine Learning and Query Suggestions Feature). To to so, simply follow the Replacing the Search Box in the Service Portal Home Page procedure presented in this article, adapting steps 1.b and 1.d.iii to your current needs.

What’s Next?

Add a Coveo case deflection panel to a Service Portal record creation form to empower your customers with Coveo relevancy (see Configuring the Coveo Case Deflection Panel).