Nesting
Nesting allows you to combine several operations in a same condition
Definition
Nesting conditions allows you to combine multiple logical operations into a single rule by placing one condition inside another. This enables more complex and precise decision-making within a single evaluation flow.
Example
Let’s say you want to build a rule that checks whether a user has spent more than €2,000 in the past hour.
-
Create the aggregate: start by creating an Aggregate variable that returns the total amount of outgoing transactions made by the customer in the last hour.
This aggregate will compute the cumulated amount spent by the customer in the last hour
-
Add a nested condition: in this example, we’ll assume you're calling the Decision API before the Ingestion API, which is considered best practice. To include the amount of the current (triggering) transaction in the calculation, you’ll need to nest an additional condition. Click on your aggregate, then go to Modeling → Open brackets.
Open brackets from the "Modeling" option
-
Include the triggering transaction: with the brackets open, add your operator (in this case, "+") followed by the field representing the transaction amount. Your condition is now ready to evaluate the full context, including the current transaction.
You now have a rule combining multiple operations
Updated 4 days ago