0% found this document useful (0 votes)
122 views8 pages

I Will Showcase How SAP Alert Notification Service Can Be Used To Generate Incidents in ServiceNow For Iflow Execution Failure in Cloud Integration

Uploaded by

kittugrepthor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views8 pages

I Will Showcase How SAP Alert Notification Service Can Be Used To Generate Incidents in ServiceNow For Iflow Execution Failure in Cloud Integration

Uploaded by

kittugrepthor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

I will showcase how SAP alert notification service can be used to generate incidents in ServiceNow for

iflow execution failure in Cloud Integration.


Configuration in ServiceNow:

Step 1:Create a user which will be used for integration and assign 'incident_manager' role to it.

Navigation path for ServiceNow:

All -> User Administration -> Users

As 'Internal Integration User' option is checked it will disable UI login for the created user.
Step 2:Create a group for supporting incidents related to CPI and add members to that group.

All -> User Administration -> Groups

Configuration in Alert Notification Service:

Step 1:Create service key for Alert Notification as below.

{
"type": "OAUTH"
}

This will generate client Id and client secret along with token URL details as below.

{
"url": "https://clm-sl-ans-live-ans-service-api.cfapps.us10.hana.ondemand.com",
"oauth_url": "https://xxx.authentication.us10.hana.ondemand.com/oauth/token?
grant_type=client_credentials",
"client_id": "xxx",
"client_secret": "xxx"
}

Step 2:

Create Action for ServiceNow incident as below.


Using field mapping option, provide the desired assignment group for this action. To know the column
names of 'incident' table, check 'System Definition' in ServiceNow.
In advanced action properties, 'Enabled Delivery Status' is checked.

Step 3:Create condition as below for CPI alerts.


Step 4:Create subscription containing the created action (Step 2) and condition (Step 3).

Step 5:For delivery status, create two conditions as shown below.


Step 6:Create action type (for example: email) and subscription for the delivery status.

In this case, payload template of action 'Email' is set as {body}.


Configuration in Cloud Integration:

Step 1: Create credential of type 'OAuth2 Client Credentials' for writing alerts to Alert Notification
Service. It contains the client id/secret of service key of alert notification.
Step 2: Create credential of type 'OAuth2 Client Credentials' named 'CI_OAUTH_CLNT' for
accessing message processing log. For this, service key of service 'SAP Process Integration Runtime' and
plan 'api' is used.

Step 3:Use standard integration package - 'SAP Cloud Integration with SAP Alert Notification service for
SAP BTP'

IFlow - Send notifications for failed Message Processing Logs

Configuration parameters
Use 'url' value of service key of service 'SAP Process
CI Tenant Base URL
Integration Runtime' with plan type 'api'
CI Authentication Type OAuth2ClientCredentials
CI Technical Client Name CI_OAUTH_CLNT
SERVICE_OAUTH_CLNT [ANS credential of type
Service Technical Client Name
OAUTH]

{url}/cf/producer/v1/resource-events
Service Resource Events URL

Use 'url' value of service key of ANS


Source Event ID Strategy
PER_INTEGRATION_FLOW

Outcome: The incident is created due to Iflow execution failure.


Email body for delivery status as failure :

Delivery of event with type 'CPIIntegrationFlowExecutionFailure' failed after 1 unsuccessful attempt(s)


through action with name 'ServiceNow'. For additional information, use the Consumer API (Undelivered
events). For details on credential management refer to this link: https://help.sap.com/docs/alert-
notification/sap-alert-notification-for-sap-btp/credential-management.

TakeAway Points:

1. Alert notification service natively supports integration with ServiceNow. It makes configuration
easier.
2. ANS recognises a sequence of stateful events if these share the same value for the predefined
tag 'ans:sourceEventId'.
3. The 'Source Event ID Strategy' in the IFlow is configured with the value
'PER_INTEGRATION_FLOW'. This ensures that the same ‘ans:sourceEventId' is generated based
on the IFlow, allowing only one incident to be created per IFlow. For subsequent failures within
the same IFlow, work notes are added to the existing incident.

How does Source Event ID have always the same value for each IFLOW?

It is the MD5 digest value of the IFlow ID, which is generated using groovy script in the standard IFlow.

You might also like