ServiceNow (Webhook Integration)

ServiceNow

The ServiceNow integration allows Alerts to be delivered to ServiceNow.

Note: Before you can use ServiceNow as a target for alerts delivery, you need to configure a ServiceNow Integration and URL that can receive a POST request.

With ServiceNow, you can:

  • Manage incidents and the lifecycle of incidents

  • Correlate with other systems inside of ServiceNow

  • Gather incidents in an already existing ServiceNow setup

Overview

  1. Add Webhook Integration From the ServiceNow Portal

    1. Setup

    2. Credentials

    3. Webhook ServiceNow Parameters

    4. User Names/IDs

  2. Add ServiceNow Target

     

Setting up ServiceNow Integration from within the ServiceNow Portal

Step

Screenshot

Step

Screenshot

To use ServiceNow as an Apica Target for Webhook delivery, configure OAuthaccess in ServiceNow from their Application Registry Menu.

When you are signed in to your ServiceNow instance as an administrator, you can configure OAuth 2 access in the Application Registry.

Open the Application Registry

To open the Application Registry:

  • Go to your instance web address ( https://<instance>.service-now.com)

  • You can create a set of client credentials in the ServiceNow Application Registry.

  • Login in as a user with administrator access

  • Find System OAuth in the navigator

  • Click Application Registry

The ServiceNow Application Registry contains a list of applications that are registered for OAuth 2 authorization.

Add Credentials

To add a new set of credentials:

  • Start in the Application Registry

  • Click New

A new application is created.

  • Enter a name for the application

  • The Client ID is generated automatically and cannot be changed.

  • Enter a Client Secret passphrase, or leave it blank to have it automatically generated for you

  • Click Submit

The application is added to the OAuth Provider table.

You have now Registered/added the Application to the ServiceNow Application Registry.

Next: you need to get the Servicenow Credentials From ServiceNow Portal to use for authenticating the Webhook.

ServiceNow documentation

For more details, see the ServiceNow documentation:

Integration ServiceNow Credentials (From ServiceNow Portal)

Getting the OAuth Credentials for Authentication

Now that you registered the Application with ServiceNow, you need to send Webhooks to it and need to authenticate your Webhook. This is how to get the credentials so you can enter them into the Webhook from the Apica side.

So, when you need the OAuth settings for the Apica Webhook target, you can find them in the ServiceNow Application Registry.

Steps

Screenshot

Steps

Screenshot

1. Open the ServiceNow Application Registry

To open the Application Registry:

  • Go to your instance web address ( https://<instance>.service-now.com):

  • Login in as a user with administrator access

  • Find System OAuth in the navigator

Find and Get the Credentials

The ServiceNow Application Registry contains a list of applications that are registered for OAuth authorization.

To find credential details:

  • Start in the Application Registry

 

The OAuth Client ID

The Client ID is displayed in plain text in the Client ID box and can be copied directly.

Copy this for the first part of the ServiceNow Webhook integration Authentication

The Client Secret

The Client Secret is hidden by default, so you need to display it in plain text in order to copy it.

View the Client Secret by clicking the padlock next to the Client Secret box

  • The client secret is then displayed in plain text and can be copied directly from there.

Copy this for the second part of the ServiceNow Webhook integration Authentication

You now can Authenticate to the ServiceNow services to pass the Webhook information.

NEXT STEPS

You now need to pass ServiceNow the Webhook parameters it needs.

Webhook ServiceNow Parameters (From ServiceNow Portal)

Add parameters to alerts when an incident is created or resolved.

Details about these parameters in ServiceNow are beyond the scope of this document but here’s a brief summary.

Overview

You can view details about incident parameters in the ServiceNow REST API Explorer.

Open API Explorer

Step

Screenshot

Step

Screenshot

Login

  • Go to your instance web address ( https://<instance>.service-now.com)

  • Login in as a user with administrator ac

Open the REST API Explorer

  • Find System Web Services in the navigator

  • Select REST

  • Select REST API Explorer*

  • Click Explore

The REST API Explorer is shown.

In the API Explorer, you can select the Incident table and view details about the parameters.

Find Incident Parameters

To find information about a parameter:

  • Find the Path Parameters section

 

  • Select Incidents in the tableName dropdown menu

  • Find the Request Body section

  • Select the Builder tab

  • Choose the desired parameter in the Parameter dropdown menu

  • The valid type for the parameters is shown in the Type box:

Next Steps

Get/record the User Names/User ID from ServiceNow Portal.

User Names/ID (From ServiceNow Portal)

User names (User ID) are used in ServiceNow targets, both for the access control, and to define incident caller.

Here’s how to get the User Names/User ID for your ServiceNow Webhook-enabled Alert targets.

Find User ID

Step

Screenshot

Step

Screenshot

To find the User Name for a particular user:

  • Go to your instance web address ( https://<instance>.service-now.com)

  • Login in as a user with administrator access

Find Organization in the navigation

  • Select Users

  • Search the table for the user you want

  • Copy from the User ID column in the table

ServiceNow Username

The Username is the user name that logs into the ServiceNow instance.

View

This can be any valid and active ServiceNow user.

ServiceNow Short Description

Short Description

The Short description used in ServiceNow incidents created from alerts, to populate the short description
field.

View

You can use Message Placeholders in the description to add dynamic information from the check.

  • Enter a descriptive text for the alert/incident in the text box.

ServiceNow Client Secret

Client Secret

The Client Secret is the OAuth client secret configured in ServiceNow.

View

ServiceNow Client ID

Client ID

The Client ID is the OAuth authentication identifier of the ServiceNow.

View

Creating ServiceNow Target

Note: For ServiceNow delivery to work, you need to configure the ServiceNow Integration custom integration in ServiceNow.

Prerequisites

From the ServiceNow Portal, once you have:

We can now set up the alert target from within ASM. The configuration for a custom ServiceNow WebHook target consists of multiple sections.

Step

Screenshot

Step

Screenshot

Create a ServiceNow Target

To add a ServiceNow target, click the WebHook button

A blank target is created:

Navigate down to ServiceNow

Add the ServiceNow “Target” Fields

Target Name

  • Enter a name that identifies the ServiceNow target in ASM.

Host

  • Enter the ID of the ServiceNow instance which is typically the same as the subdomain in the ServiceNow URL (http://<host>.service-now.com).

Client ID

Client Secret

Username

  • Enter the Username that logs into the ServiceNow instance. This can be any valid and active ServiceNow user.

  • Copy the user name from your ServiceNow User Names/ID (From ServiceNow Portal) and paste it into the text box.

Password

  • Enter the Password is the password used to login to the ServiceNow instance. This can be the password for any valid and active ServiceNow user, but it needs to match the ServiceNow Username setting.

  • Copy the password from the correct user in your ServiceNow instance and paste it into the text box.

Caller

  • Enter a ServiceNow user which is in incidents created from alerts, to populate the caller field. This can be any valid and active ServiceNow user and can be different from the ServiceNow Username setting.

  • Copy the user name from your ServiceNow User Names/ID (From ServiceNow Portal) and paste it into the text box.

Short Description

  • Enter descriptive text for the alert/incident in the text box for ServiceNow incidents which are created from alerts. This will populate the short description field. You can use Message Placeholders in the description to add dynamic information from the check.

Creating Incident

  • Add any number of parameters to the incident when it is created in ServiceNow.

  • Select a parameter in the Key dropdown menu

  • Enter a value for the Value parameter

  • Click the Add button

Resolving Incident

  • Here, add any number of parameters to the created incident in ServiceNow when the incident has been resolved.

  • Select a parameter in the Key dropdown menu

  • Enter a value for the Value parameter

  • Click the Add button

Add WebHook Target

  • When you are happy with all the settings, create the target with the Add WebHook Target button.

  • Target is created, containing the selected user/targets.

 

 

 

 

 

Can't find what you're looking for? Send an E-mail to support@apica.io