Creating a ServiceNow Source

In order for your support agents and customers to be able to view items from your ServiceNow instance in their query results, you must create a ServiceNow source in your Coveo Cloud organization.

This source can be shared or private (see Content Security). By default, your ServiceNow source starts a rescan every day to retrieve ServiceNow content changes, i.e., item additions, modifications, and deletions (see Edit a Source Schedule).

Create a Crawling Account

To allow Coveo to retrieve your ServiceNow content, you must create a crawling account that has the permission to read the tables you want to make searchable (see Create a User).

This account must be an administrator account that has access to the ServiceNow content you want to make searchable.

Add or Edit a ServiceNow Source

When you have the required privileges, you can create a ServiceNow source to make your instance content searchable.

  1. Ensure that Coveo for ServiceNow is installed in your ServiceNow instance and connected to a Coveo Cloud organization (see Installing Coveo for ServiceNow).
  2. In the Coveo Cloud administration console for this organization, go to the Add/Edit a ServiceNow Source panel:

    • To add a source, in the main menu, under Content, select Sources > Add source button > ServiceNow.


    • To edit a source, in the main menu, under Content, select Sources > source row > Edit in the Action bar.

  3. In the Add/Edit a ServiceNow Source panel, in the Configuration tab, enter appropriate parameter values:

    • Source name

      A descriptive name for your source under 255 characters (not already in use for another source in this organization).


      You cannot change the source name once it is created.

    • Instance name

      Your instance name. Typically, a ServiceNow instance URL includes the instance name.

      Your instance URL is, so your instance name is myinstance.

    • Character optical recognition (OCR)

      Check this box if you want Coveo Cloud to extract text from image files and/or PDF files containing images (see Enable Optical Character Recognition). OCR-extracted text is processed as item data, meaning that it is fully searchable and will appear in the item Quick View (see Search Result Quick View).

      Since the OCR feature is available at an extra charge, you must first contact Coveo Sales to add this feature to your organization license. You can then enable it for your source.

    • Index

      When adding a source, if you have more than one logical (non-Elasticsearch) index in your organization, select the index in which the retrieved content will be stored (see Leverage Multiple Coveo Indexes). If your organization only has one index, this drop-down menu is not visible and you have no decision to make.

      • To add a source storing content in an index different than default, you need the View access level on the Logical Index domain (see Privilege Management and Logical Indexes Domain).

      • Once the source is added, you cannot switch to a different index.

    • Content security

      Select who can search the ServiceNow content (see Content Security). Your options are:

      • Shared - Everyone

      • Private - Only you, the source creator

  4. In the Authentication section, select an authentication option:

    • If you select Basic authentication, enter the Username and Password of a dedicated ServiceNow account that has access to the content you want to make searchable.

    • If you select OAuth 2.0, which is the most secure and therefore recommended option:

      1. Click Authorize Account.
      2. In the Sign in to ServiceNow window that appears, enter your ServiceNow Instance name, Client ID, and Client secret, and then click Authorize. Your client ID and client secret can be found in the Coveo application registry:
        1. In the Now Platform UI of your ServiceNow instance, navigate to System OAuth > Application Registry.
        2. In the Applications Registries list, click the Coveo registry.
      3. In the ServiceNow window that appears, enter the User name and Password of a ServiceNow administrator account that has access to the desired content, and then click Login (see Create a Crawling Account).
      4. Under [Application registry name] would like to connect to your ServiceNow account on instance [instance name], click Allow.

      Once you have authorized your account, the OAuth 2.0 handshake must be refreshed once in a while. The default lifespan of a token is 2 years, but ServiceNow allows you to change this duration.

  5. In the Content to Include section, the JSON configuration shows your source configuration. If you want to edit it, see Generic REST API Source Reference and Generic REST API Source Tutorial, as the Generic REST API source and the ServiceNow source require a similar JSON configuration. Incidentally, the Generic REST API Source JSON Configuration Examples include a basic ServiceNow source configuration.

  6. In the Access tab, determine whether each group and API key can view or edit the source configuration (see Understanding Resource Access):
    1. In the Access Level column, select View or Edit for each available group.
    2. On the left-hand side of the tab, if available, click Groups or API Keys to switch lists.

    If you remove the Edit access level from all the groups of which you are a member, you will not be able to edit the source again after saving. Only administrators and members of other groups that have Edit access on this resource will be able to do so. To keep your ability to edit this resource, you must grant the Edit access level to at least one of your groups.

  7. Complete your source addition or edition:

    • Click Add Source/Save if you edited your source JSON configuration or if you want to save your source changes without starting a build/rebuild, for instance when planning to make other changes soon.

      In the Sources page, you need to click Start initial build or Start initial rebuild in the source Status column to respectively add the source content and make your changes effective.


    • Click Add and Build Source/Save and Rebuild Source if you did not edit your source JSON configuration, are done editing the source, and want to make changes effective.

      Back in the Sources page, you can review the progress of your ServiceNow source addition or modification (see Adding and Managing Sources).

    Once the source is built or rebuilt, you can review its content in the content browser (see Inspect Items With the Content Browser).

  8. If you edited your source JSON configuration, you may have decided to populate fields that are not Coveo Cloud default fields (see Understanding Fields). If you have not already created these fields for another source, you must create them in the Fields page before building your source (see Add or Edit Fields and Field Origins).

    • You decided to retrieve picture URIs and to have Coveo Cloud populate the otheraddress field with this data. Your item metadata therefore contains:

        "otheraddress": "%[addresses.otheraddress]"

      However, since the otheraddress field is not a default field like author or date, you must create it.

    • You have another ServiceNow source populating the custom field otheraddress. When creating your new source, you therefore do not need to create this field, as it is already in the Fields page.

  9. Ensure that your source maps correctly all the fields to populate (see Manage Source Mappings). If a field does not have a mapping, you must create one.

    You map the otheraddress field with the following rule: %[otheraddress].

  10. In the Sources page, in the source Status column, click Start initial build or Start required rebuild to respectively start retrieving the source content or make your changes effective.

    Once the source is built or rebuilt, you can review its content in the content browser (see Content Browser - Page).

What’s Next?