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.

Case Deflection

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

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 a custom Coveo-powered search page to display, just like you would do for the Main Search widget.

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

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

  • Check the Disable first load query box 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 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 Case Deflection widget are updated as the user details their issue (see Configure the Case Deflection panel).

The Main Search widget is meant to replace your service portal search page. It displays a Coveo-powered search page, complete with a search box, a result list, and facets.

Main Search widget options

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

  • In the Search Page box, enter the Coveo-powered search page name to use in the Main Search widget (see Customize Your Coveo-Powered Search Page).

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

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

Page View Tracker

The Page View Tracker is an invisible widget that tracks the journey of each user on your site, i.e, 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 Page View Tracker can be added anywhere in a page.

Note

For a user’s journey on your site to be tracked from start to finish, you must add the Page View Tracker 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.

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 Page View Tracker widget, the data gathered by the tracker feeds the Recommendations widget with the most relevant items.

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.

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

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

The Searchbox widget, when added to a page, displays a Coveo searchbox meant to replace the default ServiceNow search feature. 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 a Main Search widget, in which their search results are displayed.

Searchbox widget options

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

Service Portal Designer option label 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

search_page_id

string

The ID of a ServiceNow page in which you embedded the Main Search 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

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.

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.