12. Skip to content

12. Profile monitoring

In accordance with international standards for customer due diligence, trak.e allows financial institutions to define rules to monitor the profile. It is allowed to add any number of file monitoring rules, but at most 50 can be active at the same time.

12.1 Events

Generic rules are configured to be executed upon different trak.e events. Each rule can be configured to run upon one or more events. The possible events that trigger a rule are the following:

  • New profile
  • Profile update
  • New alert
  • Alert update
  • New document
  • Document update
  • Document deletion

When the rule is triggered by an update event, you should also specify which field change triggers the update. Any property in the top-level of the matching entity can be used.

For example, if we aim to create a rule that executes whenever a profile changes its risk, we can use the following trigger:

...
"triggers": [
  {
  "event": "dprofile",
  "operation": "update",
  "field": "risk"
  }
]
...

12.2 Alert type

Trak.e allows you to define which alert type will be triggered due to a rule, as well as its severity and priority.

12.3 Implementation

The rules follow the scheme seen for risk matrix and the assessment of transactional profile: rules written in Python language.

12.3.1 Parameters

The available variables are:

  • profile: When evaluating a rule, the profile variable is put into the execution context. This variable contains the digital profile that is currently being processesed. All the attributes detailed in the section Digital Profiles are available in this object.
  • alerts: When evaluating a rule, the alerts variable is put into the execution context. This variable contains both open and closed alerts of the profile that is currently being processed. The variable is an array where each element is an object representing an alert. All the attributes detailed in the section Alerts are available in this object.
  • documents: When evaluating a rule, the documents variable is put into the execution context. This variable contains all the documents currently associated with the profile. The variable is an array where each element is an object representing a document. All the properties detailed in the section Documentation ara available in this object.
  • hist_trxs: You can access the history of transactions of the digital profile under this name. The variable is put into the execution context as a pandas.DataFrame. Each row of the DataFrame represents a transactions and the columns of the dataframe are the properties of the transactions (using an underscore as a separator in case of nested properties). You may have an empty history of transactions (no rows and no columns) - if the digital profile does not record transactions
  • changes: If the rule refers to an update event, the changes generated between both versions are found in this variable. The format of the changes is described in History.

12.3.2 Rule result

The rule must define a variable named SHOULD_RAISE whose value must be a truth value indicating whether it should raise a new alert. The possible values and their interpretation are:

  • True: The rule was evaluated and unusual behavior was determined, so that an alert will be raised in trak.e so that an analyst of the entity manage and solve about the anomaly.
  • False: The rule was evaluated and it was determined that there was no unusual behavior.
  • None: The rule was not evaluated. Either it does not apply, or some critical value is missing to do it.

Note

Context: In addition to the True, False and None values used to interpret the evaluation of the rule, the context of the evaluation is returned, particularly those defined public variables. This allows values calculated during the execution of the rule to be saved and made available when viewing the results.

12.4 Examples

12.4.1 High risk area

This rule analyzes the new profiles and their updates and raises an alert in the event that any address has an Argentinian province considered a risk area. If there are no addresses added to the profile or they do not include the province, the alert is also raised.

SHOULD_RAISE = False
if not profile.addresses:
    SHOULD_RAISE = True
for address in profile.addresses:
    state = address.state
    if state in ['Santa Fe', 'Jujuy'] or not state:
        SHOULD_RAISE = True

The rule should be set with the following triggers:

...
"triggers": [
    {"event": "dprofile", "op": "add"},
    {"event": "dprofile", "op": "update"}
],

The type is set to "other":

...
"alert_type": "other",
...

12.4.2 Missing documentation: statute

The following rule is configured for file updates. Its objective is to ensure that legal persons deliver the missing documentation to attach to the profile (in this case, the entity's statute), within a period of two months from its discharge.

SHOULD_RAISE = False
ONE_MONTH = 2592000000
profile_seniority = profile.modified_at - profile.created_at
if profile_seniority > ONE_MONTH and profile_seniority < 2 * ONE_MONTH:
    SHOULD_RAISE = True
    if profile.person_type == 'natural_person':
        SHOULD_RAISE = False
        if profile.person_type == 'legal_person':
            for doc in documents:
                if doc.doc_type == 'statute':
                    SHOULD_RAISE = False

The rule should be set with the following triggers:

...
"triggers": [
    {"event": "dprofile", "op": "update"}
]

The type is set to "doc_missing":

...
"alert_type": "doc_missing",
...

12.4.3 Increasing risk

The following rule is configured for profile updates and is intended to raise an alert in case the profile goes from low to medium risk, from low to high risk, or from medium to high risk. In other words, an alert is generated whenever there is an increase in the risk categorization of the profile.

risk = profile.get("risk", None)

changes = changes["changes"]
for change in changes:
    if change[0] == "change" and change[1] == "risk":
        previous_risk= change[2][0]

if (risk == "high" and previous_risk in ["low", "medium"]) or (
    risk == "medium" and previous_risk == "low"
):
    SHOULD_RAISE = True
else:
    SHOULD_RAISE = False

The rule should be set with the following triggers

...
"triggers": [
    {"event": "dprofile", "op": "update"}
]

The type is set to "high_risk":

...
"alert_type": "high_risk",
...

12.5 Rule testing

Trak.e allows you to test the rule before saving it with any database profile or with an as-needed profile to test edge cases and make sure the rule is correct both syntactically and semantically.

12.6 Name and description

The rule is saved with a name, which must be unique. The rule also allows to attach a description in rich text format.