Calculating Risk Scores
In Ballerine, you can attach a plugin to a workflow state to perform risk evaluations. This is done by specifying the states where risk calculations should occur and the source of the rules for these calculations.
Example Configuration
Here is an example configuration for calculating risk rules using a plugin:
{
"name": "riskEvaluation",
"pluginKind": "riskRules",
"stateNames": [
"manual_review",
"calculate_risk"
],
"rulesSource": {
"source": "notion",
"databaseId": "ef017053c5fc418383ff3489d8f3e02b"
}
}
Explanation
- Name (
name
):- The name of the plugin, in this case,
riskEvaluation
.
- The name of the plugin, in this case,
- Plugin Kind (
pluginKind
):- Specifies the type of plugin. For risk calculations, this is
riskRules
.
- Specifies the type of plugin. For risk calculations, this is
- State Names (
stateNames
):- An array of states where risk calculations should be performed. In this example, the risk evaluation will be applied in the
manual_review
andcalculate_risk
states. - These states are typically those where you want to present risk evaluations in the case management system.
- An array of states where risk calculations should be performed. In this example, the risk evaluation will be applied in the
- Rules Source (
rulesSource
):- Source (
source
): Indicates where the risk calculation rules are sourced from. This can be an internal database or an external source like Notion. - Database ID (
databaseId
): The ID of the database where the rules are stored. This allows for flexibility, enabling clients to add their own custom calculations.
- Source (