---
description: project
---

# Risk Mitigation Solution

## Overview&#x20;

To mitigate risks, it is important to have the ability to calculate and manage them. This enables you to proactively identify potential problem areas and take appropriate measures.

The Risks project within the platform is designed to mitigate the risks associated with loan issuance and enhance your organization's stability.

## Problem solving

The Risks project can help solve a number of key problems:

* Clarification of parameters: allows you to determine the optimal parameters and variables that should be taken into account when calculating loans. This includes factors such as credit history, income, among others.
* Clarifying decision criteria: helps clarify the criteria by which lending decisions are made, which can improve the efficiency and accuracy of the process.
* Reduces credit losses: can be used to determine optimal loan amounts and terms, which helps reduce credit losses.
* Optimizing loan products: by analyzing results, loan products can be improved to make them more attractive to borrowers and safer for lenders.
* Data validation: data quality can be analyzed to ensure that it is sufficient and accurate to adequately calculate loans. This is important to avoid distortions and unreliable results.
* Regulatory compliance: helps ensure compliance with regulatory standards and requirements when issuing loans.

## Project functionality

The Risks project functionality consists of pre-designed and configured flows. This range of project flows will help you streamline tasks.&#x20;

Using these flows, you can perform the following operations:

1. &#x20;Calculations and сomputations.

1.1 Calculation of the possible credit card limit.\
1.2 Calculation of the maximum loan payment.\
1.3 Calculation of refinanced loan amounts.\
1.4 Calculation of refinanced credit card amounts.\
1.5 Calculation of the maximum loan term for the applicant.

2. Conditions and agreements.

2.1 Selection of conditions with maximum and/or minimum terms.\
2.2 Selection of Product Condition based on term and product conditions.\
2.3 Combining conditions.\
2.4 Selection of conditions that meet specific criteria.

3. Managing debts and obligations.

3.1 Retrieval of loan balance values.\
3.2 Checking whether a loan is pledged.\
3.3 Checking eligibility of current obligations for refinancing.\
3.4 Checking whether a loan is specially secured.\
3.5 Calculation of bank refinancing.\
3.6 Calculation of reference debt.\
3.7 Calculation of referral payments only.\
3.8 Retrieval of debt amounts suitable for refinancing.

4. Evaluation and rating.

4.1 Determining categories based on score values.\
4.2 Determining categories based on applicants' scores.\
4.3 Selection of the highest category.\
4.4 Determining the required income to process lending.

5. Currency and conversion operations.

5.1 Retrieval of balance values with currency conversion.\
5.2 Conversion of debt amounts from other currencies.\
5.3 Retrieval of internal loan amounts with currency conversion.

6. Generation and analysis.

6.1 Generation of product condition structures.\
6.2 Generation of combinations based on input parameters.\
6.3 Analysis of data from the credit bureau and creation of refinancing matrices.

7. Employment and customer management.

7.1 Determining customer segmentation based on customer data.\
7.2 Calculation of current employment tenure.\
7.3 Checking for the presence of a credit history.\
7.4 Selection of the maximum employment item by monthly salary.\
7.5 Selection of suitable employment reference items based on specific conditions.

8. Verification and checks.

8.1 Checking for "bad" customer credit history.\
8.2 Checking for delinquency of more than 30 days.\
8.3 Verification of category matching a specific set of categories.\
8.4 Checking for loans with specific dates.

Detailed information about the Risk project flows can be found [HERE](#main-flows-for-key-features).

Additionally, we can highlight individual _**Decision rules**_ flows, a set of risk rules you can configure according to your internal policies. You can use these rules when analyzing a loan application or other financial transactions..

A set of rules for making a decision on an application: refuse, send the application to the “gray zone”, approve. To work with rules, you use a special reference book in the system, where you can specify the rule code, its name, the sign of the rule’s activity, the rule type, and the alias for calling the strategy where the rule is used.

Basic types of rules: DECLINE — refusal, REFER — a sign of a “gray zone”, WARNING — a negative warning without influencing the decision on the application.

Each rule is checked in the process if the attribute isActive = true.

The check is configured according to the following rules:

001 - Invalid identity card — this rule is triggered if, at the time of calling the strategy, the identity document of the transaction participant has expired;

002 - Applicant’s employer is on the blacklist — this rule is triggered if the applicant’s employer is on the blacklist;

003 - Applicant doesn't comply with minimum age requirements — this rule is triggered if, at the time of calling the strategy, the applicant has not reached the minimum age for receiving a loan established by the bank;

004 - Applicant doesn't comply with maximum age requirements — this rule is triggered if the applicant's current age does not allow them to be offered any product, because at the end of the loan, they will be older than the maximum established age;

005 - Applicant doesn't comply with citizenship requirements — this rule is triggered if the client's citizenship does not coincide with the citizenship requirements for receiving a loan;

006  - Applicant doesn't comply with total seniority requirements — this rule is triggered if the client's total confirmed seniority is less than the minimum established requirements;

007 - Applicant doesn't comply with current seniority requirements — this rule is triggered if the applicant's length of service at the current place of work is less than the minimum established requirements;

008 - Absence of offer to the applicant — this rule is triggered if the client’s solvency does not allow them to be offered any lending product;

009 - Bad credit history — this rule is triggered if the applicant’s credit history has at least one case when:

* There was an overdue debt of more than 90 days or
* There was an overdue debt of more than 30 days in the last 12 months or
* There was an overdue debt of 30 to 90 days over the last 12-24 months.

010 - Current overdue — this rule is triggered if there is an outstanding overdue debt on the principal or interest;

011 - Applicant is on blacklist — this rule is triggered if the applicant is on the blacklist;

012 - Overdue loan at the bank — this rule is triggered if the internal credit history has an outstanding overdue debt of more than 30 days;

013 - Previous declines due to bad credit history — this rule is triggered if the applicant was previously rejected due to a bad credit history (the list of rule codes is configured separately), and the validity period of this refusal has not yet expired;

014 - Previous declines from risk manager — this rule is triggered if the applicant was previously rejected manually by the risk manager, and the validity period of this refusal has not yet expired;

015 - Cut off — this rule is triggered if the scored score is less than the minimum requirements;

016 - Number of overdue — this rule is triggered if the applicant had at least one loan overdue for up to 30 days for 3 months in a row;

017 - Late loan repayment — this rule is triggered if, over the last 5 years the applicant has at least one loan that was fully repaid with a delay of more than 30 days;

018 - Gap between declared and confirmed income — this rule is triggered if the specified income, according to the applicant, exceeds the confirmed income from the state employment service by more than 10%;

019 - Applicant's contract is about to expire — this rule is triggered if, according to the state employment service, the applicant's current contract expires in the next 30 days;

020 - Limit of the number of credit history requests has been exceeded — this rule is triggered if, within a specified number of days, the applicant’s credit report has been requested more than the maximum specified number of times.

Detailed information about the decision rules flows used in the project can be found [HERE](#main-flows-for-decision-rules).

In the project, you can also use specially designed _**Features**_. You will find the key features:

1. [Additional offer calculation](#additional-offer-calculation).
2. [Analysis of favorable credit history](#analysis-of-favorable-credit-history).
3. [Calculation of incoming credit payload](#calculation-of-incoming-credit-payload).
4. [Calculation of the maximum possible loan term](#calculation-of-the-maximum-possible-loan-term).
5. [Calculation of the offer matrix](#calculation-of-the-offer-matrix).
6. [Drawing up a matrix of loans for refinancing](#drawing-up-a-matrix-of-loans-for-refinancing).
7. [Net income calculation](#net-income-calculation).
8. [Segmentation](#segmentation).&#x20;

### **Additional offer calculation**

This feature allows for the calculatation of the possible limits of an additional credit card limit matrix for an applicant after the main product has been selected. Parameters that affect the amount of the proposal (incoming loan load, applicant’s grade, net income, etc.) are not re-calculated; calculations made at the stage of selecting the main product are used.

The additional offer matrix consists of products with a credit card attribute. At the same time, the matrix may contain refinancing products.

The process of calculating the additional limit consists of the following steps:

1. Selection of the necessary parameters calculated earlier: net income, incoming credit load, client risk grade, sign of presence/absence of a positive credit history, maximum possible loan period for each product;&#x20;
2. The availability of a product offer (credit card) for the applicant is checked based on the risk grade and sales channel for the application. Additionally, the possibility and availability of a special offer for the applicant is checked: an offer for salary card holders or bank employees;
3. For each row of the matrix, the maximum possible payment for the additional product maxLoanPayment is calculated, taking into account the selected main product.

When calculating the product offer for refinancing, the following formula for calculating maxLoanPayment is used:

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FhwNirsLcJBy4uVqYJATI%2F1.png?alt=media&#x26;token=e28685fe-0b03-493c-9e5c-499d8308a762" alt=""><figcaption></figcaption></figure>

When calculating the product offer without refinancing, the following maxLoanPayment calculation formula is used:

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FI0jbRLQFhGQra4feJsRW%2F2.png?alt=media&#x26;token=62a3564b-170f-43e9-aad0-b5f6ccf246c8" alt=""><figcaption></figcaption></figure>

* dtiRef — maximum credit load parameter for refinancing products depending on the client’s risk grade
* income — net income
* monthlyPayment — monthly payment for the main product
* expenses — incoming loan load and other expenses of the applicant
* livingWage — the minimum living wage set by the government
* dti — maximum credit load parameter for products without refinancing depending on the client’s risk grade
* sum\_bank\_ref — the amount of payments on refinanced loans at the Bank in the matrix row
* sum\_ref — the amount of payments on refinanced loans in the matrix row

4. For each product of the matrix, the maximum possible supply amount is calculated — the minimum value of the following calculated parameters:

* based on solvency — s\_prod is calculated according to the formula:

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FxyCBzgFpd11DYYohPf1v%2F3.png?alt=media&#x26;token=5bf5881c-2650-4f5f-b226-0f585610d428" alt=""><figcaption></figcaption></figure>

* a\_max — maximum possible payment for the product
* rate — product rate for the client, taking into account the risk grade and applied discounts
* term — the maximum possible loan term for the product
* possible unsecured lending amount as the difference between the unsecured lending limit and the amount of current unsecured debt from the client to the bank;
* possible loan amount within the product as the difference between the maximum possible loan amount for the product taking into account the presence/absence of a positive credit history and the amount of the client’s current debt for the product in the bank.

The following Flows are used in the feature:

1. Main flow: matrixCalculationBrms6
2. Auxiliary flows:

* closestCondition
* conditionByPeriod
* creditBalance
* getDebtRefinBrms6
* getDebtRefinBrms6Limit
* getGradeByScore
* getMaxLoanPayment
* isCreditPledged
* mergeConditions
* roundFloat

### Analysis of favorable credit history

This feature analyzes data from the Credit Bureau's response and returns an indication (true/false) of whether the applicant's credit history should be recognized as positive.

A credit history is considered positive if the response from the Credit Bureau includes at least one loan that meets at least one set of the following criteria:

1. An existing loan, issued at least a specified number of months ago, the repayment of which is carried out without any overdue payments of more than 30 days;
2. A closed loan, the last payment on which was no more than 24 months ago. At least a specified number of months have passed from the moment the loan was issued to the last payment. The loan was repaid without any overdue payments exceeding 30 days.

The following Flows are used in the feature:

1. Main flow: isCreditHistoryNotExist
2. Auxiliary flows:

* areThereOverduesMoreThan30D

### Calculation of incoming credit payload

The feature calculates the applicant's current credit load based on the Internal Credit History data and the Credit Bureau's response.

1. Current loans, issued no more than 15 days ago, are selected from the Internal Credit History. A check is made to see if there is information about this loan in the Credit Bureau's response. In the absence of information, the annuity payment for such a loan is calculated for the loan term. The settlement rate is a configurable parameter.
2. Based on records from the Credit Bureau's response, existing loans directly to the applicant, as well as existing loans for which the applicant acts as a guarantor, are selected. An annuity payment is calculated for each such loan. The rate for calculation is a customizable parameter and depends on the type of loan (card/non-card). The resulting calculated value is compared with the data from the Credit Bureau response. Depending on the difference between the values, either the calculated value or the value from the Credit Bureau’s response is used to calculate the credit load.
3. Additionally, an alternative level of incoming credit load is calculated: payments on loans issued under guarantees of government bodies are subtracted from the resulting total amount of the loan.

The following Flows are used in the feature:

1. Main flow: incomingCreditPayload
2. Auxiliary flows:

* calculateCreditPayment
* calculateInternalCreditPayment
* getCreditAmount
* getCreditPayment
* getInternalCreditAmount
* isAnyCurrentLiabilityHasOverdue
* isLiabilityAvailableForRef
* isSpecialPledge
* isThereCreditWithSpecificDate
* setLiabilityPaymentAndRef

### Calculation of the maximum possible loan term

For each product, the feature calculates the number of months for which a loan can be issued to the applicant.

1. The applicant's age in months is calculated.
2. For each product, the maximum possible loan term is determined as the difference between the established maximum age depending on the applicant’s gender \*12 and the applicant’s age in months.
3. The maximum possible loan term for each product is determined as the minimum value of two values: the maximum possible loan term for the product according to the Product Catalog; the calculated maximum possible loan term for the product for the applicant.

The following Flows are used in this feature:

1. Main flow: productMaxTerms
2. Auxiliary flows:

* closestCondition
* conditionByPeriod
* filterConditions
* maxTerm
* maxTermObj
* mergeConditions

### Calculation of the offer matrix

This feature allows for the calculation of a matrix of offers for the applicant: the maximum possible amount for the maximum allowed period for each product available to the applicant.

The process of calculating the offer matrix consists of the following steps:

1. Сalculation of the necessary parameters: net income, incoming credit load, client risk grade, sign of presence/absence of a positive credit history, maximum possible loan period for each product; drawing up a matrix for loan refinancing;&#x20;
2. The availability of a product offer for the applicant is checked based on the risk grade and sales channel for the application. Additionally, the possibility and availability of a special offer for the applicant is checked: an offer for salary card holders or bank employees;
3. For each row of the matrix, the maximum possible payment for the product maxPayment is calculated.

When calculating the product offer for refinancing, the following formula for calculating maxPayment is used:

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FHCn5VPFxR9JehQejQsc9%2F4.png?alt=media&#x26;token=7b5e0623-5ca1-4fca-a297-7d18152f06af" alt=""><figcaption></figcaption></figure>

When calculating the product offer without refinancing, the following maxPayment calculation formula is used:

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FeGqWu2sS7ceCVjldv8fd%2F5.png?alt=media&#x26;token=04cec38a-3b2f-4f04-8bf0-7c973f9c0e3d" alt=""><figcaption></figcaption></figure>

* dtiRef — maximum credit load parameter for refinancing products depending on the client’s risk grade
* totalIncome — net income
* alternativeMonthlyPayment — incoming credit payload excluding loans issued under guarantees of government bodies
* addExpenses — other expenses of the applicant
* livingWage — the minimum living wage set by the government
* dti — maximum credit load parameter for products without refinancing depending on the client’s risk grade
* bankRefPayment — the amount of payments on refinanced loans at the Bank in the matrix row
* creditPayment — the amount of payments on refinanced loans in the matrix row

4. For each product of the matrix, the maximum possible supply amount is calculated — the minimum value of the following calculated parameters:

* based on solvency — s\_prod according to the formula:

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2F7v3ecEORvWF0cthCNFSW%2F6.png?alt=media&#x26;token=7fa74380-062c-4311-bb29-6d84dad1ae00" alt=""><figcaption></figcaption></figure>

* a\_max — maximum possible payment for the product maxPayment
* rate — product rate for the client, taking into account the risk grade and applied discounts
* term — the maximum possible loan term for the product
* possible unsecured lending amount as the difference between the unsecured lending limit and the amount of current unsecured debt from the client to the bank;
* possible loan amount within the product as the difference between the maximum possible loan amount for the product taking into account the presence/absence of a positive credit history and the amount of the client’s current debt for the product in the bank.

5. Two matrices of offers are compiled: one (APPROVE) contains offers in the amount of a loan that does not require collateral, the second (POSSIBLE) contains offers that can be provided to the applicant when providing a guarantor.

The following Flows are used in the feature:

1. Main flow: matrixCalculation
2. Auxiliary flows:

* calculateBankRefPayment
* calculateRefDebt
* calculateRefPaymentOnly
* closestCondition
* conditionByPeriod
* creditBalance
* getDebtRefin
* getDebtRefinLimit
* getGradeByScore
* getOutstandingDebt
* isCreditPledged
* mergeConditions
* possibleCombinations
* setMatrixLiabilities

### Drawing up a matrix of loans for refinancing

This feature analyzes the loans from the Credit Bureau response and compiles a refinancing matrix from all possible refinancing combinations (for example, 101, 111, 001, ...).

A loan is considered available for refinancing if it meets all the following conditions:

1. There is no current overdue loan debt;
2. There were no overdue debts exceeding 30 days for a given number of months;
3. The type of loan collateral meets the requirements or is empty;
4. The term of the loan meets the specified requirements.

The following Flows are used in the feature:

1. Main flow: setMatrixLiabilities
2. Auxiliary flow:

* isLiabilityAvailableForRef

### Net income calculation

This feature determines the amount of income that must be used as the applicant's income to determine the possibility of lending:

1. If there is an amount of income specified by the underwriter, the income from the underwriter is used.
2. If there is no income from the underwriter, the availability of income information from the countrywide payroll data service is checked. If there is no information about active employers, the income indicated by the applicant is accepted as income.
3. If only one active employer is listed in the response from the countrywide wage data service, the applicant is checked to see if the applicant has additional income. If such a sign is indicated, and the income indicated by the applicant exceeds the income from the service by 10 percent or more, the income indicated by the applicant is accepted as income, otherwise, income from the response of the country-wide salary data service.
4. If more than one active employer is listed in the response from a countrywide payroll data service, each employer is reviewed to ensure that the applicant's employment history with that employer is met. The calculation includes those incomes that meet the length of service requirements. If no years of service qualify, income from the highest earning employer is included in the calculation. Next, a check is performed to establish whether the applicant has an additional income indicator. If such a sign is indicated, and the income indicated by the applicant exceeds the income from the service by 10 percent or more, the income indicated by the applicant is accepted as income, otherwise, income from the response of the country-wide salary data service.

The following Flows are used in the feature:

1. Main flow: incomeNet
2. Auxiliary flow:

* closestCondition
* conditionByPeriod
* getGradeByScore
* maxEmptItemBySalary
* mergeConditions
* suitableEmployments

### Segmentation

This function returns a customer segment based on customer data in the following parameters:

* A positive credit history;
* Availability of employment data from the national system;
* Length of experience at current place of work;
* Net income;
* Age;
* Score.

The list of segments and parameter requirements for each segment are configured separately. The client's segment is checked in order of segment priority, where 1 is the highest priority.

The following Flows are used in the feature:

1. Main flow: segmentation
2. Auxiliary flow:

* areThereOverduesMoreThan30D
* calculateCurrentWorkingTerm
* isCreditHistoryNotExist
* maxEmptItemBySalary

## Flows

### Main flows for key features

name: **matrixCalculationBrms6**

_Description:_\
The flow allows to calculate the possible limit of an additional credit card limit matrix for an applicant after the main product has been selected. Parameters that affect the amount of the proposal (incoming loan load, applicant’s grade, net income, etc.) are not re-calculated; calculations made at the stage of selecting the main product are used.

The flow performs a sequential call to the auxiliary flow to calculate the parameters and output the formation of the basic structure of the parameters.

Parameters:

| Input                                                                                  | Output          |
| -------------------------------------------------------------------------------------- | --------------- |
| <p>ParametersBasic<br>ApplicationAdditionalDto</p><p>Float,Float,Float,Float,Float</p> | ParametersBasic |

name: **isCreditHistoryNotExist**

_Description:_ Description: Checking for no credit history. Iterate through creditReport.liabilities, check for Overdue30DPlus, check for CreditStatus and LastPayDateNotZero and compare by date.

_Parameters:_

| Input           | Output  |
| --------------- | ------- |
| CreditReportDto | Boolean |

name: **incomingCreditPayload**

_Description:_\
The flow calculates the applicant's current credit load based on the Internal Credit History data and the Credit Bureau's response.

Iteration based on internal credit history data and the response from the Credit Bureau and checking against a number of parameters.

_Parameters:_

| Input                                                                  | Output           |
| ---------------------------------------------------------------------- | ---------------- |
| ParametersBasic ApplicationAdditionalDto Float,Float,Float,Float,Float | ParametersBasic  |

name: **productMaxTerms**

_Description:_\
Сalculates the number of months for which a loan can be issued to the applicant.\
Sequential calling of an auxiliary flow to calculate parameters and output the formation of the ParametersPrimary structure.

_Parameters:_

| Input                                             | Output            |
| ------------------------------------------------- | ----------------- |
| <p>ParametersPrimary<br>ApplicationPrimaryDto</p> | ParametersPrimary |

name: **matrixCalculation**

_Description:_\
Сalculates the number of months for which a loan can be issued to the applicant.

Iterate through products, call a number of auxiliary flows and generate a response in the form of a ParametersBasic structure.

_Parameters:_

| Input                                                                                                                                                                                                                                                                                                                                                      | Output           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| <p>Array&#x3C;String><br>Array&#x3C;MatrixBasic><br>ProductCondition MatrixBasic<br>Array&#x3C;MatrixBasic></p><p>Array&#x3C;MatrixBasic></p><p>Integer,Integer,Integer,Integer,</p><p>String, </p><p>Boolean,Boolean,Boolean, Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float,Float</p> | ParametersBasic  |

name: **setMatrixLiabilities**

_Description:_\
Analyzes the loans from the Credit Bureau response and compiles a refinancing matrix from all possible refinancing combinations (for example, 101, 111, 001, ...). Filtering liabilities by the condition isLiabilityAvailableForRef and matching each refCreditLocal.id and liabilityХ.

_Parameters:_

| Input                            | Output      |
| -------------------------------- | ----------- |
| <p>ParametersBasic<br>String</p> | MatrixBasic |

name: **incomeNet**

_Description:_\
Determines the amount of income that must be used as the applicant's income to determine the possibility of lending.\
Sequential calling of an auxiliary flow to calculate parameters and output the formation of the ParametersBasic structure.

_Parameters:_

| Input                                                                   | Output          |
| ----------------------------------------------------------------------- | --------------- |
| <p>ApplicationBasicDto EmploymentReferenceDto</p><p>ParametersBasic</p> | ParametersBasic |

name: **segmentation**

_Description:_

Returns a customer segment based on customer data in the following parameters: a positive credit history, the availability of employment data from the national system, engagement of experience at the current place of work, net income, age, score.

Sequential checking for each of the segmentation parameters and generation of the output ParametersBasic structure.

_Parameters:_

| Input                                                                                                                 | Output          |
| --------------------------------------------------------------------------------------------------------------------- | --------------- |
| <p>AbsReportBasicDto</p><p>ApplicationBasicDto</p><p>CreditReportDto</p><p>EmploymentReferenceDto ParametersBasic</p> | ParametersBasic |

### Main flows for Decision rules

name: **rule\_001\_invalid\_identity\_card**

_Description:_

Check invalid identity cards.

Comparing identityCardExpDate with currentDate.

_Parameters:_

| Input                                                                              | Output             |
| ---------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p> | Array\<ReasonItem> |

name: **rule\_002\_applicants\_employer\_is\_in\_black\_list**

_Description:_

Checking the client's employer to see if he is on the blacklist.

Checking the client's employer stopListCompany and grayZoneCompany.

_Parameters:_

| Input                                                                         | Output             |
| ----------------------------------------------------------------------------- | ------------------ |
| <p>EmploymentReferenceDto Array&#x3C;String></p><p>Array&#x3C;ReasonItem></p> | Array\<ReasonItem> |

name: **rule\_003\_applicant\_doesnt\_comply\_with\_minimum\_age\_requirements**

_Description:_

Minimum age check.

Check for Number of years from date of birth to current date \<minimum age.

_Parameters:_

| Input                                                                                           | Output             |
| ----------------------------------------------------------------------------------------------- | ------------------ |
| <p>DataForBRMS1 ApplicationPrimaryDto</p><p>Array&#x3C;String></p><p>Array&#x3C;ReasonItem></p> | Array\<ReasonItem> |

name: **rule\_004\_applicant\_doesnt\_comply\_with\_maximum\_age\_requirements**

_Description:_

Maximum age check.

Check for All values ​​Tmax\<Min.term, months.

_Parameters:_

| Input                                                                                                                                       | Output             |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ParametersPrimary</p><p>Array&#x3C;ProductTypeDto></p><p>ApplicationPrimaryDto</p> | Array\<ReasonItem> |

name: **rule\_005\_applicant\_doesnt\_comply\_with\_citizenship\_requirements**

_Description:_

Citizenship check.

Citizenship according to the application form ≠ Citizenship according to the directory of product types0.

_Parameters:_

| Input                                                                                                 | Output             |
| ----------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p><p>DataForBRMS1</p> | Array\<ReasonItem> |

name: **rule\_006\_applicant\_doesnt\_comply\_with\_total\_seniority\_requirements**

_Description:_

Check for general work experience.

Check for the borrower's total length of service (months) \<Minimum total work experience, months.

_Parameters:_

| Input                                                                                                                              | Output             |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p><p>DataForBRMS2</p><p>EmploymentReferenceDto</p> | Array\<ReasonItem> |

name: **rule\_007\_applicant\_doesnt\_comply\_with\_current\_seniority\_requirements**

_Description:_

Check for length of service at the current place of work.

Check for the borrower's length of service in this company (months) \<Minimum work experience at the current place, months.

_Parameters:_

| Input                                                                                                                              | Output             |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p><p>DataForBRMS2</p><p>EmploymentReferenceDto</p> | Array\<ReasonItem> |

name: **rule\_008\_absense\_of\_offer\_to\_applicant**

_Description:_

Checking the minimum loan amount.

Check for Smax=0 for all lending combinations (=no APPROVE matrix) or Incomenet < аpp\_retail.custom\_setting.Min\_oplata\_truda.

_Parameters:_

| Input                                                                                                  | Output             |
| ------------------------------------------------------------------------------------------------------ | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationBasicDto</p><p>ParametersBasic</p> | Array\<ReasonItem> |

name: **rule\_009\_bad\_credit\_history**

_Description_:

Checking for bad credit history.

Check for each of the obligations indicated in the credit report, calculating the number of times the delinquency was more than 30 days (historyItem; overdueDays>30)(b) for each of the obligations indicated in the credit report, the number of times the delinquency was more than 30 days over the last 12 months is calculated (historyItem; overdueDays>30 and reportingPeriod ≥ current month (date) - 12 months)(c) for each of the obligations indicated in the credit report, the number of times the delinquency was more than 30 days but less than 90 days in the last 12-24 months is calculated (historyItem; overdueDays>30 and overdueDays ≤90 and reportingPeriod ≤ current month ( date) – 12 months)(d) for each of the obligations indicated in the credit report, the number of times the delinquency was more than 90 days over the last 12-24 months is calculated (historyItem; overdueDays>90 and reportingPeriod ≤ current month (date) - 12 months

_Parameters_:

| Input                                                                                                                                            | Output             |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationBasicDto</p><p>ParametersBasic </p><p>CreditReportDto</p><p>DataForBRMS2</p> | Array\<ReasonItem> |

name: **rule\_010\_current\_overdue**

_Description:_

Checking for current overdue debt.

Check on (creditStatus = 004, 006, 007, 008, 009, 011 and daysMainSumOverdue > DAYS\_MAIN\_SUM\_OVERDUE) or (creditStatus = 004, 006, 007, 008, 009, 011 and daysInterestOverdue > DAYS\_INTEREST\_OVERDUE).

_Parameters:_

| Input                                                                                           | Output             |
| ----------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>CreditReportDto</p><p>DataForBRMS2</p> | Array\<ReasonItem> |

name: **rule\_011\_applicant\_is\_in\_black\_list**

_Description:_

Checking whether a client is on the stop list.

Checking for FIN code=FIN code of the client from the stop list (app\_retail.identity\_card.fin\_code = integration.

_Parameters:_

| Input                                                                              | Output             |
| ---------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p> | Array\<ReasonItem> |

name: **rule\_012\_overdue\_loan\_at\_the\_bank**

_Description_:

Checking for debt on a bank loan.

Checking previous applications for refusals from the risk manager or credit history.

_Parameters_:

| Input                                                                                                                           | Output             |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p><p>DataForBRMS1</p><p>AbsReportPrimaryDto</p> | Array\<ReasonItem> |

name: **rule\_013\_previous\_declines\_due\_to\_bad\_credit\_history**

_Description_:

Check for D020 previous refusals due to credit history.

Checking for FIN code = FIN code of the application with the status “Refusal” and refusal code = D011, D012, D016 and the current date is the date of the decision < Srok\_otkaz\_cred.

_Parameters_:

| Input                                                                                                 | Output             |
| ----------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto</p><p>DataForBRMS1</p> | Array\<ReasonItem> |

name: **rule\_014\_previous\_declines\_from\_risk\_manager**

_Description_:

Checking for previous failures of the risk manager.

Check for (FIN code = FIN code of the application with the status “Refusal” (status\_id = DECLINE\_UNDER) and verification\_checklist contains at least one record with result = TRUE and current date – date of decision < declinePeriodRM) or (FIN code = FIN code of an application with the status “Refusal” (status\_id = DECLINE\_UNDER) and current date – date of decision < Srok\_otkaz\_RM).

_Parameters_:

| Input                                                                                           | Output             |
| ----------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationPrimaryDto DataForBRMS1</p> | Array\<ReasonItem> |

name: **rule\_015\_cut\_off**

_Description_:

Cut-off check.

Check score < app\_retail.custom\_setting.CUT\_OFF\_SCORE.

_Parameters_:

| Input                                                                            | Output             |
| -------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationBasicDto</p> | Array\<ReasonItem> |

name: **rule\_016\_number\_of\_overdue**

_Description_:

Checking the number of exits overdue.

For each loan, the indicator R = number of facts is calculated when the attribute “Overdue up to 30 days” (historyItem, 0\<overdueDays<30) was present at least 3 times in a row.

_Parameters_:

| Input                                                                        | Output             |
| ---------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>CreditReportDto</p> | Array\<ReasonItem> |

name: **rule\_017\_late\_loan\_repayment**

_Description_:

Checking for late loan repayment.

Checking for lastPaymentDate > contractDueOn +30 days and lastPaymentDate>Current date – 5 years.

_Parameters_:

| Input                                                                        | Output             |
| ---------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>CreditReportDto</p> | Array\<ReasonItem> |

name: **rule\_018\_gap\_between\_declared\_and\_confirmed\_income**

_Description_:

Checking for the difference between declared and confirmed income.

_Parameters_:

| Input                                                                                                                            | Output             |
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>ApplicationBasicDto</p><p>DataForBRMS2</p><p>EmploymentReferenceDto</p> | Array\<ReasonItem> |

name: **rule\_019\_applicants\_contract\_is\_about\_to\_expire**

_Description_:

Verification if the employment contract ends in the next 30 days.

Check for NextEndDate < Current date + 30 days.

_Parameters_:

| Input                                                                          | Output             |
| ------------------------------------------------------------------------------ | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String> EmploymentReferenceItem</p> | Array\<ReasonItem> |

name: **rule\_020\_limit\_of\_number\_of\_credit\_history\_requests\_has\_been\_exceeded**

_Description_:

Checking if the limit on the number of credit history requests has been exceeded.

Checking for count > numberAcbRequest.

_Parameters_:

| Input                                                                                           | Output             |
| ----------------------------------------------------------------------------------------------- | ------------------ |
| <p>Array&#x3C;ReasonItem></p><p>Array&#x3C;String></p><p>CreditReportDto</p><p>DataForBRMS2</p> | Array\<ReasonItem> |

name: **mainRulesFlow**

_Description_:

Calling all the decisionRules and getting the result for each of them.

Sequentially calling all decisionRules and forming the output structure Array.

_Parameters_:

| Input                                                                                                                                                                                                                                                 | Output             |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| <p>ApplicationPrimaryDto</p><p>ApplicationBasicDto EmploymentReferenceDto EmploymentReferenceItem</p><p>Array</p><p>ParametersPrimary</p><p>ParametersBasic</p><p>DataForBRMS1</p><p>DataForBRMS2</p><p>CreditReportDto</p><p>AbsReportPrimaryDto</p> | Array\<ReasonItem> |

name: **decisionRulesMaker**

_Description_:

Making a decision based on the results of checking all decisionRules.

Iteration through all ReasonItems and checking for the type of the triggered rule, according to which a response is generated based on the results of checking all decisionRules.

_Parameters_:

| Input              | Output |
| ------------------ | ------ |
| Array\<ReasonItem> | String |

### Auxiliary  flows

name: **closestCondition**

_Description_:

Selecting a condition with maxPeriod or minPeriod which is greater or less than the passed term.

Iterate through conditions and select a condition with maxPeriod and minPeriod which are greater or less than the passed term.

_Parameters_:

| Input                                                                  | Output           |
| ---------------------------------------------------------------------- | ---------------- |
| <p>ProductTypeDto</p><p>Integer</p><p>Array&#x3C;ProductCondition></p> | ProductCondition |

name: **conditionByPeriod**

_Description_:

Selecting ProductCondition based on term and product conditions.

Iteration through conditions, selecting conditions with minPeriod and maxPeriod, filtering conditions by conditions and calling the ClosestCondition flow.

_Parameters_:

| Input                                                                  | Output           |
| ---------------------------------------------------------------------- | ---------------- |
| <p>ProductTypeDto</p><p>Integer</p><p>Array&#x3C;ProductCondition></p> | ProductCondition |

name: **creditBalance**

_Description_:

Obtaining the loan balance value, taking into account the conversion of other currencies.

Determining the loan type, calculating the balance, calculating the balance taking into account currency conversion

_Parameters_:

| Input                                                               | Output |
| ------------------------------------------------------------------- | ------ |
| <p>Credit</p><p>Boolean</p><p>Boolean</p><p>Float, Float, Float</p> | Float  |

name: **getDebtRefinBrms6**

_Description_:

Calculation of the amount of refinanced loans.

Iteration on external bank loans, obtaining the amount of internal loans and calculating these amounts.

_Parameters_:

| Input                                            | Output |
| ------------------------------------------------ | ------ |
| <p>ParametersBasiс</p><p>Float, Float, Float</p> | Float  |

name: **getDebtRefinBrms6Limit**

_Description_:

Calculating the amount of refinanced credit card loans.

Iterate through external bank loans, obtain the amount of internal credit card loans and calculate these amounts.

_Parameters_:

| Input                                            | Output |
| ------------------------------------------------ | ------ |
| <p>ParametersBasiс</p><p>Float, Float, Float</p> | Float  |

name: **getGradeByScore**

_Description_:

Determining grade by score value.

Iterate through Array\<Product Condition> and compare each element (boundary values) of Array\<Product Condition> with the Score value.

_Parameters_:

| Input                            | Output |
| -------------------------------- | ------ |
| <p>ProductTypeDto<br>Integer</p> | String |

name: **getMaxLoanPayment**

_Description_:

Calculation of the maximum loan payment.

Determining the loan category (refinanced/non-refinanced) and calculating the maximum loan installment amount.

_Parameters_:

| Input                                                                                    | Output |
| ---------------------------------------------------------------------------------------- | ------ |
| <p>ApplicationAdditionalDto ProductTypeDto</p><p>ProductCondition</p><p>Float, Float</p> | Float  |

name: **isCreditPledged**

_Description_:

Checking whether the loan is pledged.

Iterate through pawn and compare guaranteeKind with a number of keywords.

_Parameters_:

| Input  | Output  |
| ------ | ------- |
| Credit | Boolean |

name: **mergeConditions**

_Description_:

Merge сonditions.

Convert Map\<Array\<ProductCondition>> to Array\<ProductCondition>.

_Parameters_:

| Input                          | Output                   |
| ------------------------------ | ------------------------ |
| Map\<Array\<ProductCondition>> | Array\<ProductCondition> |

name: **roundFloat**

_Description_:

Rounding a number to a specified precision.

_Parameters_:

| Input                   | Output |
| ----------------------- | ------ |
| <p>Float<br>Integer</p> | Float  |

name: **isInSegmentBrms**

_Description_:

Сhecking whether a grade matches a certain set of grades.

Iteration through products, obtaining a grade for each product and checking whether this grade is included in the list of suitable grades.

_Parameters_:

| Input                                                                    | Output  |
| ------------------------------------------------------------------------ | ------- |
| <p>Array&#x3C;ProductTypeDto></p><p>Array&#x3C;String></p><p>Integer</p> | Boolean |

name: **calculateCreditPayment**

_Description_:

Calculate loan payment.

Determining the type of loan, calculating the loan payment and generating a response in the form of a map.

_Parameters_:

| Input                                                                               | Output       |
| ----------------------------------------------------------------------------------- | ------------ |
| <p>Date</p><p>Guarantee</p><p>Liability</p><p>Float, Float, Float, Float, Float</p> | Map\<String> |

name: **calculateInternalCreditPayment**

_Description_:

Calculate payment on an internal loan.

Checking the opening and closing dates, calculating the loan amount and calculating the loan payment.

_Parameters_:

| Input                                                 | Output       |
| ----------------------------------------------------- | ------------ |
| <p>Credit</p><p>Float, Float, Float, Float, Float</p> | Map\<String> |

name: **getCreditAmount**

_Description_:

Receive loan amount.

Determining the type of loan and calculating its amount, taking into account the conversion of values from other currencies.

_Parameters_:

| Input                                                | Output |
| ---------------------------------------------------- | ------ |
| <p>Guarantee<br>Liability<br>Float, Float, Float</p> | Float  |

name: **getCreditPayment**

_Description_:

Get the monthly loan payment amount.

Determining the loan type and calculating the monthly payment amount, taking into account the conversion of values from other currencies.

_Parameters_:

| Input                                                      | Output                  |
| ---------------------------------------------------------- | ----------------------- |
| <p>Guarantee</p><p>Liability</p><p>Float, Float, Float</p> | <p>Float</p><p><br></p> |

name: **getInternalCreditAmount**

_Description_:

Receive internal loan amount.

Determining the type of internal loan and calculating its amount, taking into account the conversion of values from other currencies.

_Parameters_:

| Input                                | Output |
| ------------------------------------ | ------ |
| <p>Credit<br>Float, Float, Float</p> | Float  |

name: **isAnyCurrentLiabilityHasOverdue**

_Description_:

Checking whether any current obligation is overdue.

Iterate through liabilities and check creditStatus.

_Parameters_:

| Input                                         | Output  |
| --------------------------------------------- | ------- |
| <p>CreditReportDto</p><p>Integer, Integer</p> | Boolean |

name: **isLiabilityAvailableForRef**

_Description_:

Checking whether any current liability is eligible for refinancing.

Iterate through history, check for overdue Days > 30, check using collateral Code.

_Parameters_:

| Input                                          | Output  |
| ---------------------------------------------- | ------- |
| <p>String<br>Liability<br>Integer, Integer</p> | Boolean |

name: **isSpecialPledge**

_Description_:

Checking whether the loan is a special collateral.

Checking creditPurpose for a match with a specific code.

_Parameters_:

| Input     | Output  |
| --------- | ------- |
| Liability | Boolean |

name: **isThereCreditWithSpecificDate**

_Description_:

Checks if there is a loan with a specific date.

Iteration through guarantee and liabilities and checking for matching conditions by date.

_Parameters_:

| Input                                     | Output  |
| ----------------------------------------- | ------- |
| <p>CreditReportDto<br>Date<br>Boolean</p> | Boolean |

name: **setLiabilityPaymentAndRef**

_Description_:

Set liability payment and the possibility of refinancing.

Checking for overdue payments, calling the isLiabilityAvailableForRef flow and setting the results to the Liability structure.

_Parameters_:

| Input                                                       | Output    |
| ----------------------------------------------------------- | --------- |
| <p>ApplicationBasicDto<br>Liability<br>Boolean<br>Float</p> | Liability |

name: **filterConditions**

_Description_:

Generating the output Map\<ProductCondition> structure with minPeriod and maxPeriod.

Iteration by conditions, comparison by maxPeriod and minPeriod, formation of the output structure Map\<ProductCondition>.

_Parameters_:

| Input                    | Output                 |
| ------------------------ | ---------------------- |
| Array\<ProductCondition> | Map\<ProductCondition> |

name: **maxTerm**

_Description_:

Calculation of the maximum possible loan term for the applicant, taking into account the gender and age of the applicant and the conditions of the product.

Selection of the maximum loan term depending on gender in accordance with the terms and conditions of the loan product.

_Parameters_:

| Input                                                                               | Output  |
| ----------------------------------------------------------------------------------- | ------- |
| <p>Array&#x3C;ProductCondition></p><p>ProductTypeDto</p><p>String</p><p>Integer</p> | Integer |

name: **maxTermObj**

_Description_:

Calculation of the maximum possible loan term for the applicant, taking into account the gender and age of the applicant and the conditions of the product.

Determine the gender of the applicant, call the ConditionByPeriod flow, select the maximum period from maxTerm and maxTermByCondition. Response flow of the presented ProductMaxTerm structure.

_Parameters_:

| Input                                                                   | Output         |
| ----------------------------------------------------------------------- | -------------- |
| <p>Array&#x3C;ProductCondition> ProductTypeDto<br>String<br>Integer</p> | ProductMaxTerm |

name: **calculateBankRefPayment**

_Description_:

Calculate bank refinancing payment.

Checking the loan for the possibility of refinancing and bank affiliation and summing up all suitable brmsMonthlyPayment.

_Parameters_:

| Input                               | Output |
| ----------------------------------- | ------ |
| <p>ParametersBasic</p><p>String</p> | Float  |

name: **calculateRefDebt**

_Description_:

Сalculate reference debt.

Call flow getOutstandingDebt and sum creditDebt OutstandDebt.

_Parameters_:

| Input                                                         | Output |
| ------------------------------------------------------------- | ------ |
| <p>ParametersBasic</p><p>String</p><p>Float, Float, Float</p> | Float  |

name: **calculateRefPaymentOnly**

_Description_:

Calculate only referral payment.

Summation of brmsMonthlyPayment overall refCredits.

_Parameters_:

| Input                               | Output |
| ----------------------------------- | ------ |
| <p>String</p><p>ParametersBasic</p> | Float  |

name: **getDebtRefin**

_Description_:

Get the amount of debt that is suitable for refinancing.

Preparing a list of liabilities that meet the conditions, iterating through internalCredits within each liability, summing the balance for each qualifying liability.

_Parameters_:

| Input                                                         | Output |
| ------------------------------------------------------------- | ------ |
| <p>ParametersBasic</p><p>String</p><p>Float, Float, Float</p> | Float  |

name: **getDebtRefinLimi**t

_Description_:

Get the amount of debt that is suitable for refinancing.

Preparing a list of liabilities that meet the conditions, iterating through internalCredits within each liability, summing the balance for each qualifying liability.

_Parameters_:

| Input                                                                            | Output                  |
| -------------------------------------------------------------------------------- | ----------------------- |
| <p>ParametersBasic</p><p>Boolean</p><p>Float</p><p>String</p><p>Float, Float</p> | <p>Float</p><p><br></p> |

name: **getOutstandingDebt**

_Description_:

Converting a debt amount from another currency.

Selecting the desired currency and converting according to the exchange rate.

_Parameters_:

| Input                                      | Output |
| ------------------------------------------ | ------ |
| <p>Liability</p><p>Float, Float, Float</p> | Float  |

name: **possibleCombinations**

_Description_:

Generates a set of combinations according to an input parameter.

Generates a set of combinations according to the input parameter and forms the output structure Array\<String>.

_Parameters_:

| Input   | Output         |
| ------- | -------------- |
| Integer | Array\<String> |

name: **setMatrixLiabilities**

_Description_:

Analyzes the loans from the Credit Bureau response and compiles a refinancing matrix from all possible refinancing combinations (for example, 101, 111, 001, ...).

Matching each refCreditLocal.id and liabilityX.

_Parameters_:

| Input                               | Output      |
| ----------------------------------- | ----------- |
| <p>ParametersBasic</p><p>String</p> | MatrixBasic |

name: **maxEmptItemBySalary**

_Description_:

Selecting the maximum EmptItem by salary.

Iterate through empItems and select empItem with maximum monthly Salary.

_Parameters_:

| Input                           | Output                  |
| ------------------------------- | ----------------------- |
| Array\<EmploymentReferenceItem> | EmploymentReferenceItem |

name: **suitableEmployments**

_Description_:

Selecting suitable EmploymentReferenceItem based on certain conditions.

Iterate through the conditions inside emp.active and check for a series of conditions, the appropriate element is added to the output Array\<EmploymentReferenceItem> structure.

_Parameters_:

| Input                                                                                                 | Output                          |
| ----------------------------------------------------------------------------------------------------- | ------------------------------- |
| <p>EmploymentReferenceDto ParametersBasic</p><p>ProductTypeDto</p><p>Array&#x3C;ProductCondition></p> | Array\<EmploymentReferenceItem> |

name: **areThereOverduesMoreThan30D**

_Description_:

Checking for delinquency of more than 30 days.

Iterate through liability.history and check each for overdueDays > 30.

_Parameters_:

| Input     | Output  |
| --------- | ------- |
| Liability | Boolean |

name: **calculateCurrentWorkingTerm**

_Description_:

Calculates the current working period.

Calling the maxEmptItemBySalary flow and checking its result for null.

_Parameters_:

| Input                  | Output  |
| ---------------------- | ------- |
| EmploymentReferenceDto | Integer |

name: **maxEmptItemBySalary**

_Description_:

Selecting the maximum empItem by monthly Salary.

Iterate through all empItems and select the empItem with maximum monthly Salary.

_Parameters_:

| Input                           | Output                  |
| ------------------------------- | ----------------------- |
| Array\<EmploymentReferenceItem> | EmploymentReferenceItem |

name: **calculateWorkingTerms**

_Description_:

Finding the date of the earliest active contract and the earliest contract in general.

iterate through active and inactive contracts and select the most previous one in each category.

_Parameters_:

| Input                  | Output             |
| ---------------------- | ------------------ |
| EmploymentReferenceDto | CalcWorkTermResult |

name: **checkAnyCreditPaidOffLate**

_Description_:

Searching for a loan with an overdue payment date.

Iterate through all Liabilities and find one that meets the late payment conditions.

_Parameters_:

| Input           | Output |
| --------------- | ------ |
| CreditReportDto | String |

name: **checkCountInquiryHistory**

_Description_:

Сhecking the number of requests in history.

Iteration through inquiryHistory and counting elements that fit the condition.

_Parameters_:

| Input           | Output  |
| --------------- | ------- |
| CreditReportDto | Boolean |

name: **checkCurrentOverdueThirtyDays**

_Description_:

Сhecking the current thirty days overdue.

Iteration through all liabilities and checking for conditions.

_Parameters_:

| Input                                                       | Output |
| ----------------------------------------------------------- | ------ |
| <p>CreditReportDto</p><p>Integer, Integer</p><p>Boolean</p> | String |

name: **checkEmployerUnreliable**

_Description_:

Еmployer reliability check.

Iterate all empItems and check employers on stopListCompany and grayZoneCompany.

_Parameters_:

| Input                                                | Output |
| ---------------------------------------------------- | ------ |
| <p>EmploymentReferenceDto</p><p>Boolean, Boolean</p> | String |

name: **checkOverdueNumberNotGood**

_Description_:

Check the number of overdue under certain conditions.

Iterate through the entire history inside each liability element. checking for 3 more debts over 30 days.

_Parameters_:

| Input           | Output |
| --------------- | ------ |
| CreditReportDto | String |

name:  **isCreditHistoryBad**

_Description_:\
Сhecking the client's "bad" credit history.

Iterate through each history element of each liability and test history against a number of conditions. If "true" is obtained for any of the conditions, then, taking into account the grade, the client's history will be defined as “bad”.

_Parameters:_

| Input                                                            | Output  |
| ---------------------------------------------------------------- | ------- |
| <p>CreditReportDto<br>ParametersBasic</p><p>Integer, Integer</p> | Boolean |

name: **isInSegmentBrms**

_Description_:

Сhecking whether a grade matches a certain set of grades.

Iteration through products, obtaining a grade for each product and checking whether this grade is included in the list of suitable grades.

_Parameters_:

| Input                                                                    | Output  |
| ------------------------------------------------------------------------ | ------- |
| <p>Array&#x3C;ProductTypeDto></p><p>Array&#x3C;String></p><p>Integer</p> | Boolean |

name: **isThereOverdue30plus**

_Description_:

Checking if a payment is overdue for more than 30 days.

Iterate through debtI and debtP and check for overdue more than 30 days.

_Parameters_:

| Input  | Output  |
| ------ | ------- |
| Credit | Boolean |

name: **loansOverview**

_Description_:

Сonversion in the form of presentation of information about loans.

Iterate over an Array\<Credit> and provide the information as a Map\<String> after a series of intermediate operations.

_Parameters_:

| Input                                              | Output       |
| -------------------------------------------------- | ------------ |
| <p>Array&#x3C;Credit></p><p>Array&#x3C;Credit></p> | Map\<String> |

name: **previousDeclines**

_Description_:

Checking previous applications for refusals.

Iterate through PreviousApplication and check for failures.

_Parameters_:

| Input                                                                  | Output       |
| ---------------------------------------------------------------------- | ------------ |
| <p>Array&#x3C;PreviousApplication></p><p>Integer, Integer, Integer</p> | Map\<String> |

\
\
