SAP Cloud ALM Integration with ServiceNow

When events are created in SAP Cloud ALM, you can now forward this event to ServiceNow to create an incident or a case. This page describes the setup and the mapping definition of the integration. 

Configure Integration

Prerequisites

  • You need a technical user in ServiceNow that has the authorization to create incidents and/or cases.
  • You need access to the SAP Cloud ALM subaccount in BTP Cockpit.
  • Your user needs the role "Connectivity and Destination Administrator" in the SAP Cloud ALM subaccount.

Create Destination in BTP Cockpit

The destination is created in SAP BTP Cockpit.

  1. Log on to BTP Cockpit and enter your SAP Cloud ALM subaccount
  2. Navigate to "Connectivity" > "Destinations"
  3. Click "New Destination"
    1. Name: Enter a destination name that identifies the ServiceNow tenant it connects to (e.g. SERVICE_NOW_PROD)
    2. Type: HTTP
    3. Description: A description of the destination
    4. URL: The ServiceNow tenant URL without 'navpage.do' (e.g. https://instance.service-now.com/)
    5. Proxy Type: Internet
    6. Authentication: Supported are BasicAuthentication, ClientCertificateAuthentication, or OAuth2ClientCredentials.
    7. Enter the required authentication information depending on the authentication method
  4. Click the "Save" button

Create Webhook

The rest of the steps is performed in SAP Cloud ALM.

  1. Log on to your SAP Cloud ALM tenant
  2. Navigate to "Administration" > "External API Management"
  3. Select the view "Webhooks Management"
  4. Click the "+" button to add a new webhook
    1. Name: Enter a name for the webhook (e.g. ServiceNow_Prod_Incidents)
    2. Path: Enter the path "/api/now/table/incident"
    3. Destination Id: Select the destination you created in the BTP Cockpit
    4. Destination Type: Select "SNOW"
    5. External Resource Type: Select "Incident"
  5. Your changes are saved automatically.

You can reuse the same webhook in different subscriptions as long as the target is the same table in the same ServiceNow instance.

Create Subscription

After creating the webhook you now can create the subscription.

  1. In "External API Management" navigate to the view "Subscriptions Management"
  2. Click the "+" button to create a new subscription
    1. Name: Enter a speaking name, this is the name users will see when they set up the incident creation for the alert.
    2. Description: Enter a description
    3. Type: Select "Built-in"
    4. Resource Type: Select "EVENT-SITUATION"
    5. Webhook: Select the webhook you created in the previous step
    6. Mapping: Select the mapping you want to use (see next section for details)
  3. Your changes will be saved automatically.

Mapping

The view "Mappings Management" allows you to maintain your own mappings of the fields in the event towards the fields in the incident. SAP ships a standard mapping to map SAP Cloud ALM events to incidents in a ServiceNow with the standard setup. 

If you have customized your ServiceNow instance, it is recommended to create your own mapping and adjust it according to the customizing in your ServiceNow instance. You can copy the SAP-delivered mapping and adjust it.

  1. In "External API Management" navigate to the view "Mappings Management"
  2. Click the "Duplicate mapping" button in the column "Actions"
  3. Click the "Edit mapping" button to open your custom mapping
  4. You can adjust the following fields:
    1. Description: The description of the mapping
    2. Version: The version of the mapping
    3. Source: The source system
    4. Target: The target system
  5. In the field "Mapping Rules" you find the current mapping in JSON format.
  6. Click the "Format rules" button to pretty-print the editor
  7. You can upload your own mapping rules using the "Load rules" button

The mapping for ServiceNow incidents consists of the following components:

  1. Information: The version information for the mapping
  2. Request: Rules for the mapping of the event in SAP Cloud ALM to the incident in ServiceNow. 
  3. Response: Rules for the mapping of the fields in the response from ServiceNow to the event status in SAP Cloud ALM.
  4. EventTypeMapping: Rules to manage the communication events that happen between SAP Cloud ALM and ServiceNow:
    1. CREATED: Post the incident to ServiceNow
    2. UPDATED: Change incident in ServiceNow
    3. PING: Get incident status from ServiceNow
    4. CLOSED: Close incident in ServiceNow

You can find more information in the fields available in the standard mapping in the SAP Help Portal.

Configure Event Reaction

After configuring the integration between SAP Cloud ALM and ServiceNow you can now use this configuration to create incidents from events.

  1. Navigate to the configuration for the application for which you want to create the event and incident
  2. Select the service for which you want to create the event
  3. In the configuration UI, select the tab "Events"
  4. Create an event (The available events differ for different use cases and different service/system types)
    1. Scroll down to "Event Actions" > "Create ServiceNow Ticket"
    2. Click the "+" button to add the correct subscription
    3. Select the subscription that you want to use to create the incident
    4. Save your changes