Skip to Content
Product Information
Author's profile photo Win Acharya

Business Event Triggers in SAP Build Process Automation for SAP S/4HANA: Manage Credit Block on Sales Orders

SAP Build Process Automation is a simpler and faster way to automate business processes. It provides a unified Low-Code/No-code development experience to combine orchestrated workflows with Robotics Process Automation and Business AI in a single development environment. Check here for What’s New and Learn more from the roadmap 

In my Blog post Business Event Triggers in SAP Build Process Automation for SAP S/4HANA Cloud : The Customer Return (BKP) Use Case , I have covered the concepts of business events and how to configure business events for the use case for Customer Return for SAP S/4HANA Cloud. In continuation to the same, in this blog post we will learn how to create an event-trigger for “Manage Credit Block on Sales Order”.

So, what is the use case about?

“Manage Credit Block on Sales Order” business process enables customers to automate the approval of Sales Orders which are Credit Blocked in a flexible and transparent way. It provides flexibility in determining approvers depending on attributes like customer group, sales organization, order amount, currency etc. When a sales order is created in SAP S/4HANA (on-premise or cloud) and is automatically blocked for credit, a pre-configured process is triggered in SAP Build Process Automation. This use case is also applicable for Sales Orders which are changed and blocked for credit.

Event-driven architecture for Sales Order packages


How to get design the process?

Pre-requisites: Event Mesh configuration is done as per the pre-requisites mentioned in blog.



User Journey: Create an event-based trigger for Manage Credit Block on Sales Order


For detailed step by step guide on how to add event triggers to a process, follow Create Event Triggers documentation.

For the “Manage Credit Block on Sales Order” use case, the event required is Sales Order Created event. Details of the event is available on Business Accelerator Hub.


Sales Order Created Event


Note: Once the event is added as trigger, the payload defined in the event is available as Process Inputs and can be used later in the process for actions, decisions, mail notifications, etc.


Sales Order Created Event Trigger Outputs / Process Inputs.


This is very helpful as most of the times in SAP S/4HANA , the events contain minimum information. For practical implementations of business processes, further API calls via Actions are necessary to fetch additional details for the business objects. Most of the times, the API calls would need the business object ID and other parameters coming from the event payload.

For example, to get the Net Value and Currency of a Sales Order, there is a need to make further API call which takes the Sales Order from the event trigger as an input.

Please refer to Business Accelerator Hub for details on the APIs for Sales Order and Sales Document with Credit Block.

There could be many variations for the Sales Order process. Follow the YouTube video to create the process step by step: 🟣 Start Automating Your Work with SAP Build Process Automation.

A sample process could be like the following:

  1. Sales Order Created event trigger is defined.
  2. The Sales Order ID from the event payload is used for an API call for Action to get header details for Sales Order.
  3. Condition is defined on the data received in Step 2 i.e., if the Sales Order is in credit blocked state, then continue with the process else terminate.
  4. The Sales Order ID from the event payload is used for an API call for Action to get details for credit blocked Sales Order. This API call is required to retrieve the Sales Document Type which will be used later to remove the credit block.
  5. Decisions to determine Approver.
  6. An approval form for removing the credit block on Sales Order. The details in the form could be populated from the API calls made in the previous steps.
  7. In case of approval, use API for POST to remove the credit block in the SAP S/4HANA system. CAP Services might be required to enhance data as required by the APIs in Actions.
  8. Add email notifications to inform stakeholders regarding the approval / rejection status for removal of credit block on sales order.
  9. (Optional) Auto approval can be configured for quicker processing time. For example, if the net value is less than 500 EUR, then automatic approval for removal of credit block can be done.
  10. Release and deploy the project for the event trigger to work during runtime.
  11. Sample%20Process%20for%20Manage%20Credit%20Block%20on%20Sales%20Order

Sample Process for Manage Credit Block on Sales Order


How to test the process end-to-end?

  1. Create a Sales Order with credit blocked state in the SAP S/4HANA.


Credit Check – Not OK

2. The business event trigger executes the above configured process in SAP Build Process Automation and the approval form is available in My Inbox.


Sample Approval Form

3. Approve the form and check for email notification.

4. To confirm, check that the credit block is removed for the sales order in SAP S/4HANA.


Sales Order after Credit Release


  1. This is a sample process, but the complete flow can be customized and implemented as required.
  2. Event Mesh instance is per subaccount. Hence, if there are multiple projects have event triggers for the same event, when the configured business event is fired from any system, multiple processes will be triggered.

Any additional information ?

The above use case demonstrates the usage of Sales Order Created (with a credit blocked state) use case.

Alternatively, the process can also be triggered when an existing Sales Order is blocked for credit using the event “Overall credit check status changed”. More details can be found on Business Accelerator Hub.

The payload for the event would change slightly:

YouTube Video : Add Event-Based Triggers To Your Processes

Additional Use Case: Business Event Triggers in SAP Build Process Automation for SAP S/4HANA Cloud : The Customer Return (BKP) Use Case


Do let me know in case of queries or feedback.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Sudhir Kumar
      Sudhir Kumar

      Hi Win.!

      Excellent document.! Thanks for the detailed description, it's a very useful and a regular business use case.

      As I started to use SBPA, few points cross my mind, just thought of bringing it up to see your perspective.

      1. I wonder if there are missing things like, Dynamic agent determination, SAP used to deliver standard rules for agent determination, Org structure based agent assignment and many more like cost center and things like that, for different business use cases, has that feature/option completely been removed now.? so we should only be using mostly Business rules for agent determination.?
      2. If you see the above business process, Sales Order Created event will be triggered every time, irrespective of weather the order is blocked or not, so the credit blocked workflow would get triggered even though if the order is not blocked in the first place, so is there any start condition option to trigger the workflow, this is also important when you see your last point in the above blog which says "Event Mesh account is per Sub account" so that we can only start those workflow's which are needed, instead of starting the workflow and then decide.?
      3. In the below flow diagram where it is mentioned, Cloud integration in line with Event Mesh, does it mean Event Mesh should be configured in CI or Events has to go through CI..? If I see in BTP, Event Mesh instance can be created independently of CI, so can we not use Event Mesh independently..? hope i am making sense here..:-)


      Best Regards,


      Author's profile photo Win Acharya
      Win Acharya
      Blog Post Author

      Hi Sudhir,


      Thanks for your feedback ! Please find my comments below:

      1. If you have Cloud Integration configured then external approver determination is still possible. This blog used Business Rules to determine approver.
      2. As of now conditional start of execution of workflow is not possible for event triggers. But this particular use case can also start for a credit block added to an existing Sales Order. I have added this in the additional information section now.
      3. This was a different Solution Diagram and I have updated it now. Thanks for noticing it !

      Kind Regards,


      Author's profile photo Sudhir Kumar
      Sudhir Kumar

      Perfect.! Thanks for the clarification Win.:-)

      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski

      This is great blog, Win.

      Please let everyone know that there is a video by my colleague Antonio Maradiaga that shows how to set up S/4HANA Cloud and Event Mesh to receive S/4HANA events.

      Soon there will be one to show how to push them to SAP Build Process Automation.