Coveo for ServiceNow widget reference

This page presents the Coveo for ServiceNow widgets that you can leverage to integrate Coveo in your ServiceNow instance and improve user experience.

This page describes the following widgets, as well as their respective options:

The Insight Panel is also an essential part of Coveo for ServiceNow, although the procedure to add or edit it is different from that of the preceding widgets.

Note

Coveo for ServiceNow search interfaces leverage the default localized strings in the Coveo JavaScript Search Framework. By default, a Coveo-powered search interface displays the localized strings that correspond to the current user’s language in ServiceNow based on a preconfigured mapping between ServiceNow language IDs and Coveo JavaScript Search Framework language culture file keys.

If you need to add a custom mapping that is not supported by default, such as to support a new language ID in ServiceNow or a new language culture file in Coveo JavaScript Search Framework, you can do so using the getJsUiCultureMap extension point function.

Important

As of Coveo for ServiceNow 24.1.3, the authentication property for Coveo widgets changed from searchToken to accessToken. However, if you have a widget that was cloned from a default Coveo widget prior to 24.1.3, the cloned widget will not have the accessToken property. In order for your cloned widget to function properly when upgrading to Coveo for ServiceNow 24.1.3 or later, you must replace the searchToken property with accessToken in the cloned widget record. For more information, see June 2024 release (24.1.3).

Case Deflection

The Coveo Case Deflection widget adds a Case Deflection panel in a Service Portal page where end users fill out a form to create a case. As the end user describes their issue in the form, the Coveo Case Deflection panel automatically updates to proactively suggest the most contextually relevant items from a Coveo unified index. If an item seems to provide a solution to their issue, the end user clicks it and is redirected to the item page, therefore dropping the case creation process.

Coveo Case Deflection widget options

  • In the Scope and Component boxes, enter keywords to identify your widgets according to your naming convention.

  • In the Hosted Search Page box, enter the name of the Coveo-powered search page you want to display in the Case Deflection panel.

    Note

    You can find the Name of your Coveo hosted search page on the Search Pages (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console.

  • The CSS classes box can be used to customize the widget CSS.

  • In the Minimum time between automatic queries box, enter the number of milliseconds there should be between each query, that’s between each time the widget refreshes with new results based on the user’s input. The default number is 750 milliseconds. Increase this number to make the widget refresh less often.

  • Enable the Display for anonymous users option if you want the widget to be visible to users that aren’t logged in your portal.

  • Enable the Disable first load query option if you want the widget to wait for user input before displaying content recommendations. When the box is unchecked, the widget shows recommendations before the user starts typing in the case creation form.

Field change

The Coveo Field Change widget is an invisible widget. When added to a page that contains a record creation form and the Coveo Case Deflection widget, it provides this widget with the most important keywords typed in the form, so that the items displayed in the Coveo Case Deflection widget are updated as the user details their issue (see Configure the Case Deflection panel).

Search Page

The Coveo search page widget is meant to replace your service portal search page with a Coveo-powered search page that includes a search box, a result list, and facets.

Coveo for ServiceNow offers two widgets for Coveo search pages:

Coveo Atomic Search Page widget options

  • In the Scope and Component boxes, enter keywords to identify your widgets according to your naming convention.

  • In the Search Page ID box, enter the ID of the Coveo-powered search page you want to use in the search widget.

    Note

    You can find the ID of your Coveo hosted search page on the Search Pages (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console.

  • The CSS classes box can be used to customize the widget CSS.

  • Enable the Display for anonymous users option if you want the widget to be visible to users that aren’t logged in to your portal.

  • Enable the Hide integrated search box option to remove the search box from the Coveo search page widget. This option is used primarily when you add a Coveo search box to your Service Portal header. Since the Coveo search box in the header is always visible (persistent), and the search box redirects queries to the Coveo-powered search page, enable this option to avoid having two search boxes visible (one in the header and another on the Coveo search page).

Coveo Main Search widget options

  • In the Scope and Component boxes, enter keywords to identify your widgets according to your naming convention.

  • In the Hosted Search Page box, enter the name of the Coveo-powered search page you want to use in the search widget.

    Note

    You can find the Name of your Coveo hosted search page on the Search Pages (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console.

  • The CSS classes box can be used to customize the widget CSS.

  • Enable the Display for anonymous users option if you want the widget to be visible to users that aren’t logged in to your portal.

Page View Tracker

The Coveo Page View Tracker widget is an invisible widget that tracks the journey of each user on your site. More precisely, it tracks the pages they visit and the items they click. This data is compiled and analyzed by Coveo Machine Learning (Coveo ML) to provide personalized content recommendations based on the items in which users with a similar profile and journey are interested. The Coveo Page View Tracker widget can be added anywhere on a page.

Note

For a user’s journey on your site to be tracked from start to finish, you must add the Coveo Page View Tracker widget to all your pages. We recommend adding the Page View Tracker to your service portal footer, as this would add the Page View Tracker to all your pages at once, instead of adding it to every page, one at a time.

Example

John Smith is a consumer who recently bought one of the printers your company sells. He accesses your service portal landing page, and then the Products page, in which he searches for color printer. John Smith browses two search results pages and finally clicks a color laser printer item. After reading the printer description and specifications, John Smith hasn’t found the solution to his issue, so he goes to your case creation page.

Coveo Page View Tracker widget options

In the Content Type box, specify the type of content to track. Your options are articles, courses, downloads, and products. If you don’t specify anything, articles applies by default.

Recommendations

The Coveo Recommendations widget provides content recommendations to users visiting the page in which it’s embedded (see Deploy Content Recommendations (CR)).

When your site also includes the Coveo Page View Tracker widget, the data gathered by the tracker feeds the Coveo Recommendations widget with the most relevant items.

Coveo Recommendations widget options

  • In the Scope and Component boxes, enter keywords to identify your widgets according to your naming convention.

  • In the Title box, enter a widget title to display on the page. If you don’t enter anything, the default title is Recommendations.

  • The Sub Title box, enter a widget subtitle to display on the page. By default, no subtitle is displayed.

  • In the Number of results box, enter the number of recommendations to display. If you don’t specify a number, the default is 5 recommendations.

  • The CSS classes box can be used to customize the widget CSS.

  • Enable the Hide if no results are returned option to avoid displaying an empty Recommendations box when no items are fed.

  • Enable the Display for anonymous users option if you want the widget to be visible to users that aren’t logged in to your portal.

When added to a page, the Searchbox widget displays a Coveo standalone search box meant to replace the default ServiceNow search box. When an end user enters keywords in this box, they search your Coveo unified index and get results from your different content sources. The user is then redirected to a page that contains the Coveo search page widget, in which the search results are displayed.

Searchbox widget options

The following table lists the Coveo search box widget options that are available in the Service Portal Designer, as well as the API option names that you can use when embedding the search box widget outside of the Service Portal Designer, such as in a header record HTML template, server script, or client script.

Coveo for ServiceNow offers two widgets for standalone Coveo search boxes:

  • Coveo Atomic Searchbox widget (Coveo for ServiceNow 25.1.5+): Used to add a standalone Coveo search box when using the Coveo Atomic Search Page widget for your main Service Portal search page.

  • Coveo Searchbox widget: Used to add a standalone Coveo search box when using the Coveo Main Search widget for your main Service Portal search page.

The widget options in the following table apply to both the Coveo Atomic Searchbox widget and Coveo Searchbox widget, unless specified otherwise.

Coveo widget option in the Service Portal Designer API option name Type Description

Scope

scope

string

Keyword to identify your widget scope according to your naming convention.

Component

component

string

Keyword to identify your widget component according to your naming convention.

Full Search Page ID
(Coveo Searchbox widget only)

search_page_id

string

The ID of a ServiceNow page in which you added the Coveo Search page widget. Users will be redirected to this page to view their search results.

Redirection Page ID
(Coveo Atomic Searchbox widget only)

redirection_page_id

string

The ID of a ServiceNow page in which you added the Coveo Search page widget. Users will be redirected to this page to view their search results.

CSS classes

css_classes

string

Used to customize the widget CSS (Service Portal Designer), or the CSS classes to add to the widget container.

Placeholder
(Coveo Searchbox widget only)

placeholder

string

The text to display when nothing is entered in the search box.

Display for anonymous users

display_for_anonymous

boolean

Sets whether the widget is visible to users that aren’t logged in to the Service Portal.

Top Queries

Similar to the Coveo Recommendations widget, the Coveo Top Queries widget provides query recommendations to users visiting the page in which it’s embedded. It’s especially useful on the Index portal page.

For this widget to be useful, ensure that you have a Query Suggestion Machine Learning model for your portal.

Coveo Top Queries widget options

  • In the Title box, enter a widget title to display on the page. If you don’t enter anything, the default title is People also searched for.

  • In the Search Page ID box, enter the ID of a ServiceNow page in which you embedded the Main Search widget. Users will be redirected to this page to view the results of the query they click.

  • In the Display Mode dropdown menu, indicate whether you want the widget to be visible to anonymous users (that is, users that aren’t logged in your portal), authenticated users, or both.

  • The CSS classes box can be used to customize the widget CSS.