Custom Functions
Custom functions allow rule authors of decision service and flow projects to specify their own syntax for common functions specific to their business needs and reuse those functions throughout their rules. A custom function accepts a number of parameters, evaluates the rules against those values and returns a single result.
For example, you could create a custom function to calculate the number of months that a licence has been held:
You could then use the MonthsLicenceHeld function in various rules:
Custom functions are able to use other values from the project that are not explicitly passed in, as shown above, where "the assessment date" is not defined as one of the arguments in the custom function. Another example could be a custom function that determines the loyalty discount for a particular "customer" record (that is passed into the custom function) using fields like "order date" and discount tables (that are not passed in).
For more information, see: