Business Scenario
In this exercise you will:
- Build a second iFlow for an internal notification.
- Create an outbound communication to the API Business Hub Enterprise API.
Task Flow

You will perform the following steps:
- 30: Create iFlow PO_Slack.
- 31: Consume and process purchase order message.
- 32: Send a message to a Slack channel.
- 33: Prepare for testing.
Prerequisites
You have a running Cloud Integration process with name Send a PO Message as notification to Slack.
Task 1: Create Another iFlow PO_Slack
Steps
Create Another iFlow PO_Slack.
From the iFlow editor, navigate back to you package by choosing Design → your package → Artifacts. Choose Edit → Add → Integration Flow.
Enter a Name and, optionally, a Description. Choose OK.
Navigate to the iFlow editor of your just-created artifact by selecting the iFlow. Select the newly created process row with the name PO_Slack.
Choose the Edit button.
Task 2: Consume and Process Purchase Order Message
Steps
Consume and Process Purchase Order Message.
Use the following data:
Field Value Adapter <choose> ProcessDirect Connection/Address /PO_scenario/PO_Slack Element: Content Modifier setCommunication Parameters Select the Sender tile and rename it to PurchaseOrder.
Press Enter and again select the PurchaseOrder tile and drag the arrow to the Message Start icon.
Choose the ProcessDirect adapter.
Insert the following data in the Connection tab Address field: /PO_scenario/PO_Slack.
Save your interim status.
Afterwards, select Edit again.
Set a Content Modifier element using the Message Transformers toolbar icon in the top toolbar, and call it setCommunication Parameters.
Edit the Message Header.
Use the following data:
Field Value Action Create Name APIkey Type Constant Value <your saved API Key from your SAP API Business Hub Enterprise API> Open the Message Header tab and enter the API Key from your SAP API Business Hub Enterprise API. Choose the Add button and enter the data from the table above.
Choose Save.
Add data to the Exchange Property tab.
Use the following data:
Field Value Action Create Name poid Type XPath (if no payload displays, choose Constant) Data Type java.lang.String Value 4500000011 (if you followed the example) Normally, for the Value, you work with a variable that you can provide via Externalize, as you have seen before in a previous lesson.
Navigate to the Exchange Property tab, choose the Add button and enter the data from the table above.
Add further data.
Use the following data:
Field Value Action Create Name ChannelID Type Constant Value your saved channel id from your SAP API Business Hub Enterprise API Choose the Add button again and enter the data from the table above:
Choose Save.
Navigate to the Body Tag and insert the following body:
Code snippetCopy code{ "text": "Message successful processed with Purchase Order ID: ${property.poid}" }
Choose Save.
Task 3: Send Notification/Message to a Slack Channel
Steps
Send notification/message to a Slack channel.
Set a Call → External Call → Request Replay.
Set a Participants → Receiver and name it Slack_Supplier.
Create a HTTP communication between the "sendMessage" Request Reply and the receicer "Slack_Supplier" and configure it.
Use the following data:
Field Value Address your saved url with the channel id property as a variable ${property.ChannelID} Add within this url the channel ID property, for example: "https://host:443/v1/Slack/channels/${property.ChannelID}/messages" Proxy Type Internet Method POST Authentication None Create a HTTP communication between the "sendMessage" Request Reply and the receicer "Slack_Supplier"
Enter the data from the table above.
Save your work as Version and give a comment.
Task 4: Prepare for Testing
Steps
Add a timer.
For testing purposes we simulate an incoming PO message with a timer.
Click on Edit.
Delete the Start message icon.
Instead set an Events → Timer with Run Once on the Scheduler tab.
Set a new Message Transformers → Content Modifier, with nametest, after the timer and link everything together
Open the test Content Modifier and choose the tab Message Body and insert the following data.
<PurchaseOrderID>45000000111721</PurchaseOrderID>
To deploy the hole process, choose Deploy on the top right and confirm the following two pop ups.
Change to the Operation view on the left navigation bar and find your started process at Manage Integration Content. Change the Log Level to Trace.
Deploy your process again.
Click on the link Monitor Message Processing.
Click on the last message.
Click on the Trace link in the Logs area to debug the process.
Choose Message Content and find the data on the Payload tab.
Go to Slack and find your message within your channel.
If your process run, save your test installation as a version in the Design view (Save as version).
Navigate back to the Design view in your package PO_scenario.
In the Artifacts tab, click on the Version link of your PO_Slack iFlow.
When hovering over the left side of the pop up window with the mouse, a small icon is displayed with the name Click To Revert. Click on this icon to revert to the last working version. In our case we switch from version 1.0.6 back to version 1.0.4
Result
In this module, a second iFlow was created to send a notification to Slack, using the SAP API Business Hub Enterprise API.