Paid Early Report
Every month there are invoices that are paid early. This can be caused by a missing prioritization of invoices for example. These early payments result in lost cash on hand.
This Action Flow was designed to bring about awareness on the affected invoices (and their value) that are contributing negatively to the paid early KPI and impacting working capital.
Within an email, a user-defined group of recipients can see the highest value invoices that are being paid early each month, as well as some aggregated data related to the organization, such as the total number of invoices or the total value that is being paid early.
Note
This Action Flow (AF) can exist as a standalone asset or as a complement to your Analytical App.
High-level Description
Prerequisite: Standard AP Data Model
![]() |
This Action Flow performs the following actions:
Passes info regarding company code 1000
Passes info regarding company code 2000
Sends email to recipient X
Sends email to recipient Y
Sets initial variables
Loops
Maps each iteration to a defined set of Company Codes
Queries Data Model for Invoice Details
Aggregates data into an Array
Orders by Invoice Value
Slices Top 5 Rows
Iterates over each element
Formats the Rows
Queries Data Model for aggregate measures (number of invoices or total invoices value)
Router:
Email:
Modules that require configuration
Note
Numbers in this list refer to the module sequence of this Action Flow shown above.
1. Set Initial Variables
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:
Timeframe: enter your time period of interest, e.g. MONTH or CALENDAR_WEEK
Currency: enter the currency for the calculations, e.g. EUR or USD
Early Payment Buffer: enter the buffer (in days) for what is considered an Early Payment, e.g. 5
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
3. Map Loop and Company Codes
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 havingOutputswith 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 module2.Loopfor each new rule you add.
4. Query Invoice Details
In order to get the Invoice details you have to set up the Celonis Query Data Model.
All information on how to do it can be found in Query Data.
Note
You don't have to change any fields or filters.
11. Router
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: “30.Output contains 1000”
Conditions 2 and 3 do not require changes.
12. Email
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 you want to send the emails to, e.g. johndoe@domain.com
Download Action Flow Blueprint
You can download a blueprint of the Action Flow defined in this Help Page, below.
This blueprint can be imported into your Celonis EMS Team so that you can quickly make the required changes without needing to build the Action Flow from scratch.
Potential Alternatives
Alternative 1:
You can change the filters in the queries to use a different field, instead of the current one “BSEG”.”BUKRS”. For this you need to:
1) Change the rules in theMap Loop into Company Codesmodule.
2) Change the filter inside all theCelonis Query Datamodules.
![]() |
Alternative 2:
You can add more routes in the following way:
Right-click the email module.
Select “Copy module” and paste in the same Action Flow.
Link this new email module to the router.
Set up a filter for your desired Company Code with the same conditions of the existing filters, apart from your new company code:
Right-click the connection between the router and the new email module.
Click "Set up a filter."
Another possibility is to use a different email module type, e.g. Gmail or SMTP.