SAP Cloud ALM Integration: Events to Tickets with ServiceNow
In this series of blog post, we cover different use-cases of integration between SAP Cloud ALM and external ALM services.
All Integration scenario of SAP Cloud ALM are based on the public APIs listed in the SAP API Business Hub.
When events are created in SAP Cloud ALM, you would like to forward those events to an external ticketing system to create an incident or a case.
- The External System must support one of the following Authentication protocol:
- You need a technical user in the external system that has the authorisation to create incidents and/or cases.
- You need access to the SAP Cloud ALM sub-account in BTP Cockpit.
- Your user needs the role “Connectivity and Destination Administrator” in the SAP Cloud ALM sub-account.
To implement this integration scenario, you need to complete the following Steps:
- Create a BTP destination to the third-party system.
- Declare a web-hook in SAP Cloud ALM.
- Manage your payload transformation mapping.
- Declare a subscription in SAP Cloud ALM.
- Add an Event Situation reaction in your SAP Cloud ALM Intelligent Event Processing application
Step1: Create Destination in BTP Cockpit
A destination created in SAP BTP Cockpit is used to establish the connectivity between your SAP Cloud ALM tenant and the external system.
- Log on to the BTP Cockpit and enter your SAP Cloud ALM sub-account
- Navigate to “Connectivity” > “Destinations” and create a “New Destination”
- Type: HTTP
- Name, Description, URL of the external system.
- Proxy Type: Internet
- Authentication: Enter the required authentication information depending on the authentication method
Step 2: Create Web-hook
The web-hook is used to point to the a specific resource by specifying the full base URL path.
- Log on to your SAP Cloud ALM tenant.
- Navigate to “Administration” > “External API Management” > “Webhooks Management” to add a new web-hook with the following parameters:
- Path: Enter the path of the resource: “/api/now/table/incident”.
- Destination Id: Select the destination you created in the BTP Cockpit.
- Destination Type: Select “SNOW”.
- External Resource Type: Select “Incident.
Step 3: Manage Transformation Mapping
The view “Mappings Management” allows you to maintain your own mappings between the event situation payload and the incident’s attributes.
SAP ships a standard mapping to map SAP Cloud ALM events to the incidents defined by a ServiceNow standard setup.
If you have customised your ServiceNow instance, you can create your own mapping and adjust it according to the customising in your ServiceNow instance.
Step 4: Create Subscription
A subscription is an Internet web-hook referring to your external partner service: In order to receive change messages, external Application should be registered as SAP Cloud ALM subscriptions.
Each subscriptions manages specific resources types by sending SAP Cloud ALM resources changes messages to identified destination and applying optional transformation mappings.
- Log on to your SAP Cloud ALM tenant
- Navigate to “Administration” > “External API Management” > “Subscriptions Management” to add a new subscription with the following parameters:
- Name, Description.
- Type: Select “Built-in”
- Resource Type: Select “EVENT-SITUATION“
- Webhook: Select the web-hook you created in the previous step
- Mapping: Select the mapping you want to use.
Step 5: Configure Event Situation Reaction
After configuring the integration between SAP Cloud ALM and ServiceNow you can now use this configuration to create incidents from events.
- Navigate to the configuration for the application for which you want to create a ticket from selected events.
- In the configuration UI, select the tab “Events”.
- Select an event.
- Scroll down to “Event Actions” > “Create ServiceNow Ticket“
- Click the “+” button to add the correct subscription
- Select the subscription that you want to use to create the incident.