Rule hits
You create rules in Rule manager to automate custom business logic and optimize fraud prevention to your goals. A rule catches a specific behavior or pattern within a transaction and applies a certain decision.
The details of the rule that hit a transaction and influenced the final decision are returned as a JSON object.
Response example
{
"fraugster_approved": 0,
"frg_trans_id": "abc01f6ccc8a5832a7871fdb14be1211",
"is_liable": false,
"liability_reason": "declined",
"rule_hits": {
"all": [
{
"action": "reject",
"id": "ffd39b23-3e4f-4c6f-96f3-82e565b8ffff",
"rule_name": "Rule name",
"short_id": 42,
"version": 1
},
{
"action": "custom",
"custom_definition": "send_for_external_check",
"id": "eed39b23-hy76-4c6f-96f3-82e005b8ffff",
"rule_name": "Rule name",
"short_id": 35,
"version": 2
},
{
"action": "tag",
"id": "abc01f6c-cc8a-5832-a787-1fdb14be1211",
"rule_name": "Rule name",
"short_id": 89,
"version": 7
}
],
"decisive_hit": {
"action": "approve",
"id": "ffd39b23-3e4f-4c6f-96f3-82e565b8ffff",
"rule_name": "Rule name",
"short_id": 52,
"version": 1
}
},
"score": 0.92
}
The following table gives more details on the fields in each rule_hits
object.
Component | Description |
---|---|
action | The action the rule triggers. One of:
|
custom_definition | A unique string that defines a specific custom action. It becomes available when you create a custom action in the Rule manager. Refer to the custom definition to update your integration and trigger specific actions based on it. If the rule with action custom takes a decision for a transaction, the field fraugster_approved receives the value 3 . |
id | A unique automatically generated machine-readable number that identifies the rule. |
rule_name | A form of identification that should be straightforward and self-explanatory. You add the name manually when you create a new rule. |
decisive_hit | The rule that took the decision for the transaction. |
short_id | An automatically generated human-readable number that identifies the rule. It allows you to see order and recency. |
version | The version of the rule active at the moment the transaction was hit. |