Server Automation Scripts and Libraries
Within the FintechOS Studio, there are Server Scripts which execute several actions which embody a business need such as: filtering products, returning products and setting amounts or periods. On-demand automation scripts are available for being called from any object or context. Here is a list of the scripts used in this solution.
| Library | Script |
|---|---|
| FTOS_BNKAP_RetailLoanFinancialCalculations |
It contains the scripts:
|
| FTOS_BARET_CrossSellingUtils |
It contains the scripts:
|
| FTOS_BP_ChangeStatus_PaymentScheduleType | |
| FTOS.BP_CALC.FormulaEngineHelper |
|
| FTOS.Utils |
|
| FTOS_B2CSession |
|
| FTOS_BARET_CrossSellingUtils |
|
| FTOS_BP_BankingProductHelper |
|
| FTOS_BP_BankingProductValidationHelper | FTOS_BP_BankingProduct_BU_Validations |
| FTOS_CheckExistingClientHelper | FTOS_ACC_Account_Before_Insert |
| FTOS_DCS_Liveness |
|
| FTOS_DFP_OTP_Utils |
|
| FTOS_FlowSettings_Utils | FTOS_GetFlowSettings_ByLoanIdAndDigitalProcessor |
| FTOS_Onfido_Integration |
|
Server automation Scripts
This script checks in the system if the customer is an existing customer based on the PIN.
To achieve this, the script checks in the entity Account if the customer is already existing and saves the value in FTOS_BNKAP_RetailApplicantData in the attribute isExistingCustomer.
Input: retailApplicant
Output: array checkCustomer.
This script checks if the customer is blacklisted.
To achieve this, the script checks in the entity FTOS_BNKAP_RetailApplicantData in the attributeisInBlacklist if the customer is blacklisted.
Input: N/A
Output: array checkCustomerBlack.
This script checks to see if the age of the applicant is in the interval of 18 to 65. This script is used after the step Know Your Customer.
Input: age, minAge = 18; maxAge = 65; isNotInRange
Output: sets the string isInAgeInterval
This script saves the time when the consents were given. This script is used in the step Consents.
Input: agreeTerms, agreeNationalTaxation, agreeCreditBureau
Output: time: now if user agreed to consents, else display the message Agreement not accepted.
This script saves the time when the consents were given. This script is used in the step Contact Info.
Input: agreed
Output: time: now if user agreed to consent, else display the message Agreement not accepted.
This script updates the pricing and loan entities with the calculated values after selecting an offer. This script is used for the step Product Selection.
Input: pricingId; maxInstallment
Output: Js
This script sends the email with the referral to an email address inserted by the customer to referrer a friend. This script is used in the step Congratulations & Feedback.
Input: email; referralId; applicantDataId;
Output: the function sendMailNoEx is executed.
This script validates the referral. This script is used in the step Congratulations & Feedback.
Input: referralId
Output: N/A
This script sets the status of the application of a customer: Initialized; OCR in Progress; Face Recognition in Progress; Video Call in Progress; Contract Signed.
Input: accountApplicationId; toStatus businessStatusInitialized;
Output: N/A
This script inserts the rating given by the customer at the end of the flow. This script is used in the step Congratulations & Feedback.
Input: rating; sourceId; applicationId;
Output: array p
This script updates the approval of the customer to the document. This script is used in the step Signature of Documents.
Input: applicationDocumentId; value;
Output: var agreed
This script calculates the monthly payment, based on the loan amount and the duration. This script is used in multiple steps such as Simulation.
Input: monthlyPayment; duration; amount; interest;
Output: var monthlyPayment
This script filters the products based on the selected amount and period. This script is used for the step Product Selection.
Input: applicationId; amount; period; maxProductsDisplayed;
Output: array res
This script simulates the async with ANAF and Credit Bureau. This script is used for the step Application Result
Input: loanId; applicantDataId;
Output: var financialAnaysis
This script calculates the finance for the applications with the business status SubmittedForReview. This script is used in the step Submit Application.
Input: array loans (with at least one element)
Output: var financialAnaysis
This script generates the loan documents. This script is used in the step Signature of Documents.
Input: applicationId
Output: array data.
This script filters the products based on the amount and period and destination type id.
Input: amount; period; applicationId.
Output: array res
This script saves the available product details into Pricing.
Input: applicationId; productDestTypeId; loanId; date.
Output: array bpRes
This script returns the best offer (banking product) to the customer. This script is used in the step Application Result.
Input: loanId
Output: array pricingData
This script retuns the details about the banking product.
Input: applicationId
Output: array res
This script returns the destination data based on its ID.
Input: destinationId
Output: array res.
This script retuns the DTI
The Debt-to-Income ratio (DTI) is a personal indicator of a good balance between debt and income.
Monthly debt payment amount / Monthly gross amount (before taxes and other deductions)..
Input: financialDataId
Output: array financialData
This script returns the loan destination. This script is used in the step Welcome screens.
Input: des; type;
Output: array statements
This script returns the number of applications filtering them via the personal identification number.
Input: L; RAD.
Output: array noOfRows
This script returns the values for the sliders. This script is used in the step Simulation.
Input:
Output: var parsedSettings
This script calculates whether the customer is eligible financially for a credit card. This script is used for the step Credit Card.
Input: var pricingDetails
Output: boolean isEligible
This script changes the status of the loan. This script is used in multiple steps.
Input: loanId; status.
Output: var status
This script calculates the maximum offer for a customer. This script is used in the step Application Result.
Input: interestRate; monthlyPaymentsForCreditLimits; tenor; income; maxDTI; otherInstallments;
Output: array res
This script calculates the scoring.
Input: applicantDataId; loanId.
Output: var scoringDecision
This script checks to the applications with the statuses new, contactInfo, data, consents, completed, review, approved, docs for the same person (same PIN) and moves them all to the status CanceledByCustomer.
Input: PIN; loanId.
Output: N/A
This script sends the email with the application documents. This script is used in the step Signature of Documents.
Input: applicantDataId; loanId; applicationId;
Output: boolean manuallySign
This script sends the email with the application documents signed by the customer. This script is used in the step Signature of Documents.
Input: applicantDataId; loanId; applicationId;
Output: N/A
This script updates the loan with the default banking product.
Input: loanId; productId; applicationId; pricingId;
Output: string message
This script updates the amount and period. This script is used in the step Simulation.
Input: loanIdId; loanAmount; period.
Output: var loanAmount; period
This script sets the payment day of installments. This script is used in the step Choose Installment Payment Date.
Input: choosenDate; finalDate.
Output: var finalDate.