SAP BTP Job Scheduling Service Using Alert Notification Service ANS

Estimated read time 7 min read

In this Blog an SAP Integration Suite landscape, it’s common for mission-critical integration flows to be executed. In the event of a failure within such a flow—especially one of high importance—it becomes necessary to immediately notify the responsible stakeholders. This is achieved by integrating SAP Integration Suite with the SAP Alert Notification Service (ANS).

Event Source: SAP Integration Suite

SAP Integration Suite acts as the event source. When an error or failure occurs within an integration flow, the system can be configured to emit an event. This event is then captured by SAP Alert Notification Service to trigger a corresponding notification.

Configuration Steps in Alert Notification Service

To set up this event-driven alerting mechanism, follow these key steps in SAP Alert Notification Service:

Define an Action
An action determines what should happen when a condition is met—for example, sending an email, posting to a Microsoft Teams channel, or triggering a webhook.

Create a Condition
A condition specifies the criteria under which the action should be triggered. For example, “IF Integration Flow ‘XYZ’ fails” or “IF status = ERROR”.

Establish a Subscription
The subscription links the condition to the action. Here, you define:

Scope (e.g., subaccount or application level)

Event type (e.g., Integration Flow Error)

Target channel (e.g., Email, Microsoft Teams, Slack)

Notification Delivery Channels

When the subscription is triggered, the defined action is executed. Depending on your configuration, this could result in:

Email alerts to support teams

Real-time messages in collaboration tools like Microsoft Teams

Logging or escalation in external systems via webhooks or APIs

Integration with Cloud Foundry Applications

If your application is deployed in the SAP BTP Cloud Foundry environment, you can bind the Alert Notification Service instance directly to your application. This enables:

Automatic alert generation for lifecycle events (e.g., app crashes, restarts)

Security-related events (e.g., user assignments or role changes)

Operational events for application monitoring

 

 

 

 

Actions

The action defines what will be executed when SAP Alert Notification receives an event from the Job Scheduler. A variety of actions are supported, including sending an email, sending a Microsoft Teams message, calling a webhook, and others.

In this example, we will configure the email option.

Important: According to SAP Help documentation, it is not possible to specify more than one email address directly. However, a common workaround is to use an email distribution list. By sending the alert to a distribution list address, multiple recipients can be notified simultaneously. 

This is the complete list of actions: 
https://help.sap.com/docs/ALERT_NOTIFICATION/5967a369d4b74f7a9c2b91f5df8e6ab6/8a7e092eebc74b3ea01d50… 

 

 

 

 

 

 

Conditions
The condition is a filter to define which alerts/messages we want to work for our listener.

https://help.sap.com/docs/ALERT_NOTIFICATION/5967a369d4b74f7a9c2b91f5df8e6ab6/35ca5de101fc4d5791cdbb... 
 
For the job scheduler, you can configure it according to your needs using the following help 
 
https://help.sap.com/docs/alert-notification/sap-alert-notification-for-sap-btp/jobscheduler-job-exe… 

For example, to receive any Job Scheduler alert/message we can create a condition for the eventType JobFailureCondition.

Subscription
The Subscription acts as a listener that monitors events triggered by the Job Scheduler. In our case, it listens specifically for events with the event type JobFailureCondition.

We associate Conditions and Actions with the Subscription. When the Job Scheduler triggers an event of type JobFailureCondition, the Subscription evaluates the defined Conditions. If the Conditions are met, the associated Actions are executed accordingly.

 

 

 

Send Test Event

{
“eventType”: “sampleType”,
“resource”: {
“resourceName”: “sampleName”,
“resourceType”: “sampleType”,
“tags”: {
“sampleTag”: “sampleValue”
}
},
“severity”: “FATAL”,
“category”: “ALERT”,
“subject”: “Sample Event Subject”,
“body”: “Sample event body.”,
“tags”: {
“ans:correlationId”: “30118”,
“ans:status”: “CREATE_OR_UPDATE”,
“customTag”: “customTagValue”
}
}

 

 

Conclusion 
By integrating SAP Job Scheduler with SAP Alert Notification Service, you can automate critical monitoring tasks and ensure rapid response to failures in your SAP BTP landscape. This setup is essential for maintaining operational continuity and proactive system management. Scenario of using this where timely alerts can help detect deployment issues early and reduce. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

​ In this Blog an SAP Integration Suite landscape, it’s common for mission-critical integration flows to be executed. In the event of a failure within such a flow—especially one of high importance—it becomes necessary to immediately notify the responsible stakeholders. This is achieved by integrating SAP Integration Suite with the SAP Alert Notification Service (ANS).Event Source: SAP Integration SuiteSAP Integration Suite acts as the event source. When an error or failure occurs within an integration flow, the system can be configured to emit an event. This event is then captured by SAP Alert Notification Service to trigger a corresponding notification.Configuration Steps in Alert Notification ServiceTo set up this event-driven alerting mechanism, follow these key steps in SAP Alert Notification Service:Define an ActionAn action determines what should happen when a condition is met—for example, sending an email, posting to a Microsoft Teams channel, or triggering a webhook.Create a ConditionA condition specifies the criteria under which the action should be triggered. For example, “IF Integration Flow ‘XYZ’ fails” or “IF status = ERROR”.Establish a SubscriptionThe subscription links the condition to the action. Here, you define:Scope (e.g., subaccount or application level)Event type (e.g., Integration Flow Error)Target channel (e.g., Email, Microsoft Teams, Slack)Notification Delivery ChannelsWhen the subscription is triggered, the defined action is executed. Depending on your configuration, this could result in:Email alerts to support teamsReal-time messages in collaboration tools like Microsoft TeamsLogging or escalation in external systems via webhooks or APIsIntegration with Cloud Foundry ApplicationsIf your application is deployed in the SAP BTP Cloud Foundry environment, you can bind the Alert Notification Service instance directly to your application. This enables:Automatic alert generation for lifecycle events (e.g., app crashes, restarts)Security-related events (e.g., user assignments or role changes)Operational events for application monitoring    ActionsThe action defines what will be executed when SAP Alert Notification receives an event from the Job Scheduler. A variety of actions are supported, including sending an email, sending a Microsoft Teams message, calling a webhook, and others.In this example, we will configure the email option.Important: According to SAP Help documentation, it is not possible to specify more than one email address directly. However, a common workaround is to use an email distribution list. By sending the alert to a distribution list address, multiple recipients can be notified simultaneously. This is the complete list of actions: https://help.sap.com/docs/ALERT_NOTIFICATION/5967a369d4b74f7a9c2b91f5df8e6ab6/8a7e092eebc74b3ea01d50…       ConditionsThe condition is a filter to define which alerts/messages we want to work for our listener.https://help.sap.com/docs/ALERT_NOTIFICATION/5967a369d4b74f7a9c2b91f5df8e6ab6/35ca5de101fc4d5791cdbb…  For the job scheduler, you can configure it according to your needs using the following help  https://help.sap.com/docs/alert-notification/sap-alert-notification-for-sap-btp/jobscheduler-job-exe… For example, to receive any Job Scheduler alert/message we can create a condition for the eventType JobFailureCondition.SubscriptionThe Subscription acts as a listener that monitors events triggered by the Job Scheduler. In our case, it listens specifically for events with the event type JobFailureCondition.We associate Conditions and Actions with the Subscription. When the Job Scheduler triggers an event of type JobFailureCondition, the Subscription evaluates the defined Conditions. If the Conditions are met, the associated Actions are executed accordingly.   Send Test Event{
“eventType”: “sampleType”,
“resource”: {
“resourceName”: “sampleName”,
“resourceType”: “sampleType”,
“tags”: {
“sampleTag”: “sampleValue”
}
},
“severity”: “FATAL”,
“category”: “ALERT”,
“subject”: “Sample Event Subject”,
“body”: “Sample event body.”,
“tags”: {
“ans:correlationId”: “30118”,
“ans:status”: “CREATE_OR_UPDATE”,
“customTag”: “customTagValue”
}
}  Conclusion By integrating SAP Job Scheduler with SAP Alert Notification Service, you can automate critical monitoring tasks and ensure rapid response to failures in your SAP BTP landscape. This setup is essential for maintaining operational continuity and proactive system management. Scenario of using this where timely alerts can help detect deployment issues early and reduce.                                     Read More Application Development and Automation Blog Posts articles 

#SAP

You May Also Like

More From Author