Rule
Each rule includes two parts:- conditions: A set of conditions to evaluate.
- actions: The results to return when all conditions are satisfied.
Condition
Each condition includes a key and a value expression. To simplify condition building and ensure correct syntax, use theDecisionsCondition class.
The following example checks whether the value of revenue_quote_ratio falls within the range from 0 (inclusive) to 50 (exclusive).
Python
Action
An action defines the result when all conditions in a rule are satisfied. You can also define a default action to return when no rules match.Locale
You can specify a locale string (e.g., en-US, fr-FR, es-MX) to control how dates are parsed. Currently, locale only affects date parsing.Example
In this example (get_insurance_rate), you define a set of rules to calculate the insurance rate based on credit grade and loan amount:
Python

