Skip to Content
Technical Articles
Author's profile photo Kiril Gavrailov

Receive Notifications for Failed SAP Cloud Platform Integration Flows via Any Channel with Alert Notification

Pre-read

This blog post is part of a series of blog posts related to SAP Cloud Platform Alert Notification service.

You can relate to the parent blog post for more detailed information about the service itself.

Very often, we have multiple Integration Flows running in our SAP Cloud Platform Integration environment. Depending on their setup and dependencies, those can fail due to numerous reasons.

We are happy to tell you that SAP Cloud Platform Alert Notification is now integrated with SAP Cloud Platform Integration. You are now able to understand about every Integration Flow failure that happens via the alert management channel you like.

How does it work?

What we have done so far is that we have introduced a package, available on SAP API Business Hub. Once you configure this package into your SAP Cloud Platform Integration tenant, it is going to start reading the Message Processing Logs for you. Then it is going to send failures to SAP Cloud Platform Alert Notification. On the Alert Notification side, you can subscribe to receive that notifications.

The whole process of the configuration takes about 30 minutes. Read on to find out a short tutorial of how to configure your Cloud Platform Integration and Alert Notification.

Configure and receive your first alerts

Prerequisites

  1. You need to have an active subscription for SAP Cloud Platform Integration
  2. You need to have an active subscription for SAP Cloud Platform Alert Notification

Configure SAP Cloud Platform Alert Notification

What we are going to do first is to obtain credentials which Cloud Platform Integration needs.

Also, we are going to create the subscriptions for receiving an alert. In our example, we are going to use email. However, Alert Notificaitton supports multiple channels such as – SAP Solution Manager or Focused Run for Solution Manager, Slack. And virtually any alert management tool which supports WebHook such as ServiceNow, Jira, etc.

 

Obtain Credentials from Alert Notification

Let’s obtain the credentials that we are going to need. Depending on your setup, you can use either BASIC or OAuth authentication. In this example, I am going to use BASIC.

  1. Navigate to Alert Notification UI in your Cloud Cockpit. This you can find in the Subscriptions tab of your CF Space or Neo Subaccount.
  2. Click on the Service Key section and then on the Create Service Key button
  3. In the popup give the credentials a meaningful name and also put the following lines if you want basic authentication in the Configuration Parameter input field.
    {"type":"BASIC"}​

  4. Click on the Save button. Once you do that you will see your credentials for a given landscape. You are going to need those later on when you configure your CPI.

 

Configure Subscription in Alert Notification

We have prepared the configuration for you all you have to do is to import it. With this configuration, you are going to receive a notification for each failed integration flow in your CPI tenant. You can fine-tune this and filter it for particular integration flows. This is explained later in that blog post.

  1. In the JSON below replace <Your Email> with the email you want to receive a notification to.
    {
      "conditions": [
        {
          "name": "CPIIntegrationFlowIsFailed",
          "propertyKey": "eventType",
          "predicate": "EQUALS",
          "propertyValue": "CPIIntegrationFlowExecutionFailure",
          "labels": [],
          "description": ""
        }
      ],
      "actions": [
        {
          "name": "SendMeAnEmail",
          "state": "ENABLED",
          "labels": [],
          "description": "",
          "destination": "<Your Email>",
          "type": "EMAIL"
        }
      ],
      "subscriptions": [
        {
          "name": "FailedIFlow",
          "conditions": [
            "CPIIntegrationFlowIsFailed"
          ],
          "actions": [
            "SendMeAnEmail"
          ],
          "labels": [
            "CPI"
          ],
          "state": "ENABLED",
          "description": ""
        }
      ]
    }
  2. Click on the Import/Export section of the Alert Notification UI and paste the JSON. Then click import.
  3. Note: You need to confirm your email. To do so, go to the Actions tab, click on the SendMeEmail action, click on the action and click the Confirm Action button. Then follow the instructions.
  4. Optional: Once you are done, you can also send a test alert. Go your subscription in the Subscriptions section and click on Send Test Event button.

 

Configure SAP Cloud Platform Integration

Before you start with this section, you should have:

  1. Credentials name for a user that has permissions in the CPI tenant. The default value is CPI_USER.
  2. Service Technical Client Name: Credentials name for the technical client created in SAP Cloud Platform Alert Notification. Supported types are Basic Authentication or OAuth2 Client Credentials flow. The default value is SERVICE_TECHNICAL_CLIENT. It should hold the basic or OAuth credentials that we have configured in the previous section.

 

Once you have done this, follow the steps below:

  1. Go to the Discover section in SAP Cloud Platform integration and search for SAP Cloud Platform Alert Notification
  2. Once you find the integration flow click on it then click on the Copy button.
  3. Once you have copied the integration flow, you should be able to find it in the Design section.
  4. Click on the Integration Flow it should look like this.
  5. Click on the Configure button. On the first screen, set a timer to point how often do you want it to run. The default is 5 minutes.
  6. In the Receiver tab, you should configure your CPI tenant and also point to the user who has permissions in that tenant.
  7. In the More tab, configure the Alert Notification endpoint and authentication from the previous steps.
  8. Click on the Deploy button. Once the integration flow is deployed, and some integration flow in your tenant fails, you will receive an email with similar content.

If you want to filter the notifications for specific integration flows you can simply play a little with the conditions in Alert Notification and filter by cpi:integrationArtificat.Id

What’s Next?

We are working on ever seamless integration between Alert Notification and SAP Cloud Platform Integration, so stay tuned.

A lot of new features will come in Alert notification amongst which are – SMS and ServiceNow integration.

We are looking forward to trying this out and give us feedback.

Assigned Tags

      95 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Bhalchandra Wadekar
      Bhalchandra Wadekar

      Thanks Kiril. Alert Notification is always there in every flow. It is exciting that we have separate service for it now.

      I tried to replicate the steps, however, I can't see Alert Notification service under DevOps. Am I missing a step?

      Kind regards,

      Bala

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Bala,

      thanks for the comment.
      can you contact me at: k.gavrailov at sap dot com I am going to take to the technical team.
      also can you mention which is this landscape?

      Thanks,

      Kiril

      Author's profile photo Sriparna Bandyopadhyay
      Sriparna Bandyopadhyay

      Hello Kiril,

      It seems the service is not available for all regions as mentioned in below link.Please confirm by when we can get it for all regions?

       

      https://help.sap.com/viewer/5967a369d4b74f7a9c2b91f5df8e6ab6/Cloud/en-US/086361cb02fb467993acd6f9515607d4.html

       

      Regards,

      Sri

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Sri,

      thank you for your comment.
      It is possible to get the service everywhere. We are providing it based on customer demand for CF, for Neo it is going to be configured for all available Neo landscapes during Q4.

      Next in line is the US3 region (US Chandler) which is planned to be available next Friday (25.10), of course, delays might occur.

      Next in our priority are Sao Paolo and Sydney for both CF and Neo environments. We are working on a detailed roadmap for this.

      Can I ask you which are the regions that are an interest for you in order to provide you with more accurate timelines? You can drop me an email to - k.gavrailov at sap dot com in order to discuss details.

      Thank you,

      Kiril

       

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      P.s. on 25.10 we also expect US Sterling, US Colorado Springs and Tokyo Data centers for Neo.

      Author's profile photo Sriparna Bandyopadhyay
      Sriparna Bandyopadhyay

      Thanks Kiril for the update!

      Author's profile photo Adam Kiwon
      Adam Kiwon

      Dear Kiril,

      is it planned to provide this service also in the Trial Account?

      Best regards, Adam

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Adam,

      thank you for the comment.

      Currently, Alert Notification is available on the Cloud Foundry Trial. However, the CPI scenario should work fine with that, as it is a matter of configuration, so you can simply configure CPI to work agains CF trial. We do not have plans for getting ANS on Neo Trial at this moment.

       

      Thanks,

      Kiril

      Author's profile photo Maximiliano Colman
      Maximiliano Colman

      Hi,
      It’s not working on CF trial environment, I’m getting this error on CPI calling to MPL api:

      Kind Regards.

      Max.

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Hi Max,

      thanks for that.

      I will take this to the dev team and update you back.

       

      Thanks,

      Kiril

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      HI Max,

      we continue looking at the problem. We cannot reproduce it. Can you get in touch with me on k.gavrailov at sap dot com I can connect you with the dev team, they will look at this together with you 🙂

      Author's profile photo Maximiliano Colman
      Maximiliano Colman

      Hi Kiril,

      I've just sent you an email.

       

      Kind Regards.

      Max.

      Author's profile photo Anirban Mallick
      Anirban Mallick

      Hello Kiril,

      On our Alert Notification overview page, I couldn't find the "Service Keys" option.

      I could not find that under the Sub-account Subscriptions too. Can you please help?

      Best Regards,

      Anirban

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Anirban,

      thank you for your interest. Service Keys can only be used in Cloud Foundry context. We see that you are on Neo, you can use a dedicated technical client. You can refer to this help page section Neo environment

      https://help.sap.com/viewer/5967a369d4b74f7a9c2b91f5df8e6ab6/Cloud/en-US/80fe24f86bde4e3aac2903ac05511835.html

      If you have any further need of support, don't hesitate to get in touch! 🙂

      Regards,

      Kiril

      Author's profile photo Anirban Mallick
      Anirban Mallick

      Thanks a lot, Kiril for your prompt response.

      The flow is working fine.

      Best Regards,

      Anirban

      Author's profile photo Shreyashri Kar
      Shreyashri Kar

      Hi Kiril,

      Could you please let me know if this particular feature is applicable in the CPI trial account.

      I have followed your post & could complete till the part where we create an Alert Instance.
      After that I could not find the Import/Export option in the Alert Notification UI.

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Shreyashri,

      thank you for your question.

      We are experiencing some challenges with trial landscape. We are working on a fix. I will keep you posted once we have this.

      Thanks,

      Kiril

      Author's profile photo shobhit taggar
      shobhit taggar

      Hi Kiril,

      We are planning to subscribe for SAP CPI over Neo with Enterprise Edition. Do we have this alert service bundled with Enterprise edition ? Can you share any source for this information ?

       

      BR

      shobhit

       

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Shobbit,

      Please excuse me for the delayed response, I was on vacation.

      We are working into bundling the ANS into Enterprise Edition, it should happen very soon, I will keep you posted once we have it.

      Cheers,

      Kiril

      Author's profile photo Prardhana S Bala
      Prardhana S Bala

      Hi Kiril Gavrailov,

      Thanks for writing great blog with good example.

      I have followed your blog and i achieved the alert notification. my client is asking to configure sender mail id  as custom  ex : abcd@xyz.com. Can you guide me where i can configure custom from mail id in SCP alert mechanism.

       

      Regards,

      Prardhana S

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Prardhana,

      thank you for getting in touch.

      To setup this, you can refer to that help page in the section "Email with custom SMTP server Action".

       

      In case you have additional questions don't hesitate to get in touch.

       

      Cheers,

      Kiril

      Author's profile photo Prardhana S Bala
      Prardhana S Bala

      Hi Kiril,

       

      Can we send the attachments using the SCP Alert Mechanism.

       

      Regards

      Prardhana

       

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Prardhana,

      Thank you for getting in touch. Can you elaborate a bit more on what attachments would be? Are those some files with content in them? If it is too long you are always welcome to drop me an email at - k.gavrailov at sap dot com.

      Thank you,

      Kiril

      Author's profile photo Dhanish Joseph Polapparambil
      Dhanish Joseph Polapparambil

      Great blog and this is what we are looking for now . I am unable to find the alert service under our APIM instance (Home [US West (Chandler)] ) . Can you assist?

       

      Thanks,

      Dhanish

       

       

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Dhanish,

      thank you for getting in touch. This is so, because for Neo Alert Notification should first be acquired via SAP Store. https://www.sapstore.com/solutions/47001/SAP-Cloud-Platform-Alert-Notification-Service - once you do that the service is going to be visible into Cloud Cockpit.

      In case you have any more questions don't hesitate to ask.

       

      Thanks,
      Kiril

      Author's profile photo Dhanish Joseph Polapparambil
      Dhanish Joseph Polapparambil

      Thank You !

      Author's profile photo shobhit taggar
      shobhit taggar

      Hi Kiril,

       

      Quick Question : We are having CF CPIS subaccounts for Dev/QA/Prd.

      1. For ANS do we need to activate in the same subaccount where we have the CPIS subscription OR we can have a separate subaccount to subscribe for ANS ?
      2. Can we subscribe to ANS service and if it can be shared among 2 subaccounts. For Example, we can activate it production CPIS subaccount for production alerts and same service can be shared with QA for testing purpose.
      3. If point 2 is not possible then do we need to have seperate subsciption for ANS for QA and Prod subaccounts for alerting failed integration flows. IF yes, do SAP charge for non prod service ?

      BR,

      Shobhit

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Shobhit,

      thanks for your questions.

      1. No you can activate it in any subaccount and configure the CPI to send alerts to it. So separate or same it is your choice 🙂
      2. Yes, if you don't use ANS for alerts specific to the subaccount (like CPU or memory usage) but you use it for CPI notification this is possible.

       

      In case you have more questions don't hesitate to ask.

      Cheers,

      Kiril

      Author's profile photo Vasudeva Gembali
      Vasudeva Gembali

      Hi Kiril,

      We are using SAP CPIS in CLoud Foundry (Singapore).

       

      I am following this blog but can't find configuration link at

      Configure Subscription in Alert Notification - Point 1, 2...

      How can I configure in CF?

       

      vasu

       

       

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Hi Vasu,

      thanks for getting in touch.

      Please refer to the attached screenshot in order to access the ANS. In case you have more questions don't hesitate to ask.

      Author's profile photo Vasudeva Gembali
      Vasudeva Gembali

      HI Kiril,

       

      We have followed according to your blog but not able to receive any email alerts from CPI monitoring flows. And, also we tried to trigger test messages but not receiving any alerts. Kindly help to guide me. Can we get your contact number to reach you on clarification? Else, please reach me on vasudev.gem@gmail.com

       

       

       

       

       

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Vasudeva,

      apologies for the delay. Please get in touch with me at k.gavrailov at sap dot com

      Author's profile photo Jurgen Lootens
      Jurgen Lootens

      Hi

       

      Can you please  confirm that errors on CPI flows in Neo environment can also be monitored and alerts sent to email?

       

      I can see ANS is for system load and availability etc... but it is not clear if we can monitor errors on the flows in CPI.

       

      Thank you

      Jurgen

      Author's profile photo Martin Lakov
      Martin Lakov

      Hello Jurgen,

      using the above-mentioned flow you can receive information about flow errors for both NEO & CF.

      Best Regards,
      Martin

      Author's profile photo Peter Asigbetse
      Peter Asigbetse

      Hi Kiril Gavrailov,

      I'm trying to get ANS working on a SCP Trial account on Cloud Foundry, everything is enabled, condition is 'eventType = Any value', I see events in the event log for my app but the ANS does not trigger and send me an email (Email address was confirmed). I've also set an action to store events but my API call comes back with HTTP 200 but no results.

      You mention a 'Send Test Event button.' but there is none that I can see...is this a Neo thing?

      Thanks, Peter

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Hi Peter,

      thanks for getting in touch. There’s one more configuration that has to be done in order to receive the app events for CF. You should add one of our technical users to your account as a Space Auditor, this will enable ANS to have permissions to take this information from the platform. In the trial case this is the EU10 user – sap_cp_eu10_ans@sap.com

      More information can be found on this help page

      Once you add the user wait for 5 minutes, then start/stop/restart your app and you’ll get an alert.

      If you have configured this and still do not receive alerts please do tell.

      Thanks,

      Kiril

       

      Author's profile photo Peter Asigbetse
      Peter Asigbetse

      I just wanted to say a big thanks Kiril Gavrailov for the solution which you correctly diagnosed but also for the quick response and actively helping us all even after you published this blog post back in 2019! All working now 🙂

      Thanks, Peter

      Author's profile photo sopan bhokre
      sopan bhokre

      Hi Kiril,

      Great Blog!!

      I followed all the steps, but I am facing one issue in artifact with receiver OData adapter throwing below error.

      Could you please tell me any solution to this?

      Thank you

      Sopan

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Sopan,

      Thanks for getting in touch.

      We will have a look and get back to you.

       

      Thanks,

      Kiril

      Author's profile photo Simeon Petkov
      Simeon Petkov

      Hello dear Sopan,

       

      We are currently looking into your issue.

      In order to help us with the investigation could it be possible for you to provide us with some more details.

      We are mostly interested in the 'CI Tenant Base URL' property.

      If you want feel free to contact me directly at s.petkov@sap.com.

       

      Best Regards,

      Simeon

      Author's profile photo sopan bhokre
      sopan bhokre

      Hi Simeon and Kiril,

      Thank you for your reply!! Really appreciate the quick response.

      I have found the solution. The problem was with the user credential role. It worked fine after assigning the 'PI_Read_Only' role.

       

      Thanks and Regards,

      Sopan

       

      Author's profile photo Simeon Petkov
      Simeon Petkov

      Dear Sopan,

       

      I am glad to hear that everything is working.

       

      Best Regards,

      Simeon

      Author's profile photo Rutika Raorane
      Rutika Raorane

      Hi Kiril,

       

      Is Alert notification service available for Neo environment, US East (Sterling) region?

      I do not see it in available services yet.

       

      Regards,

      Rutika

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Rutika,

      thanks for getting in touch, Yes the ANS is available on US East region. However in order to appear in the cockpit it has to be purchased first via SAP Store

      In case you have more questions, do not hesitate to get in touch

       

      Thanks,

      Kiril

      Author's profile photo Rutika Raorane
      Rutika Raorane

      Thank you for your prompt response!

       

      Regards,

      Rutika

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Hi Kiril Gavrailov ,

      Thanks for the document.

      I am trying to replicate it on my CF trial account.

      I created service keys on BTP. I used same in my deployed std artfact.

      However I am getting 401 error.

      Please suggest what is wrong here.

       

       

      I tried this URL and basic authentication (service keys) in POSTMAN. I am getting same 401 error.

      TIA,

      Rashmi

      Author's profile photo Martin Lakov
      Martin Lakov

      Hello dear Rashmi,

      the error you are experiencing is most probably caused because of the use of a technical client that supports OAuth 2.0 authentication in order to perform BASIC authentication. Can you, please, check this document and confirm that you're using the correct type of technical client for the authentication ?

      Best Regards,
      Martin

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Hi Martin Lakov

      With Basic Aithentcation I was gettng 401 error so I tried with OAuth 2.0 authentcation and this time I am getting 404 error.

      Any idea what is causing this issue.

       

       

      Error Details
      org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-bf06a028-7fcb-4501-6e16-1148-1620120744985-14-1], cause: Assertion failed: assert postRequest.getResponseCode() == SERVICE_SUCCESS_STATUS_CODE | | | | | 404 | 202 | false sun.net.www.protocol.https.DelegateHttpsURLConnection:https://clm-sl-ans-live-ans-service-api.cfapps.eu10.hana.ondemand.com/
      TIA,
      Rashmi

       

       

       

       

      Author's profile photo Martin Lakov
      Martin Lakov

      Hello dear Rashmi,

      in order to continue troubleshooting I'd need some additional details from you. Would you mind if we continue our discussion via e-mail ? You can reach me on martin.lakov @ sap.com

      Best Regards,
      Martin

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Hi Martin Lakov,

      Thank you so much.

      Please check you mail.

       

      Regards,

      Rashmi

      Author's profile photo Sri Naik
      Sri Naik

      Hi,

       

      I am getting the same 404 error. Were you able to resolve the issue?

       

      Regards,

      Sri

      Author's profile photo Pooja Tiwari
      Pooja Tiwari

      Hello Rashmi,

      Alert Event service URL should be

      https://<your endpoint>.hana.ondemand.com/cf/producer/v1/resource-events

      I was facing the same issue. when I added <cf/producer/v1/resource-events> at the end it resolved the issue.

       

      Thanks,

      Pooja

      Author's profile photo Amey Mogare
      Amey Mogare

      Hello Kiril and Martin,

      Thank you for wonderful blog to explain the process stepwise and continuously supporting us in our queries.

       

      I have created a subscription in my trial cloud foundry subaccount and added condition that it should send an email to my internal corporate slack channel and an email to my personal gmail id, when a user is added as a Space Developer in dev space inside trial subaccount.

      I have confirmed the email action with the confirmation code that I received on my personal gmail.

      However, when I do Send Test Notification or even add a user to dev space as Space Developer, no Slack message or E-mail is seen.

      Could you please suggest what's going wrong here and what should I do?

       

      Warm Regards,

      Amey

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Amey,

      thanks for getting in touch. I assume the following - when you hit the "Send Test Event" button there is a json that describes the test event. If the subscription you've defined is let's say something like "eventType is equal to CPIIntegrationFlowIsFailed", you should adapt this json to match the conditions of your subscription. So in this example you should change the value of eventType from sampleType to CPIIntegrationFlowIsFailed

      In case you have more questions don't hesitate to get in touch.

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      eventtype

      eventtype

      Author's profile photo Amey Mogare
      Amey Mogare

      Hello Kiril,

      Thank you so much for prompt reply. Yes!! when I put audit.user.space_developer_add eventType that matches with the condition I defined, I received an email on my Gmail!!

      Could you pls comment on below as well?

      1. In second action, of the same condition, I have configured my company's internal corporate Slack channel URL (I went to my own Slack chat window & copied the URL and pasted it in Action). But I didn't receive any message on my Slack window? Any idea what's wrong here? Does it have to do something with my company's VPN, network restrictions?
      2. I tried to simulate actual event, by added a user in "Space Developer" role in subaccount "trial" > Space "dev". But I didn't receive any email (in Gmail) or ping (on Slack)
      3. Is there any kind of monitoring mechanism where I can see history of all subscriptions matched & executed and if failed. I mean, as a SAP BTP admin, can I check somewhere what all mails/pings/actions are executed by Alert Notification service instance?

      Warm Regards,

      Amey

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Hi Amey,

      let me get your questions to the dev team and I or some colleague will get back to you

       

      Thanks,

      Kiril

      Author's profile photo Valentina Dimitrova-Ivanova
      Valentina Dimitrova-Ivanova

      Hello Amey,

      Please find my comments on the points you’ve raised:

      1. You should enter the Slack Webhook URL in the URL Address field of your action of type Slack, not the channel URL. The Webhook URL for the channel you can get after adding Incoming WebHooks integration (in Slack go to Apps->Add apps, search for 'Incoming WebHooks' and add it to Slack; select the channel you’d like to use in Post to Channel dropdown, then after choosing 'Add Incoming WebHooks integration', you’ll see the Webhook URL that you should use in your Slack action configuration);

      2. In order to receive User Lifecycle events from Alert notification, you should add a special technical user as Space Auditor for your space. Please find the technical user that corresponds to the data center where your account is created in the following page:
      https://help.sap.com/viewer/5967a369d4b74f7a9c2b91f5df8e6ab6/Cloud/en-US/4255e6064ea44f20a540c5ae0804500d.html

      3. There is no way for you to check which subscriptions were matched and actions were executed but there is an option to specify a fallback action – an alternative action to be executed, if the original fails – just expand the Advanced Action Properties section when you create or edit an action to select a fallback action… And in case there is no fallback action or the fallback action itself failed, you can pull the events that were not successfully delivered using the following API – see the Undelivered events in particular:
      https://api.sap.com/api/cf_consumer_api/resource
      If you include the query parameter 'include' in your GET request with value 'FAILURE_REASON', you may get some hints why the delivery of an event/execution of an action failed.

      Please let me know, if you have further doubts!

      Thanks,
      Valentina

      Author's profile photo Amey Mogare
      Amey Mogare

      Hello Valentina,

      Thank you for elaborate, informative & prompt reply.

      Points-1 & 2. I'll give it a go now.

      Point-3, quite a long way though, I'll probably park that topic now.

      Warm Regards,

      Amey

      Author's profile photo Ravibabu Adari
      Ravibabu Adari

      Hi Kiril,

      Followed the steps, please could you advise the reason for the below error.

       

      Many Thanks,

      Ravi

       

      Author's profile photo Simeon Petkov
      Simeon Petkov

      Dear Ravibabu,

       

      Could you please contact me at 's.petkov@sap.com'.

      I would like to ask you some more details in order to be able to continue with the troubleshooting.

       

      Best Regards,

      Simeon

      Author's profile photo Joel Langoyan
      Joel Langoyan

      May I know if there has been an update for this issue? I just tried to follow the same steps for the trial account and encountered the same errors.

      Author's profile photo Javier Martin
      Javier Martin

      Hello! About the "SAP Alert Notification Service for SAP BTP" price. In my CPI I can see 15000 messages in the last month. Is that the same as Outbound API calls? Thanks!

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Javier,

      The number of outound API calls is equivalent to the number of events delivered to you (over email, webhook, ticketing or automation system). This number depends on the subscriptions you have configured in your SAP Alert Notification service instance.

      For example, you have configured to receive a Slack message and an email when an event about flow with name XYZ arrives. Once such event arrives in SAP Alert Notification service, you'll receive it over the two configured channels and then you'll be charched with 2 API calls. On the other hand, if you have not configured to receive events about flow with name ABC, then you'll not receive such events and you'll not be charged.

      If you need further details, feel free to contact me on kristina.dzhurdzhina@sap.com.

      Best regards,
      Kristina

      Author's profile photo Michael T Schmidt
      Michael T Schmidt

      Hi,

      Very good writing.

      How come, when importing JSON as in step 2 above, I get this message:

      "

      Choose OK to import and replace Alert Notification configuration in this service instance.

      NOTE: This operation erases any previous subscriptions, actions, and conditions.

      If configuration is valid, it will change the following:
      Action with a name alertstore will be deleted
      ...
      ...

      "

      Can that be avoided?

      BTW - I do also, as Rashmi J had in May, get the 401 issue. Could you please elaborate a bit more what you mean by;

      "....correct type of technical client for the authentication?" ?

      Quite sure that when looking/following Credential Management - SAP Help Portal everything should be "fine" when on a CF account.

      Best regards,

      Michael

      P.S. OSS is created for a couple of issues related to ANS, hoping an expert soon will contact me;-)

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Michael,

      If I understand you correctly, you want to avoid deletion of your previous configuration when you import a new one, right? If so, this is not possible as the "import" option is meant to overwrite the entire configuration at once. However, you could workaround this by the following steps:

      1. Export your existing configuration in a file;
      2. Merge the existing configuration with the new one manually;
      3. Import the result.

      I cannot say what Kiril had in mind by "....correct type of technical client for the authentication?". But I suspect that your CF service key is of type OAuth2.0 (it contains oauth_url property) and you have registered the same as a service client of type BASIC in Cloud Integration. If this is the case, you should create a new service key of type BASIC in SAP Alert Notification service (providing the parameter as described here) and update you service client in Cloud Integration accordingly.

      Last but not least, you mentioned about open cases about SAP Alert Notification service... Could you, please, ensure that these are on the BC-CP-LCM-ANS component? I haven't come across cases from your side on our component so far 🙁

      Best regards,
      Kristina

      Author's profile photo vijay kumar
      vijay kumar

      Hi Kiril ,

      In our project we are getting around 10000 error mails per hour due to which our outlook is getting hanged .How to overcome this challenge .Kindly share your views or else best practices.

       

      Regards,

      Vijaykumar.

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Vijay,

      Could you filter out some of the notifications - for example, not to receive notifications for particular flows? Or you need all of them? Is another delivery channel an option?

      Best regards,
      Kristina

      Author's profile photo Vijay Konam
      Vijay Konam

      Kiril Gavrailov - Do you think SAP Cloud ALM would replace the capabilities of Alert notification Service or it will stay separately as an independent service offering?

      Thanks.

      Vijay Konam (VJ)

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Vijay,

      The services would go on as independent offerings as each of them has its own focus area – SAP Cloud ALM is a comprehensive monitoring solution across multiple SAP LoBs whereas SAP Alert Notification service is an unified alerting engine across BTP.

      Additionally, both the solutions are well integrated - you could benefit from SAP Alert Notification service events within SAP Cloud ALM.

      Regards,
      Kristina

      Author's profile photo Vijay Konam
      Vijay Konam

      Thank Kristina. So, Routing CPI errors to ALM first and then making use of alerting from ANS is preferred or CPI to ANS directly? End of the day, I would have to route the errors to ANS right? Or am I missing something here?

      Thanks.

      Author's profile photo Ralf Berhorst
      Ralf Berhorst

      Hello Kiril,

      the ANS wasnt in use until now. Our target is to have the alerts in the SAP Solution Manager. We followed the article from  Milena  too for the SolMan connection.

      I think we create the example settings you provide for our first test. Now we try to validate the "message flow".

      Big question , are we able to access the "store" in the BPT to check the information inside?

      Best regards

      Ralf

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Ralf Berhorst,

      Do you mean accessing the stored SAP Alert Notification service events within some dashboard in BTP Cockpit? If so, as of today it is not possible - you could only check them over the Consumer API (Neo or Cloud Foundry based on your BTP environment) → the matched events endpoint.

      If this is not what you're looking for, could, please, explain what do you refer to by "BPT"?

      Best regards,
      Kristina

      Author's profile photo Philippe Addor
      Philippe Addor

      Hi all,

      I wrote an auxiliary or follow-up post for the Cloud Foundry environment here: https://blogs.sap.com/2022/02/01/connect-sap-platform-integration-with-alert-notification-service-cloud-foundry

      Regards,

      Philippe

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Philippe,

      Great job! Thanks a lot for your contribution to our community 🙂

      Regards,
      Kristina

      Author's profile photo Ramya P
      Ramya P

      Hi Kiril,

      Thank you for such a detailed blog. I wanted to implement the same for SAP API. I changed the target endpoint to receive an alert notification but did not receive one.

      This is the blog I was referring to along with yours.

      https://blogs.sap.com/2019/07/30/send-notification-when-target-endpoint-is-down-using-sap-cloud-platform-alert-notification-part-2/

      Regards,

      Ramya

       

       

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Ramya,

      Thanks for getting in touch! Could you, please, explain further your trouble – what is the step you face it on, what kind of error do you receive?

      Regards,
      Kristina

      Author's profile photo Ramya P
      Ramya P

      Hi Kristina,

       

      Thank you for replying back. I was referring to this blog to connect to Alert notification whenever a API call fails. While I have no errors, I am not getting the alert notification when my API call faces a Gateway Timeout error.

       

      Thanks,

      Ramya

      Author's profile photo Jyothi Dubey
      Jyothi Dubey

      Hi All,

      I want to call XSUAA secured service which is deployed in the Cloud foundry under the same subaccount from the SAP Alert notification.

      I have selected webhook with oAuth2 in action and configured all the details like URL, Client ID, Client secret, Auth URL and payload. But when I trigger this action it's not calling the webhook. I have kept a few logs in my code to verify the trigger. has anyone faced such issues. Please help.

       

      Regards,

      Jyoti

       

      Author's profile photo Kristina Dzhurdzhina
      Kristina Dzhurdzhina

      Hello, Jyoti,

      You could open a ticket on BC-CP-LCM-ANS describing your case - which is the region and space GUID where your SAP Alert Notification service resides as well as what is the URL you're trying to call. Colleagues will check and provide guidance on how to proceed 🙂

      Best regards,
      Kristina

      Author's profile photo Daniel Emmenegger
      Daniel Emmenegger

      Hello Kiril

      Sometimes, the generated IFlow locks my user, which is store in the security material (CPI_USER). I usually got a mail with "There have been 5 failed attempts to log onto your account"

      I saved my S-user there... but mostly it works and the iflow runs. but sometimes not...

      Regards,

      Daniel

      Author's profile photo Sho Tateyama
      Sho Tateyama

      Dear Kiril

      Thanks for the great article!
      I followed this procedure until deployment, but an error like the one below is displayed and an event has occurred where an email is not sent.

      I also saw the reference site below and confirmed that a similar error occurred, but the solution is to create Process Integration Runtime as api instead of iflow,
      You say you assigned the Audit Read role, but you're stuck because you don't know what the Audit Read role refers to.
      * Process Integration Runtime has been created with api

      Could you please tell me about the solution? Also, if there is any information you need, please contact us and we will provide it.

      * Reference site
      https://blogs.sap.com/2022/02/01/connect-sap-platform-integration-with-alert-notification-service-cloud-foundry/

      Thank youError_Screenshot

      Error_Screenshot

      Author's profile photo Ivan Paunov
      Ivan Paunov

      Hello Sho,

      This error occurs when the credentials you provided to get the messages for failed iflows are invalid.

      You are trying to use OAuth credentials for authentication, right?

      Best regards,

      Ivan

      Author's profile photo Sho Tateyama
      Sho Tateyama

      Dear Ivan
      Thank you for your prompt reply.

      Yes, I am using Oauth authentication with "SERVICE_TECHNICAL_CLIENT" in the security material
      It says that my credentials are invalid. Could you tell me how to enable them?

      *"SERVICE_TECHNICAL_CLIENT" image

      Author's profile photo Ivan Paunov
      Ivan Paunov

      Hello Sho,

      Could you verify me that your Process Integration Runtime instance is of plan “api”? And have the needed role?

      Best regards,

      Ivan

      Author's profile photo Sho Tateyama
      Sho Tateyama

      Hello Ivan
      Process Integration Runtime instance is using with plan 'api'
      Is there any inconsistency in the recognition of subaccount users about the necessary roles?
      Users using subaccounts have all role collections assigned.

       

      Author's profile photo Ivan Paunov
      Ivan Paunov

      Hello Sho,

      The role I am talking about, that is mentioned in the blog post you have linked, needs to be configured for Process Integration Runtime, not for the users. 

      During the creation of the Process Integration Runtime instance you need to setup the Monitoring Read role. 

      Best regards,

      Ivan

      Author's profile photo Sho Tateyama
      Sho Tateyama

      Hello Ivan
      Sorry for the late reply.

      I checked the parameters of the Process Integration Runtime instance,
      It seems that the target Monitoring Read role is attached, but is there any misunderstanding?

      Monitoring%20Read%20role

      Monitoring Read role

      Author's profile photo Ivan Paunov
      Ivan Paunov

      Hello Sho,

      Could you contact me on my mail ivan.paunov@sap.com? Because I will need more details.

      Best regards,

      Ivan

      Author's profile photo Srinivas Sistu
      Srinivas Sistu

      Hi Kiril,

       

      Hope you are doing well.

      Thank you for the detailed blog, great work.

       

      I have a query to ask.

      The email action is only accepting one email address and it is not configurable (like reading the value from the incoming payload).

      Are you aware of any plans from the product team to make the

      1. Email Action to accept multiple email addresses (like separated by comma or semi-colon)
      2. Would it be possible to make the Recipient email address to read the value from incoming event (I can see that Subject and Body can read from incoming data)

       

      Once again, thank you for your blog and a happy weekend.

       

      Regards,

      Srinivas

      Author's profile photo Madhura Madhura
      Madhura Madhura

      Hi Kiril,

      I tried to configure the same setup in my trial account. but I'm also facing below error. Could you help to resolve it?

      com.sap.gateway.core.ip.component.odata.exception.OsciException: Not Found : 404 : HTTP/1.1

      Author's profile photo Ivan Paunov
      Ivan Paunov

      Hello Madhura,

      Could you please open a ServiceNow ticket on BC-CP-LCM-ANS so we can investigate further?

      Best regards,

      Ivan

      Author's profile photo Uwe Jäckel
      Uwe Jäckel

      Hi Kiril,

      thanks for the BLOG 🙂

      Today i got it running 

      Best regards,

      Uwe

       

      Author's profile photo Shivam Sharma
      Shivam Sharma

      Hii,

       

      I configure the integration according to the blog but I am getting this error

      com.sap.gateway.core.ip.component.odata.exception.OsciException: An exception of type 'WstxUnexpectedCharException' occurred., cause: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'client_id' at [row,col {unknown-source}]: [1,521] 

       

      Can anyone help me in this how to fix this or let me know where I made the mistake

       

      Thanks

      Author's profile photo Stoyan Babev
      Stoyan Babev

      Hi,

      This is a issue with CPI Odata endpoint call. I am attaching a link to an article where this error is discussed.
      Article

      If this does not help you please contact CPI team for further help.

      Best,

      Stoyan