The installation process is divided into 4 simple steps (total installation time – 15 minuts):
- 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)
- Go to Channel Settings->Add apps…
- 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)
- Click the Add Configuration button in the browser window
- Make sure that you selected the correct Channel and click the Add Incoming WebHooks integration button
- 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.
- Start Integration Directory (Integration Builder)
- 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.
- Select field Create Default Rule and click the Create button
- 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.
- On tab Extended, select Components and Message Statuses, that will be covered by the Rule
- 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.
- Save and Activate the Alert Rule. Bravo! Integration Directory configuration is done!
- Please log into your SAP PI/PO system and open SAP NetWeaver Admiministrator (NWA)
- Go to tab Operations->Jobs and open Java Scheduler
- On Java Scheduler screen go to tab Tasks and click the Add button
- Select AlertSlackJob from the list and click Next
- On Set Details screen you can leave the default values and click the Next button
- 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)
- 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).
- 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…)