--- title: Coveo for ServiceNow widget reference slug: '2853' canonical_url: https://docs.coveo.com/en/2853/ collection: coveo-for-servicenow source_format: adoc --- # Coveo for ServiceNow widget reference This page presents the Coveo for ServiceNow widgets that you can [leverage](https://docs.coveo.com/en/2852/) to integrate Coveo in your ServiceNow instance and improve user experience. This page describes the following widgets, as well as their respective options: * [Case Deflection](#case-deflection) * [Field Change](#field-change) * [Search Page](#search-page) * [Page View Tracker](#page-view-tracker) * [Recommendations](#recommendations) * [Searchbox](#searchbox) * [Top Queries](#top-queries) The [Insight Panel](https://docs.coveo.com/en/2113/) 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](https://docs.coveo.com/en/2852/). > **Note** > > Coveo for ServiceNow search interfaces leverage the [default localized strings](https://docs.coveo.com/en/421/) in the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/). > 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](https://docs.coveo.com/en/3227#default-localization-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`](https://docs.coveo.com/en/3227#getjsuiculturemap-function) 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)](https://docs.coveo.com/en/2991#june-2024-release-24-1-3). ## Case Deflection The **Coveo Case Deflection** widget adds a [Case Deflection panel](https://docs.coveo.com/en/2111/) 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](https://docs.coveo.com/en/210/) from a Coveo unified [index](https://docs.coveo.com/en/204/). 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](https://docs.coveo.com/en/3198#establish-a-widget-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**](https://platform.cloud.coveo.com/admin/#/orgid/search/search-pages/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/search-pages/)) page of the [Coveo Administration Console](https://docs.coveo.com/en/183/). * The **CSS classes** box can be used to [customize the widget CSS](https://docs.coveo.com/en/2852#customize-the-css-of-a-widget). * 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](https://docs.coveo.com/en/210/) displayed in the **Coveo Case Deflection** widget are updated as the user details their issue (see [Configure the Case Deflection panel](https://docs.coveo.com/en/2111/)). ## Search Page The Coveo Search Page widget is meant to [replace your service portal search page](https://docs.coveo.com/en/2105/) with a Coveo-powered search page that includes a search box, a result list, and [facets](https://docs.coveo.com/en/198/). Coveo for ServiceNow offers two widgets for Coveo-powered search pages: * **Coveo Atomic Search Page** widget (Coveo for ServiceNow 25.1.5+): Used to add a Coveo hosted search page that was created using the [Coveo search interface simple builder](https://docs.coveo.com/en/na2g0545/). * **Coveo Main Search** widget: Used to add a Coveo hosted search page that was created using the [Coveo Legacy Interface Editor](https://docs.coveo.com/en/1656#legacy-search-page). ### Coveo Atomic Search Page widget options * In the **Scope** and **Component** boxes, enter keywords to identify your widgets according to your [naming convention](https://docs.coveo.com/en/3198#establish-a-widget-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**](https://platform.cloud.coveo.com/admin/#/orgid/search/search-pages/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/search-pages/)) page of the [Coveo Administration Console](https://docs.coveo.com/en/183/). * The **CSS classes** box can be used to [customize the widget CSS](https://docs.coveo.com/en/2852#customize-the-css-of-a-widget). * 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](https://docs.coveo.com/en/2106#add-the-coveo-search-box-to-a-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-powered search page). ### Coveo Main Search widget options * In the **Scope** and **Component** boxes, enter keywords to identify your widgets according to your [naming convention](https://docs.coveo.com/en/3198#establish-a-widget-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**](https://platform.cloud.coveo.com/admin/#/orgid/search/search-pages/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/search-pages/)) page of the [Coveo Administration Console](https://docs.coveo.com/en/183/). * The **CSS classes** box can be used to [customize the widget CSS](https://docs.coveo.com/en/2852#customize-the-css-of-a-widget). * 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](https://docs.coveo.com/en/210/) they click. This data is compiled and analyzed by [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) to provide personalized content [recommendations](#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. > [Add the Page View Tracker to your service portal footer](https://docs.coveo.com/en/3136/), 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](https://docs.coveo.com/en/1744/) 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)](https://docs.coveo.com/en/1886/)). When your site also includes the [**Coveo Page View Tracker**](#page-view-tracker) widget, the data gathered by the tracker feeds the **Coveo Recommendations** widget with the most relevant [items](https://docs.coveo.com/en/210/). ### Coveo Recommendations widget options * In the **Scope** and **Component** boxes, enter keywords to identify your widgets according to your [naming convention](https://docs.coveo.com/en/3198#establish-a-widget-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](https://docs.coveo.com/en/2852#customize-the-css-of-a-widget). * 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. ## Searchbox 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](https://docs.coveo.com/en/204/) and get results from your different content [sources](https://docs.coveo.com/en/246/). The user is then redirected to a page that contains the [Coveo Search Page](#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](https://docs.coveo.com/en/2106#add-the-coveo-search-box-to-a-service-portal-header). 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](#search-page) 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](#search-page) 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. [cols="4",options="header"] |=== |Coveo widget option in the Service Portal Designer |API option name |Type |Description |**Scope** |`scope` |`string` a|Keyword to identify your widget scope according to your [naming convention](https://docs.coveo.com/en/3198#establish-a-widget-naming-convention). |**Component** |`component` |`string` a|Keyword to identify your widget component according to your [naming convention](https://docs.coveo.com/en/3198#establish-a-widget-naming-convention). |**Full Search Page ID** (Coveo Searchbox widget only) |`search_page_id` |`string` a|The ID of a ServiceNow page in which you [added the Coveo Search page widget](https://docs.coveo.com/en/2105#replace-your-service-portal-search-page-with-a-coveo-powered-search-page). Users will be redirected to this page to view their search results. |**Redirection Page ID** (Coveo Atomic Searchbox widget only) |`redirection_page_id` |`string` a|The ID of a ServiceNow page in which you [added the Coveo Search page widget](https://docs.coveo.com/en/2105#replace-your-service-portal-search-page-with-a-coveo-powered-search-page). Users will be redirected to this page to view their search results. |**CSS classes** |`css_classes` |`string` a|Used to [customize the widget CSS](https://docs.coveo.com/en/2852#customize-the-css-of-a-widget) (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](https://docs.coveo.com/en/3398/) 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](https://docs.coveo.com/en/2105/). 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](https://docs.coveo.com/en/2852#customize-the-css-of-a-widget).