Extend your transaction monitoring rules with expression functions.
Expression functions help you extend your rule conditions to make transaction monitoring even more precise. For example, if you want to compare the applicant name with the name specified on the card that was used to make a payment, you can invoke the personNamesFuzzyIncompatible method and pass the arguments based on the expression attributes.
personNamesIncompatible
bool personNamesIncompatible(String applicantName, String fullName)
Checks the similarity of applicantName
and fullName
. Returns true
if there is no similarity or the similarity is low.
Argument | Type | Description |
---|---|---|
applicantName | String | Applicant name. |
fullName | String | Full name to compare with. |
personNamesFuzzyIncompatible
bool personNamesFuzzyIncompatible(String applicantName, String fullName)
Checks the fuzzy similarity of applicantName
and fullName
. Returns true
if there is no similarity or the similarity is low. E.g. Stüber Schäfler
and Schaefler Stueber
returns false
.
Argument | Type | Description |
---|---|---|
applicantName | String | Applicant name. |
fullName | String | Full name to compare with. |
intersectsWithDict
bool intersectsWithDict(String str, Set dict)
Returns true
if dict
contains any token from str
.
Argument | Type | Description |
---|---|---|
str | String | String to tokenize and check intersection with. |
dict | Set | Set of strings. |
inList
bool inList(String listName, String value)
Returns true
if value
is in the client list with the name listName
.
Argument | Type | Description |
---|---|---|
listName | String | Client list name. |
value | String | Value to check. |
notInList
bool notInList(String listName, String value)
Returns true
if value
is not in the client list with the name listName
.
Argument | Type | Description |
---|---|---|
listName | String | Client list name. |
value | String | Value to check. |
anyTokenInList
bool anyTokenInList(String listName, String value)
Returns true
if any token from value
is in the client list with the name listName
.
Argument | Type | Description |
---|---|---|
listName | String | Client list name. |
value | String | String to tokenize and check intersection with. |
diffPctGte
bool diffPctGte(Double value1, Double value2, double pct)
Returns true
if val1
greater than val2
increased by pct
percentage. val1 > val2 + val2 * pct / 100.0
.
Argument | Type | Description |
---|---|---|
value1 | Double | First value. |
value2 | Double | Second value. |
pct | Double | Percentage. |
uniqTxnsByCounterpartyGroupCntGte
bool uniqTxnsByCounterpartyGroupCntGte(Object obj, Number minElementsInTheGroup, Number minGroupCnt)
Returns true
if the count of groups that contain the number of elements is equal to or greater than minElementsInTheGroup
is equal to or greater than minGroupCnt
. For example, a player played X (minGroupCnt
) games more than Y (minElementsInTheGroup
) times.
Argument | Type | Description |
---|---|---|
obj | Object | List of transactions. |
minElementsInTheGroup | Number | Minimum number of elements in the group. |
minGroupCnt | Number | Minimum number of groups. |
amountByTxnFieldInListGte
bool amountByTxnFieldInListGte(Object obj, String listName, String fieldPath, Number maxAmount)
Returns true
if the sum amount in the default currency of transactions matched by fieldPath
with the client list listName
is not less than maxAmount
.
Argument | Type | Description |
---|---|---|
obj | Object | List of transactions. |
listName | String | Client list name. |
fieldPath | String | Field path in the calculation context. The value from this field is checked in the client list, For example, counterparty.paymentMethod.issuingCountry . |
maxAmount | Number | Maximum amount. |
diffInDaysFromNowGte
bool diffInDaysFromNowGte(Object dateStr, int days)
Returns true
if the date in dateStr
differs from now in not less than days
days.
Argument | Type | Description |
---|---|---|
dateStr | Object | String with date to extract and check the difference in days. |
days | int | Number of days. |
diffInDaysFromNowLte
bool diffInDaysFromNowLte(Object dateStr, int days)
Returns true
if the date in dateStr
differs from now in not more than days
days.
Argument | Type | Description |
---|---|---|
dateStr | Object | String with date to extract and check the difference in days. |
days | int | Number of days. |
cntTxnsByMatchingTxnsWithPctAmountGte
bool cntTxnsByMatchingTxnsWithPctAmountGte(Object leftTxnsObj, Object rightTxnsObj, double diffPct, int thresholdCnt)
Returns true
if the count of transactions in the left that are similar to the right (according to diffPct
) is greater than or equal to thresholdCnt
. E.g. for the last 7 days, the number of outgoing transactions that match the approximate amount of incoming transactions is greater than or equal to 3, then alert.
Argument | Type | Description |
---|---|---|
leftTxnsObj | Object | List of transactions. |
rightTxnsObj | Object | List of transactions. |
diffPct | Double | Diff percentage. |
thresholdCnt | int | Count of similar transactions to trigger alert. |
timeInRange
bool timeInRange(LocalDateTime localDateTime, String from, String to)
Checks whether the time of local date is in the specified time range: [from; to].
Argument | Type | Description |
---|---|---|
localDateTime | LocalDateTime | Date and time object. |
from | String | Time in HH:mm:ss format. |
to | String | Time in HH:mm:ss format. |