Alerts-2-Slack Installation Guide

The installation process is divided into 4 simple steps (total installation time – 15 minuts):

  1. Start Slack (desktop or web application). Select or create a Channel, that you want SAP PO/PI alerts to be sent to (here the Channel is named pi-alerts)
  2.  Go to Channel Settings->Add apps…
  3.  Find the application Incoming WebHooks (you can filter the applications quickly by entering a part of an application name into the search field). Click the Install button (a new tab will open in your default web browser)
  4. Click the Add Configuration button in the browser window
  5. Make sure that you selected the correct Channel and click the Add Incoming WebHooks integration button
  6. Copy and save Webhook URL from the next screen (you’ll need it later). Congratulations! Slack’s configuration is ready…
Extract the ZIP file that you received to any folder on your computer.
The ZIP archive contains only one EAR file (Enterprise Application Archive).
Deploy EAR with the application (full or demo version) to your Java application server (AS Java) following the guide from the Knowledge Base.
  1. Start Integration Directory (Integration Builder)
  2. In Objects tab choose Alert Rule->New (Ctrl+N). In this guide we will create a Default Rule, that will catch all exceptions not caught by other rules. You can tailor Alert Rules to your individual needs. The configuration details are not covered in this guide. Please look into SAP help for Component-Based Message Alerting or contact an SAP PI/PO consultant to get more information.
  3. Select field Create Default Rule and click the Create button
  4. On Edit Alert Rule screen open Basic tab and set field Enabled to Yes. If you want your alerts to contain User-Defined Search Attributes (recommended setting) set field Payload in Alert to Enabled.
  5. On tab Extended, select Components and Message Statuses, that will be covered by the Rule
  6. Add a new entry in section Consumers (manually enter any name e.g. ALERT-TO-SLACK or simply SLACK). Please remember or save the Consumer name – you’ll need it later.
  7. Save and Activate the Alert Rule. Bravo! Integration Directory configuration is done!
  1. Please log into your SAP PI/PO system and open SAP NetWeaver Admiministrator (NWA)
  2. Go to tab Operations->Jobs and open Java Scheduler
  3. On Java Scheduler screen go to tab Tasks and click the Add button
  4. Select AlertSlackJob from the list and click Next
  5. On Set Details screen you can leave the default values and click the Next button
  6. On the next screen define the task’s parameters and click Next
    • PISystemName – enter a user-friendly SAP PI/PO system name
    • AlertConsumer – name of the Alert Consumer (must be the same as the name entered into Alert Rule in Integration Directory)
    • MaxAlerts – the maximum number of alerts in a single Slack message. For a greater readability, all alerts sent to Slack are combined into groups. The maximum number of alerts to be shown in a single group is defined with this variable (MaxAlerts is always less than 20 – the value recommended by Slack).
    • SlackHook –  enter the WebHook assigned to your Slack Channel (you created it earlier)
  7. In this step you define how often you want to be notified about alerts.  Go to tab Recurring, enter End Date and Period (here 45 minuts).
  8. Click on the Finish button to complete the Task definition.

Slack Alert Consumer is ready for work. Monitor your Channel in Slack and wait for the first alerts to come (hopefully not to many…)

Good luck,
Indevo Team