Alert for Upcoming Cash Discount
Every month, businesses lose significant capital due to "Lost Cash Discounts"—available savings that go unclaimed because of payment blocks, manual processing delays, or late approvals. This Action Flow proactively mitigates these losses by identifying and flagging high-value invoices as they approach their discount eligibility deadlines.
This Action Flow automates the monitoring of pending payments to ensure your organization never misses a financial saving opportunity. It operates through a four-phase process:
Scope definition and variables: The flow starts by initializing key parameters, such as the Notification Window (e.g., alert 10 days before expiry) and the preferred Currency. It then loops through your predefined Company Codes to ensure localized monitoring across different business units.
Data extraction: For each Company Code, the flow queries the Accounts Payable Data Model to identify all open invoices. It specifically targets un-cleared items that are eligible for a cash discount but have not yet been processed.
Logic and prioritization: To prevent "alert fatigue," the system intelligently filters the data:
Aggregation: Consolidates invoice data into a structured array.
Ranking: Orders the list by total invoice value.
Top-Tier Focus: Slices the data to highlight only the Top 5 highest-value invoices, ensuring your team focuses on the most impactful savings first.
Automated routing: In the final phase, the flow uses a Router to direct the information based on the Company Code. It formats the invoice details and sends a tailored summary email to the specific stakeholders (e.g., Recipient X for Code 1000) with a direct link to the Accounts Payable Operational App for immediate action.
Before configuring this Action Flow, you need access to a data model that includes accounts payable information.
See: Modeling your data.
For this Action Flow, only the modules listed below require configuration:
In this module you can define the running schedule by clicking on the clock icon and setting the following variables necessary for the Action Flow:
Max Days to Notification: Number of days before the Cash Discount Due Date when youstartreceiving the notification, e.g. 10
Min Days to Notification: Number of days before the Cash Discount Due Date when youstopreceiving the notification (usually meaning that you are no longer able to act on the invoice), e.g. 3
Currency: enter the currency for the calculations, e.g. EUR or USD
App Link: enter the link to your App that is going to be referred to in the body of the email, e.g. https://ap-operational-app-template.eu-3.celonis.cloud/package-manager/ui/studio/ui/assets/63ee65dc-ecb4-4ed3-8327-4e603197c7a0
In this module you can define the sets that will be used for aggregating your Invoices or KPIs.
![]() |
In the image, you can see two different outputs. In the first iteration, this module will output ‘1000’,’2000’ which means the KPIs will be calculated for invoices belonging to these Company Codes. In the second iteration, they will be calculated for invoices belonging to Company Code ‘3000’.
You can add as many rules as you want, including having Outputs with more than one Company Code (e.g. if your country is composed of Company Codes A and B, you can add a rule like “Pattern = 3, Output = ‘A’,’B’ “ .) You will also need to increase the maximum number of iterations in module 2.Loop for each new rule you add.
In order to get the Invoice details, set up the Get Rows module. You don't have to change any fields or filters.
In this module, you can set up the filters that will be applied when displaying the data in the email. In our example, we will be passing information regarding the iteration that contained Company Code 1000 (and ‘2000’ since the list also contained a second Company Code) for the next module of the AF.
You can add as many routing paths as you would like. In the case you want the same recipient to receive the information about two different lists of Company Codes (defined in module3.Map Loop and Company Codes) you will need to set up 2 routes, one for each list.
![]() |
You need to set your desired Company Code value in the first condition, e.g.
Condition 1: “13.Output contains 1000”
Condition 2 does not require changes.
In this module, you need to configure the email connection and to define the recipient(s) of the email. Change the following settings:
Connection:connect to your mail account and grant Celonis permission to read and write emails.
To: define the recipient(s) you want to send the emails to, e.g. johndoe@domain.com

