Rules

Definition

Processes in atfinity are guided by rules.

A rule tells the application what actions it should take, when a specific condition is met.

Each rule can trigger multiple actions, from ensuring defined instances are present in a case to issuing a warning, from sending out an email to performing a background check.

When naming a rule, pick a name that says what the rule is for.

Examples:

  • 'Two account holders required for joint account'

  • 'Applicant for entity account must be of low risk class'

  • 'World-Check required for non-EU account holder'

Currently, you can attach one or more of the following actions to a rule:

Action

Description

Create Issue

Raise an issue to alert a user to something that requires attention. Issues are marked with a red icon. The process cannot function properly until issues are fixed.

Create Warning

Display a warning. Warnings are marked with a grey icon, because they're less severe than issues. Ignoring warnings will not stop the system from working.

Create Comment

Add a comment to a case, which will have no other implication than to simply inform a user of something.

Ensure Instances

atfinity will check that the instances you specify in this action are actually present in the case. If they are not, atfinity will create them.

Assign Values

Have atfinity assign a designated value to a specified information field.

[API] Send Email

An email will be sent, according to a template and/or input values you specify in this action.

[API] World-Check

This action triggers communication with the external World-Check database, to search for any hits a person might have there.

[API] Send IDnow Signing Link

Create an IDnow link, and have it emailed to a specified address.

Condition

The condition under which you want a rule to trigger the action(s) you attach to it, are written in RuLa - atfinity's rule language.

Here's an example of a condition:

cr is ContractualRelationship
cr.type_of_account = joint

When a contractual relationship in a case has a joint account, this condition is met. That means the action(s) you attach to the rule this condition belongs to, will be executed. For example, the action Ensure Instances could be triggered to automatically ensure two account holders for this case.

Had the case been about a contractual relationship with an individual account, the condition is false. No actions will be triggered.

Action: Create Issue

Issues tell a user something needs to be fixed, before the process can proceed. Adding this action to a rule displays the following fields:

Field

Description

Title

The title of the issue, as the user will see it.

Description

Describe why the issue is raised, plus, what options a user has to act on it.

Title and Description should be in English. A translation for other languages can be provided under Translations.

Example of a condition that can trigger an action 'Create Issue':

cr is ContractualRelationship
cr.type_of_account = joint

And the issue written in the action, which will be visible to a Case Manager user:

Title: Joint Account must have two persons
Description: Be sure to add two persons to the joint account.

Action: Create Warning

Warnings alert a user to something. Different from an issue, however, a user can ignore a warning. The process will still run.

Adding this action to a rule displays the following fields:

Field

Description

Title

The title of the warning, as the user will see it.

Description

Describe why the warning appears, plus, what options a user has to act on it.

Title and Description should be in English. A translation for other languages can be provided under Translations.

Example of a condition for an action that creates a warning:

p is Person
p.nationalities = uk
and
p.domicile = eu

With the following in the Action field:

Title: UK citizens need new residence permit
Description: Due to Brexit, a UK citizen has to apply for a new EU residence permit before 31-Dec-2021.

When a person in a case is living in the European Union and has the UK nationality, this warning will appear on the screen.

Action: Create Comment

Comments give a user context, or an explanation about something. They appear on a separate screen in the case, and even allow for a complete conversation between users about a case - which will stay with the case.

Comments can also be assigned to a user, making them tasks.

Adding this action to a rule displays the following fields:

Field

Description

Title

The title of the comment, as the user will see it.

Description

The message the user will see in the Case Manager, together with options to Resolve, Reply, or Assign the comment to a specific user.

Title and Description should be in English. A translation for other languages can be provided under Translations.

If your organization requires new US clients to be subjected to a World Check search, and you want to use a comment on the screen to alert the Case Manager user about informing the client about this, you could use this condition:

p is Person
p.nationality = us

The condition could then trigger this 'Create Comment' action:

Title: Inform client on World Check
Description: Be sure to inform client we will perform a World Check database search before any next steps are taken.

Action: Ensure Instances

This action ensures the instances you specify are present in a case, if the rule's condition is met.

Adding this action to a rule displays the following field:

Field

Description

Creation

Using RuLa, specify what instance(s) should be created in the case.

Example of a condition,

cr is ContractualRelationship
cr.type_of_account = joint

and the 'Ensure Instance' action it triggers to ensure there are two instances of the ontology Person, with the role AccountHolder:

create 2 AccountHolder, Person

Use the exact term of the role and ontology, here: AccountHolder and Person , even though we're dealing with the creation of two instances. The role 'AccountHolders' does not exist in RuLa, nor does the ontology 'Persons', so using those would lead to an error message.

As the name of the action indicates, the system will Ensure the instances exist in the case. If they do not exist yet, this action triggers the creation of them. However, if they already exist before this action is triggered, the action will not create another two.

Calculating how many to create

In the example, the Action: Ensure Instances is create 2 AccountHolder, Person .

The number of instances to create doesn't have to be an integer. It can also be any RuLa expression. We could replace the integer 2 with a calculation. In the most straightforward way, this results in:

ensure 1 + 1 AccountHolder, Person

You can even replace the integer with a direct reference to what is written in the rule's condition. If there, it says cr is ContractualRelationship , then this is how to match it in an Ensure Instances action:

ensure cr.number_of_account_holders Person

This ensures the number of instances of Person equals the number of account holders that exist in the Contractual Relationship.

Action: Assign Values

This action automatically assigns a value to an information field, if none had been provided before.

Adding this action to a rule displays the following field:

Field

Description

Assignments

Using RuLa, provide the key of the information field and what value you want to assign to it, when this action is triggered. The assigned value can be static, or any other expression, like a calculation, or another information field.

Example of a condition:

ah is AccountHolder, Person
ah.employed = true
and
ah.total_assets > 1500000

and the action it can trigger to assign a value:

ah.monthly_upper_limit_credit_card := ah.salary + 15000

Here, the maximum monthly spend on the account holder's credit card is assigned a value at 15 thousand above the monthly salary of the account holder. But this is done only, if the account holder has a salary from employment, and is known to have total assets in value of more than 1.5 million.

This action will only assign a value if none is present. However, a value provided by a user of the Case Manager always takes precedent.

If you want to prevent a user being able to change assigned values, go to the configuration of the information field to which a value is assigned (monthly_upper_limit_credit_card in the example above), and change the 'Read Only' option to 'yes'.

Action: [API] Send Email

Use this action to automatically send out an email when the attached condition is met.

You need to provide either a subject and body for the email, or an email template plus the language it should be in. Language should also be provided when attaching a booklet.

Email templates are created in the Configuration menu of atfinity, under the Customization section.

When adding this action, you will see the following fields:

Field

Description

About

This field provides a quick reference for the values that can be added as input assignments for the Send Email action, plus what to expect as output assignment.

Input Assignments

Specify the values for the recipient's name and email address. Also tell atfinity which email template and language to use OR enter a fixed subject line and email body. Also indicate if a case booklet should be attached to the mail, and in what language.

Output Assignments

An indication you will get back, telling you whether the email has been sent successfully or not.

A condition for a Send Email action can be:

ah is AccountHolder, Person
ah.nationality = uk

Having ah defined in the condition, the Input Assignments can reference it, for example in an action that sends out an email according to a template:

API_REQUEST.name := ah.full_name
API_REQUEST.to := ah.email
API_REQUEST.email_template := inform_world_check
API_REQUEST.language := en

And for Output Assignments:

ah.has_errors_when_sending_email = API_RESULT.has_errors

Action: [API] World-Check

This action will trigger communication with the World-Check API, to inform you on certain aspects in a client’s background that could determine risk level or other factors in the relationship.

When adding this action, you will see the following fields:

Field

Description

About

This field provides a quick reference for the values that can be added as input assignments for the World-Check action, plus what to expect as output assignment.

Input Assignments

Provide at minimum the required values from the 'About' field, add more if needed. These values will be sent to the World-Check API, and should always be about the instance that is referenced in the rule's condition.

Output Assignments

The response from the World-Check API. It will tell you if and how many hits were found on the instance, plus when the check was performed.

Example of a condition, that could be used to trigger a World-Check action for account holders living in the United States:

ah is AccountHolder, Person
ah.domicile = us

The action itself could then be configured with Input Assignments:

API_REQUEST.name := CONCAT(ah.first_name, " ", ah.middle_name, " ", ah.last_name)
API_REQUEST.gender := ah.gender
API_REQUEST.date_of_birth := ah.date_of_birth
API_REQUEST.country_of_residence := ah.country_of_residence
API_REQUEST.place_of_birth := ah.place_of_birth
API_REQUEST.nationality := ah.nationality

And as Output Assignments:

ah.has_world_check_hits := API_RESULT.has_hits

This action creates an IDnow Signing link and sends it via email to the specified address. IDnow is used to verify a person's identity and to put verified digital signatures on documents.

When adding this action, you will see the following fields:

Field

Description

About

This field provides a quick reference for the values that can be added as input assignments for the action, plus what to expect as output assignment.

Input Assignments

Provide at minimum the required values from the 'About' field, add more if needed. The values should be attributes of the instance that is featured in the condition of the rule.

Output Assignments

The response from the IDnow API. It will tell you whether your input was sent over correctly and, if it was, the response will contain information on the id document.

A condition for this action can be:

p is Person

With p defined in the condition, it can now be used in the Input Assignments for this Send IDnow Signing Link action:

API_REQUEST.to := p.email
API_REQUEST.first_name := p.first_name
API_REQUEST.last_name := p.last_name
API_REQUEST.email_template := idnow_template
API_REQUEST.language := de
API_REQUEST.attach_booklet := false

And for the Output Assignments:

p.has_idnow_errors := API_RESULT.has_errors
p.id_issued_on_date := API_RESULT.id_issued_on_date
p.id_date_of_expiry := API_RESULT.id_date_of_expiry
p.id_number := API_RESULT.id_number
p.id_type := API_RESULT.id_type
p.id_country := API_RESULT.id_country

Interactions

Rules make atfinity dynamic. They interact with:

  • Process: only when rules are added to a process are they being used. atfinity evaluates these rules to determine the flow of a case through a process, depending on the specific characteristics present in the case.