Skip to main content

How to implement Custom lists in Monitoring scenarios

Updated over a year ago

First, please refer to our documentation on setting up custom lists, adding records, and defining usable fields here.

Values from Custom list are put into a special table called custom_list_value based on the usable fields. The most important columns in the table are:

  • list_code - code defined by you, with a prefix of #LIST-

  • field_code - code defined by you, with a prefix of #LIST-LIST_CODE- , where LIST_CODE is the code you have defined for referencing the custom list

  • value - Value extracted from a Custom list record


Example scenario - Banned accounts

Let’s say that you want to define certain accounts as banned counterparties for your customers in a custom list and then have a Transaction Monitoring scenario to detect transactions with these counterparties. After setting up your custom list and enabling the field where you put the banned account numbers for monitoring scenarios, the custom_list_value table will look something like this:

From there, we can write a Transaction Monitoring scenario to detect the presence of these account numbers in a transaction with one of your customers. For example, the scenario may look like this:

SELECT 
TRUE
, CASE
WHEN new.direction = 'INCOMING' THEN new.sender_account
ELSE new.receiver_account
END --this value will be passed along with alert details to show the account number
FROM transaction new
JOIN custom_list_value on custom_list_value.organisation_id = $organisationId --this will join your custom_list_value table based on your organisation ID
WHERE new.id = $transactionId
AND custom_list_value.list_code = '#LIST-BANNED_ACCOUNTS'
AND custom_list_value.field_code = '#LIST-BANNED_ACCOUNTS-ACCOUNT_NUMBER'
AND (
(new.direction = 'INCOMING'
AND new.sender_account = custom_list_value.value)
OR (new.direction = 'OUTGOING'
AND new.receiver_account = custom_list_value.value)
)

Example scenario - High risk activity

Let’s say that you would like to set up a Person Monitoring scenario to monitor your customers for high risk business activities, where your customer’s business activity is defined in their person data as company_activity. After setting up your custom list and enabling the field where you put the high risk business activity values for monitoring scenarios, the custom_list_value table will look something like this:

From there, we can write a Person Monitoring scenario to detect the presence of these high risk business activities in your person data. For example, the scenario may look something like this:

select attributes->>'company_activity' in ( 
select value
from custom_list_value
where list_code = '#LIST-HIGH_RISK_BUSINESS_ACTIVITY'
and field_code = '#LIST-HIGH_RISK_BUSINESS_ACTIVITY-ACTIVITY'
and organisation_id = $organisationId
) --search custom_list_value table for high risk business activities
, attributes->>'company_activity' --this will pass the value of company_activity to alert details
from person
where id = $personId
and customer_id = $organisationId

Example scenario - Red flag words

Let’s say you would like to set up a Transaction Monitoring scenario to monitor the payment reference for red flag words, as defined in a custom list with the list code RED_FLAG_WORDS. In this case, the custom_list_value table may look like this:

From there, we can write a Transaction Monitoring scenario to detect the presence of these phrases in the value column within the payment reference in the transaction data. For example, the scenario may look like this:

select true 
, new.reference --passes payment reference to alert details
from transaction new
join custom_list_value on true --join the custom list
where new.id = $transactionId
and custom_list_value.list_code = '#LIST-RED_FLAG_WORDS' --specify list code
and custom_list_value.field_code = '#LIST-RED_FLAG_WORDS-WORD' --specify field code
and custom_list_value.organisation_id = $organisationId --specify organisation ID
and reference ~* value --case-insensitive pattern matching on each value in list
Did this answer your question?