Skip to main content
Question

How to pass variables into Knowledge Model KPIs in Action Flows?

  • December 5, 2025
  • 2 replies
  • 14 views

wolfgang.voelk
Level 5
Forum|alt.badge.img+1

We have a Celonis view with KPIs defined in the Knowledge Model. These KPIs use time-based filters with variables like datefrom and dateto inside the PQL-code.
For example:
"o_celonis_VendorInvoiceItem"."CreationTime" NOT BETWEEN {d '${datefrom}'} AND ADD_DAYS({d '${dateto}'}, 1)
and elsewhere in the same KPI:
"el_custom_SalesOrderItem"."TIMESTAMP" BETWEEN {d '${datefrom}'} AND ADD_DAYS({d '${dateto}'}, 1)

 

When exporting this view to Excel via Action Flows, the Get Rows module lets me reference the Knowledge Model, but I cannot pass values for these variables.

Using the Data Model instead allows variable injection in PQL, but then I lose access to predefined KPIs and calculated attributes, resulting in very complex, hard-to-maintain code.

Question:
Is there a way to dynamically set the variables of Knowledge Model KPIs when using Action Flows?

2 replies

m.sanchezmedina
Celonaut

Hi Wolfang,

This is a known limitation, and the product team is aware of it. 

Currently, we can offer an alternative solution.

In general, the Get Rows module will always take the default values of a variable, unless refer to the user’s input on views directly. → Hence, you need to trigger the variable from your view. 

 

Solution: Create KPI with variable and set its value from the Apps section
Create a KPI pointing to the variable.
Next, create an input box that the user can leverage to set the variable’s value.
Then, set the variable’ value from the Apps section (not Studio). (Action flows refer to the published app version, hence the Apps section).
Create a button within your view that map your dynamic variable to the action flow’s input.
On the interactions section of the button configuration, toggle ‘update variable’. 
The full guidance and documentation of this solution (with screenshots) is here: https://support.celonis.com/s/rightanswer?language=en_US#solutionid=250225171003017&csid=12

 

Does this solution help you further? Please let me know if it is usable for you.

 

Best,

Martina


wolfgang.voelk
Level 5
Forum|alt.badge.img+1

Hello Martina,
thank you for your quick reply to my post. Although your answer is a workaround, it sounds quite promising. We will try out 2 solution approaches:
- 1: using the Data Model in the get rows Module (hence: quite complex and redundant PQL-code)
- 2: using your solution
...it will probably take some days. But I will let you know, which approach we chose after these tests.
Thank you!
Wolfgang