Skip to main content

ServiceNow

Our ServiceNow integration allows you to import sys_user_group, sc_catalog, and incident from your ServiceNow instance into Port, according to your mapping and definitions.

  • A sys_user_group corresponds to user groups in ServiceNow.
  • A sc_catalog corresponds to service catalogs in ServiceNow.
  • An incident represents incidents and tickets within ServiceNow.

Common use cases

  • Map sys_user_group, sc_catalog, and incident in your ServiceNow account.

Prerequisites

To install the integration, you need a Kubernetes cluster that the integration's container chart will be deployed to.

Please make sure that you have kubectl and helm installed on your machine, and that your kubectl CLI is connected to the Kubernetes cluster where you plan to install the integration.

Troubleshooting

If you are having trouble installing this integration, please refer to these troubleshooting steps.

Installation

Choose one of the following installation methods:

Using this installation option means that the integration will be hosted by Port, with a customizable resync interval to ingest data into Port.

To install, follow the following steps:

  1. Go to the Data sources page of your portal.

  2. Click on the + Data source button in the top-right corner.

  3. Click on the relevant integration in the list.

  4. Under Select your installation method, choose Hosted by Port.

  5. Configure the integration settings and application settings as you wish (see below for details).

Application settings

Every integration hosted by Port has the following customizable application settings:

  • Resync interval: The frequency at which Port will ingest data from the integration. There are various options available, ranging from every 1 hour to once a day.

  • Send raw data examples: A boolean toggle (enabled by default). If enabled, raw data examples will be sent from the integration to Port. These examples are used when testing your mapping configuration, they allow you to run your jq expressions against real data and see the results.

Integration settings

Every integration has its own tool-specific settings, under the Integration settings section.
Each of these settings has an ⓘ icon next to it, which you can hover over to see a description of the setting.

Port secrets

Some integration settings require sensitive pieces of data, such as tokens.
For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.

When changing such a setting, you will be prompted to choose an existing secret or create a new one:

Live event support

Currently, live events are not supported for integrations hosted by Port.
Resyncs will be performed periodically, based on the Resync interval you have configured, or manually triggered by you via Port's UI.

Therefore, real-time events such as GitOps pushes will not be ingested into Port immediately.
Live events are WIP and will be supported in the future.

Ingesting ServiceNow objects

The ServiceNow integration uses a YAML configuration to describe the process of loading data into the developer portal. See examples below.

The integration makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from ServiceNow's API events.

Configuration structure

The integration configuration determines which resources will be queried from ServiceNow, and which entities and properties will be created in Port.

Supported resources and more

Our ServiceNow integration currently supports the below resources for the mapping configuration. It is possible to extend the current capabilities by referencing any table that is supported in the ServiceNow Table API. When choosing this approach, the kind key in the mapping configuration should match the table name in ServiceNow as the integration uses the value of the kind key to fetch data from the Table API.

  • User Groups
  • Service Catalog
  • Incident
  • The root key of the integration configuration is the resources key:

    resources:
    - kind: sc_catalog
    selector:
    ...
  • The kind key is a specifier for a ServiceNow object:

      resources:
    - kind: sc_catalog
    selector:
    ...
  • The selector and the query keys allow you to filter which objects of the specified kind will be ingested into your software catalog:

    resources:
    - kind: sc_catalog
    selector:
    query: "true" # JQ boolean expression. If evaluated to false - this object will be skipped.
    port:
  • The port, entity and the mappings keys are used to map the ServiceNow object fields to Port entities. To create multiple mappings of the same kind, you can add another item in the resources array;

    resources:
    - kind: sc_catalog
    selector:
    query: "true"
    port:
    entity:
    mappings: # Mappings between one ServiceNow object to a Port entity. Each value is a JQ query.
    identifier: .sys_id
    title: .title
    blueprint: '"servicenowCatalog"'
    properties:
    description: .description
    isActive: .active
    createdBy: .sys_created_by
    - kind: sc_catalog # In this instance sc_catalog is mapped again with a different filter
    selector:
    query: '.title == "MyServiceCatalogName"'
    port:
    entity:
    mappings: ...
    Blueprint key

    Note the value of the blueprint key - if you want to use a hardcoded string, you need to encapsulate it in 2 sets of quotes, for example use a pair of single-quotes (') and then another pair of double-quotes (")

Ingest data into Port

To ingest ServiceNow objects using the integration configuration, you can follow the steps below:

  1. Go to the DevPortal Builder page.
  2. Select the Data Sources tab at the left sidebar.
  3. Click on + Data Source at the top right corner.
  4. Select ServiceNow under the Incident Management category.
  5. Modify the configuration according to your needs.
  6. Run the installation command.
  7. Click Next and you can view the integration configuration and update it as necessary.

Examples

Examples of blueprints and the relevant integration configurations:

Group

Group blueprint
{
"identifier": "servicenowGroup",
"title": "Servicenow Group",
"icon": "Service",
"schema": {
"properties": {
"description": {
"title": "Description",
"type": "string"
},
"isActive": {
"title": "Is active",
"type": "boolean"
},
"createdOn": {
"title": "Created On",
"type": "string",
"format": "date-time"
},
"createdBy": {
"title": "Created By",
"type": "string"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration
createMissingRelatedEntities: true
deleteDependentEntities: true
resources:
- kind: sys_user_group
selector:
query: "true"
port:
entity:
mappings:
identifier: .sys_id
title: .name
blueprint: '"servicenowGroup"'
properties:
description: .description
isActive: .active
createdOn: '.sys_created_on | (strptime("%Y-%m-%d %H:%M:%S") | strftime("%Y-%m-%dT%H:%M:%SZ"))'
createdBy: .sys_created_by

Service Catalog

Service catalog blueprint
{
"identifier": "servicenowCatalog",
"title": "Servicenow Catalog",
"icon": "Service",
"schema": {
"properties": {
"description": {
"title": "Description",
"type": "string"
},
"isActive": {
"title": "Is Active",
"type": "boolean"
},
"createdOn": {
"title": "Created On",
"type": "string",
"format": "date-time"
},
"createdBy": {
"title": "Created By",
"type": "string"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration
createMissingRelatedEntities: true
deleteDependentEntities: true
resources:
- kind: sc_catalog
selector:
query: "true"
port:
entity:
mappings:
identifier: .sys_id
title: .title
blueprint: '"servicenowCatalog"'
properties:
description: .description
isActive: .active
createdOn: '.sys_created_on | (strptime("%Y-%m-%d %H:%M:%S") | strftime("%Y-%m-%dT%H:%M:%SZ"))'
createdBy: .sys_created_by

Incident

Incident blueprint
{
"identifier": "servicenowIncident",
"title": "Servicenow Incident",
"icon": "Service",
"schema": {
"properties": {
"category": {
"title": "Category",
"type": "string"
},
"reopenCount": {
"title": "Reopen Count",
"type": "string"
},
"severity": {
"title": "Severity",
"type": "string"
},
"assignedTo": {
"title": "Assigned To",
"type": "string",
"format": "url"
},
"urgency": {
"title": "Urgency",
"type": "string"
},
"contactType": {
"title": "Contact Type",
"type": "string"
},
"createdOn": {
"title": "Created On",
"type": "string",
"format": "date-time"
},
"createdBy": {
"title": "Created By",
"type": "string"
},
"isActive": {
"title": "Is Active",
"type": "boolean"
},
"priority": {
"title": "Priority",
"type": "string"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
Integration configuration
createMissingRelatedEntities: true
deleteDependentEntities: true
resources:
- kind: incident
selector:
query: "true"
port:
entity:
mappings:
identifier: .number | tostring
title: .short_description
blueprint: '"servicenowIncident"'
properties:
category: .category
reopenCount: .reopen_count
severity: .severity
assignedTo: .assigned_to.link
urgency: .urgency
contactType: .contact_type
createdOn: '.sys_created_on | (strptime("%Y-%m-%d %H:%M:%S") | strftime("%Y-%m-%dT%H:%M:%SZ"))'
createdBy: .sys_created_by
isActive: .active
priority: .priority

Let's Test It

This section includes a sample response data from ServiceNow. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.

Payload

Here is an example of the payload structure from ServiceNow:

Group response data
{
"parent": "",
"manager": "",
"roles": "",
"sys_mod_count": "0",
"active": "true",
"description": "\n\t\tGroup for all people who have the Analytics Admin role\n\t",
"source": "",
"sys_updated_on": "2020-03-17 11:39:14",
"sys_tags": "",
"type": "",
"sys_id": "019ad92ec7230010393d265c95c260dd",
"sys_updated_by": "admin",
"cost_center": "",
"default_assignee": "",
"sys_created_on": "2020-03-17 11:39:14",
"name": "Analytics Settings Managers",
"exclude_manager": "false",
"email": "",
"include_members": "false",
"sys_created_by": "admin"
}
Service Catalog response data
{
"manager": {
"link": "https://dev229583.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
"value": "6816f79cc0a8016401c5a33be04be441"
},
"sys_mod_count": "0",
"active": "true",
"description": "Description for service catalog",
"desktop_continue_shopping": "",
"enable_wish_list": "false",
"sys_updated_on": "2023-12-14 15:30:54",
"sys_tags": "",
"title": "Test Service Catalog",
"sys_class_name": "sc_catalog",
"desktop_image": "",
"sys_id": "56e48e6a9743311083e6ff0de053af56",
"sys_package": {
"link": "https://dev229583.service-now.com/api/now/table/sys_package/global",
"value": "global"
},
"desktop_home_page": "",
"sys_update_name": "sc_catalog_56e48e6a9743311083e6ff0de053af56",
"sys_updated_by": "admin",
"sys_created_on": "2023-12-14 15:30:54",
"sys_name": "Test Service Catalog",
"sys_scope": {
"link": "https://dev229583.service-now.com/api/now/table/sys_scope/global",
"value": "global"
},
"editors": "",
"sys_created_by": "admin",
"sys_policy": ""
}
Incident response data
{
"parent": "",
"made_sla": "true",
"caused_by": "",
"watch_list": "",
"upon_reject": "cancel",
"sys_updated_on": "2016-12-14 02:46:44",
"child_incidents": "0",
"hold_reason": "",
"origin_table": "",
"task_effective_number": "INC0000060",
"approval_history": "",
"number": "INC0000060",
"resolved_by": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user/5137153cc611227c000bbd1bd8cd2007",
"value": "5137153cc611227c000bbd1bd8cd2007"
},
"sys_updated_by": "employee",
"opened_by": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user/681ccaf9c0a8016400b98a06818d57c7",
"value": "681ccaf9c0a8016400b98a06818d57c7"
},
"user_input": "",
"sys_created_on": "2016-12-12 15:19:57",
"sys_domain": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user_group/global",
"value": "global"
},
"state": "7",
"route_reason": "",
"sys_created_by": "employee",
"knowledge": "false",
"order": "",
"calendar_stc": "102197",
"closed_at": "2016-12-14 02:46:44",
"cmdb_ci": {
"link": "https://dev229583.service-now.com/api/now/v1/table/cmdb_ci/109562a3c611227500a7b7ff98cc0dc7",
"value": "109562a3c611227500a7b7ff98cc0dc7"
},
"delivery_plan": "",
"contract": "",
"impact": "2",
"active": "false",
"work_notes_list": "",
"business_service": {
"link": "https://dev229583.service-now.com/api/now/v1/table/cmdb_ci_service/27d32778c0a8000b00db970eeaa60f16",
"value": "27d32778c0a8000b00db970eeaa60f16"
},
"business_impact": "",
"priority": "3",
"sys_domain_path": "/",
"rfc": "",
"time_worked": "",
"expected_start": "",
"opened_at": "2016-12-12 15:19:57",
"business_duration": "1970-01-01 08:00:00",
"group_list": "",
"work_end": "",
"caller_id": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user/681ccaf9c0a8016400b98a06818d57c7",
"value": "681ccaf9c0a8016400b98a06818d57c7"
},
"reopened_time": "",
"resolved_at": "2016-12-13 21:43:14",
"approval_set": "",
"subcategory": "email",
"work_notes": "",
"universal_request": "",
"short_description": "Unable to connect to email",
"close_code": "Solved (Permanently)",
"correlation_display": "",
"delivery_task": "",
"work_start": "",
"assignment_group": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user_group/287ebd7da9fe198100f92cc8d1d2154e",
"value": "287ebd7da9fe198100f92cc8d1d2154e"
},
"additional_assignee_list": "",
"business_stc": "28800",
"cause": "",
"description": "I am unable to connect to the email server. It appears to be down.",
"origin_id": "",
"calendar_duration": "1970-01-02 04:23:17",
"close_notes": "This incident is resolved.",
"notify": "1",
"service_offering": "",
"sys_class_name": "incident",
"closed_by": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user/681ccaf9c0a8016400b98a06818d57c7",
"value": "681ccaf9c0a8016400b98a06818d57c7"
},
"follow_up": "",
"parent_incident": "",
"sys_id": "1c741bd70b2322007518478d83673af3",
"contact_type": "self-service",
"reopened_by": "",
"incident_state": "7",
"urgency": "2",
"problem_id": "",
"company": {
"link": "https://dev229583.service-now.com/api/now/v1/table/core_company/31bea3d53790200044e0bfc8bcbe5dec",
"value": "31bea3d53790200044e0bfc8bcbe5dec"
},
"reassignment_count": "2",
"activity_due": "2016-12-13 01:26:36",
"assigned_to": {
"link": "https://dev229583.service-now.com/api/now/v1/table/sys_user/5137153cc611227c000bbd1bd8cd2007",
"value": "5137153cc611227c000bbd1bd8cd2007"
},
"severity": "3",
"comments": "",
"approval": "not requested",
"sla_due": "",
"comments_and_work_notes": "",
"due_date": "",
"sys_mod_count": "15",
"reopen_count": "0",
"sys_tags": "",
"escalation": "0",
"upon_approval": "proceed",
"correlation_id": "",
"location": "",
"category": "inquiry"
}

Mapping Result

The combination of the sample payload and the Ocean configuration generates the following Port entity:

Group entity in Port
{
"identifier": "019ad92ec7230010393d265c95c260dd",
"title": "Analytics Settings Managers",
"icon": null,
"blueprint": "servicenowGroup",
"team": [],
"properties": {
"description": "\n\t\tGroup for all people who have the Analytics Admin role\n\t",
"isActive": true,
"createdOn": "2020-03-17T11:39:14Z",
"createdBy": "admin"
},
"relations": {},
"createdAt": "2023-12-18T08:37:21.637Z",
"createdBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW",
"updatedAt": "2023-12-18T08:37:21.637Z",
"updatedBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW"
}
Service catalog entity in Port
{
"identifier": "56e48e6a9743311083e6ff0de053af56",
"title": "Test Service Catalog",
"icon": null,
"blueprint": "servicenowCatalog",
"team": [],
"properties": {
"description": "Description for service catalog",
"isActive": true,
"createdOn": "2023-12-14T15:30:54Z",
"createdBy": "admin"
},
"relations": {},
"createdAt": "2023-12-18T08:37:28.087Z",
"createdBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW",
"updatedAt": "2023-12-18T08:37:28.087Z",
"updatedBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW"
}
Incident entity in Port
{
"identifier": "INC0000060",
"title": "Unable to connect to email",
"icon": null,
"blueprint": "servicenowIncident",
"team": [],
"properties": {
"category": "inquiry",
"reopenCount": "0",
"severity": "3",
"assignedTo": "https://dev229583.service-now.com/api/now/table/sys_user/5137153cc611227c000bbd1bd8cd2007",
"urgency": "2",
"contactType": "self-service",
"createdOn": "2016-12-12T15:19:57Z",
"createdBy": "employee",
"isActive": false,
"priority": "3"
},
"relations": {},
"createdAt": "2023-12-15T14:52:06.347Z",
"createdBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW",
"updatedAt": "2023-12-15T15:34:18.248Z",
"updatedBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW"
}