Fintech: Company Analysis
Streamline your onboarding and analyze customers faster.
Background
Know Your Business (KYB) is a critical component of Anti-Money Laundering (AML) and Counter-Terrorist Financing (CTF) compliance, as well as customer due diligence, in the financial technology (fintech) industry. KYB requires fintech companies to gather, verify and maintain relevant and accurate information about their customers to ensure that they are not involved in illegal activities such as money laundering or financing terrorism.
The use of a rules engine can significantly streamline the KYB process in fintech by automating the verification and assessment of customer information. The rules engine processes customer data against a set of predefined rules and evaluates it to determine the customer's risk profile. This allows fintech companies to quickly and accurately assess the customer's information and make informed decisions, reducing the risk of fraudulent activities and ensuring compliance with regulatory requirements.
In addition to its application in KYB, the use of rules engines in fintech can also benefit the customer onboarding process. The rules engine can automatically evaluate customer information and make decisions about their eligibility for products and services, reducing the time and effort required for manual review and decision making.
Designing a decision
Suppose you want to integrate a rules engine to automatically evaluate information about a company that has just joined your platform and determine if they are eligible to use it. During the sign-up process, you may gather information such as the company's turnover, country of incorporation, and type. By utilizing a rules engine, you can process this information against a set of predefined rules to streamline the decision-making process.
For a simple case, the company model might look like:
{
"company": {
"turnover": 1000000,
"type": "INC",
"country": "US"
}
}
We aim to establish a flag system that will present us with a green 🟢, amber 🟡, or red 🔴 flag based on each parameter, as well as an overall decision on the company's eligibility. To begin, set up a project and create a blank decision file.
For additional information, refer to the Projects and Decisions.
Connecting the graph
In the decision editor, access the editing mode by clicking on Edit Graph. Then, add input and output components by dragging and dropping them into the graph.
For each flag, add a decision table, and rename them to correspond with the relevant parameter: Turnover, Type, and Country. Connect the input component to each decision table and each decision table to the output component. To do this, hover over the output connector on the right side of the node, click and hold your mouse, and drag the connection to the input connector on the left side of the node.
Once all nodes have been connected, as shown in the example image, confirm your changes by clicking on Confirm. Then, open each decision table and modify the content by clicking the Open button on the node.
Turnover (Decision table)
Create one input column.
- Label: Turnover
- Field: company.turnover
Create one output column.
- Label: Flag
- Selector: flag.turnover
After adding input and output columns press + button on the table and add 4 rows. Fill the values like on the image:
The rows in the decision table indicate the following: If the turnover is greater than 1,000,000, the flag will be GREEN. If the turnover falls between 200,000 and 1,000,000, the flag will be AMBER. If the turnover is less than 200,000 or if the information is not provided, the flag will be RED.
Country of incorporation (Decision table)
Create one input column.
- Label: Country
- Field: company.country
Create one output column.
- Label: Flag
- Selector: flag.country
After adding input and output columns press + button on the table and add 3 rows. Fill the values like on the image:
The rows in the decision table indicate the following: If the country of incorporation is the United States, Ireland, Great Britain, or Canada, the flag will be GREEN. If the country of incorporation is Germany or France, the flag will be AMBER. If the country of incorporation is any other country, the flag will be RED.
Company type (Decision table)
Create one input column.
- Label: Type
- Field: company.type
Create one output column.
- Label: Flag
- Selector: flag.type
After adding input and output columns press + button on the table and add 2 rows. Fill the values like on the image:
The rows in the decision table indicate the following: If the company type is INC, LTD, or LLC, the flag will be GREEN. If the company type is any other type, the flag will be AMBER.
Simulate
Access the simulator by clicking the Simulator button. Within the panel, activate the simulation by clicking the Simulate button and observe the result.
To simulate different responses, we will add data to the request. Copy and paste the JSON model into the simulator and press Simulate.
Request:
{
"company": {
"turnover": 1000000,
"type": "INC",
"country": "US"
}
}
The result should indicate that two flags are green and one amber. You can then modify the data in the request and test it against different companies.
{
"performance": "320.483µs",
"result": {
"flag": {
"companyType": "green",
"country": "green",
"turnover": "amber"
}
}
}
Advanced
In the previous example, we evaluated each flag separately. Now, let's also create an overall flag based as an aggregate of all individual flags.
For instance, if there is at least one RED flag, the overall status will be RED. If there are no RED flags, but there is more than one AMBER flag, the overall evaluation will be AMBER. Otherwise, it will be GREEN.
To achieve this, we will need to add two additional nodes.
- Drag and drop Function node and rename it to Overall Mapper
- Add connection from all separate decision tables to Function node while also keeping all connections to Output node
- Drag and Drop Decision Table and rename it to Overall.
- Connect Function output to Overall Decision Table input
- Connect Overall Decision Table Output handle to Output node.
- Press Confirm
Your decision should resemble the one below:
Overall mapper function
Function node will be used to count how many GREEN, AMBER and RED flags we have in total. Edit the Overall mapper node and paste the following content into the code editor.
import zen from 'zen';
/** @type {Handler} **/
export const handler = async (input) => {
const count = (flag) => Object.values(input?.flag || {}).reduce((acc, curr) => {
if (curr === flag) return acc + 1;
return acc;
}, 0);
return {
critical: count('critical'),
red: count('red'),
amber: count('amber'),
green: count('green')
};
return input;
};
Overall decision table
Create three input columns.
Label | Field |
---|---|
Red | red |
Amber | amber |
Green | green |
Create one output column.
- Label: Overall
- Selector: overall
Fill the values as shown in the image below:
Simulate
Our simulator now looks like:
If we use the request:
{
"company": {
"turnover": 2000000,
"type": "INC",
"country": "US"
}
}
The response will be:
{
"performance": "3.630106ms",
"result": {
"flag": {
"companyType": "green",
"country": "green",
"turnover": "green"
},
"overall": "green"
}
}
Congratulations, you can now start integrating your Retail order system directly with GoRules engine. To learn how to do it, please visit Evaluation API.
Updated 3 days ago