Server Automation Scripts and Libraries

Within Studio, there are bits of code that execute several actions, which embody a business need such as: filtering products, saving session storage, returning products and setting amounts or periods. On-demand automation scripts are available for being called from any object or context.

The client script library named FTOS_RWM_HeaderNavigation contains the code for the progress bar for the mobile view informing the user about the step they are at. It is called on form driven flows in Advanced section tab > After Events.

Server Automation Scripts

Name Description Script Type Digital Asset
FTOS_B2C_SaveSession

This script saves the session storage.

Input: n/a

Output: string

On demand BAN-SDK
FTOS_BARET_AddMortgageAddress

Based on the addressId, this script updates the address in the database.

Input: var applicantId; var addressId; var postCode; var propertyType; var country; var city; var street; var apartment; var floor; var moveInDate; var moveOutDate; var addressStatus

Output: var params

On demand RWM-SDK
FTOS_BARET_AddMortgageSpending

This script gets the details of the loan and updates the values in the database.

Input: var applicantId; var loansDataId; var creditType; var frequency; var currencyCode; var spendingAmount

Output: var params

On demand RWM-SDK
FTOS_BARET_AllocateAssessor

This script selects an assessor for the property.

Input: let loanId

Output: var result

   
FTOS_BARET_ChangeApplicationStatusMortgage

This script changes the business status.

Input: var accountApplicationId; var statusName

Output: n/a

   
FTOS_BARET_CheckAvailableMortgageCoApplicants

This script gets the maximum number of applicants set in the Defaults and determines whether the number of existing applicants is smaller than the maximum.

Input: let loanId

Output: void

On demand RWM-SDK
FTOS_BARET_GenerateMortgageLoanDocuments

This script generates the loan documents.

Input: var loanId; var bankingProductId; var applicationId

Output: boolean

On demand RWM-SDK
FTOS_BARET_GetApprovalType

This script gets the approval type of the loans (approvedLowerOffer and fullApproval) based on the loans that have the statuses UW approved and UW approved lower offer.

Input: let loanId;

Output: var result

   
FTOS_BARET_GetAssessorsBookings

 

Input: let applicationId; let documentsName

Output: array result

   
FTOS_BARET_GetCityIdByName

This script gets the name of the city.

Input: var cityName

Output: boolean

On demand RWM-SDK
FTOS_BARET_GetCountryIdByName

This script gets the name of the country.

Input: var countryName

Output: boolean

On demand RWM-SDK
FTOS_BARET_GetLoanApplicationsByEmail

This script gets all the applicants based on an email address.

Input: var email

Output: loanApplicationList

   
FTOS_BARET_GetMorgageLoanIdbyRetail

This script gets the loanId and the sessionId.

Input: var retailApplicantId

Output: var result

On demand RWM-SDK
FTOS_BARET_GetMortgageApplicantsFullData

This script gets the data regarding the main borrower and the income, addresses and spendings.

Input: var loanId

Output: void

On demand RWM-SDK
FTOS_BARET_GetMortgageApplicantsId

This script gets the data regarding the applicants.

Input: var loanId

Ouput: var result

On demand  
FTOS_BARET_GetMortgageExistingDocument

This script retrieves the mortgage documents.

Input: var loanId; var applicationId; var documentName

Output: var data

   
FTOS_BARET_GetMortgageHubAction

This script sets the status of the loan to Formal Approval.

Input: let loanId

Output: let statusCode

On demand  
FTOS_BARET_GetMortgageProductsBoundaries

This script gets the minimum and maximum periods and amounts for the banking products and other banking products details (interests and product destination). It is used for the form driven flow FTOS_BARET_ConfigureDIP.

Input: var loanId

Output: boolean

On demand RWM-SDK
FTOS_BARET_GetRankedProductsMortgage

This script determiners the mortgage products in a specific order.

Input: var applicationId; var top

Output: any []

On demand RWM-SDK
FTOS_BARET_GetRetailMortgageAddresses

This script gets the details of the borrower's address.

Input: var applicantId

Output: var data

On demand RWM-SDK
FTOS_BARET_GetRetailMortgageSpendings

This script gets the details of the loan.

Input: var applicantId

Output: var data

On demand RWM-SDK
FTOS_BARET_GetZooplaProperties

This script gets the details of the properties within Zoopla.

Input: var minBed; var maxBed; var minPrice; var maxPrice; var propertyType; var searchLatitude; var serachLongitude; var milesRangeId; var top

Output: var result

On demand RWM-SDK
FTOS_BARET_Loan_Link_Extended

This script updates in the entity FTOS_BARET_Loan the following: applicantDataId, applicationIdd, financialDataId, loanNo, name.

Input: var loanId

Output: applicantDataId, applicationIdd, financialDataId, loanNo, name

   
FTOS_BARET_MortgageApplicantsStatus

This script gets the status of each applicant if the have completed their Applicants' Details.

Input: var masterRetailApplicantId; var maxNumberOfApplicants

Output: boolean

On demand RWM-SDK
FTOS_BARET_MortgageBlacklistChecks

This script checks if the borrower is blacklisted.

Input: let applicant

Output: N/A

On demand  
FTOS_BARET_MortgageBOFinancialCalc

This script calculates the final decision based on scoring and the maximum offer and decides whether it is a hard reject or not.

Input: let loanId

Output: boolean

   
FTOS_BARET_MortgageCheckBC

This script checks the applicant in the Credit Bureau.

Input: let items

Output: N/A

On demand  
FTOS_BARET_MortgageChecksCCJ

This script verifies the country court judgments for the employer of the borrower.

Input: var loan

Output: var haveUpdates

On demand  
FTOS_BARET_MortgageFullApprovalCalculations

This script calculates the final decision for the applicantion. It is used in FTOS_BARET_Loan> User Journeys > step FullAnalysis.

Input: let loanId; let KOfail; let finalDecision

Output: finalDecision

On demand  
FTOS_BARET_MortgageGenerateContract

This script generates the contract for the mortgage.

Input: var applicantId; var applicationId; var reportName; var docName

Output: boolean

   
FTOS_BARET_MortgageOffer

This script gets the banking products to be offered to the customer.

Input: var loanId

Output: boolean

On demand RWM-SDK
FTOS_BARET_MortgageSendMailLoanDocuments

This script sends the email with the email template MortgageLoanDocuments. For details, see Email Configurations.

Input: var applicationId; var loanId

Output: boolean

On demand RWM-SDK
FTOS_BARET_NotifyMortgageAssessor

This script sends an email with the email template MortgageAssessProperty.

Input: let loanId

Output: sends email

   
FTOS_BARET_NotifyMortgageUW

This script sends an email to the underwriter.

Input: let loanId; let templateName; let toStatusName

Output: sends an email

   
FTOS_BARET_NotifyUWSolicitor

This script alerts the bank employee to perform the underwriting tasks.

Input: let loanId; let templateName; let toStatusName

Output: sends the email

   
FTOS_BARET_RemoveMortgageAddress

This script deletes an address.

Input: var addressId

Output: void

On demand RWM-SDK
FTOS_BARET_RemoveMortgageSpending

This script deletes an expense that was added manually by an applicant.

Input: var loanId

Output: void

On demand RWM-SDK
FTOS_BARET_RetailMortgageLinkApplicantData

This script updates the data in the Loan and Retail Applicant Data entities (applicantDataId, applicationId, financialDataId, loanNo, name) and (saves the session to the corresponding applicantId).

Input: var loanId

Output: IFtosScriptableEbsExecutionContext object

On demand RWM-SDK
FTOS_BARET_SaveAvailableMortgageProducts

This script is used to get all the banking products and determines which of those are applicable to the application (interest, instalment type, product destination selected) and calls the RetailMortgagePricingSchedule document to get the value of the interest.

Input: var loanId; var applicationId; var filters

Output: the value of the interest

On demand RWM-SDK
FTOS_BARET_SaveMortgagePricing

This script gets the details about all of the offers (products you are eligibile for, the maximum offer we can give you) and updates the offer data , and then searches for the document for that banking product.

Input: var pricingId; var loanId; var applicationId

Output: boolean

On demand RWM-SDK
FTOS_BARET_SendMortgageCoApplicantMailDocument

This script sends the co-applicant an email with the documents.

Input: var loanId; var applicationId; var applicantId; var docName

Output: var coApplicantData

   
FTOS_BARET_SendMortgageContractMail

This script sends an email with the template MortgageLoanContractSign.

Input: var loanId; var applicationId; var docName

Output: sends email

   
FTOS_BARET_SendMortgageSolicitorEmails

This script sends two emails MortgageSolicitorUploadDocuments and MortgageApplicantsWaitingSolicitor.

Input: let applicantName; let applicantEmail; let applicantId; let solicitorEmail; let loanId; let applicationId; let docName

Output: sends two emails

   
FTOS_BARET_SetResumingApplication

This script sets the rest of the applications as expired, and creates the session for the chosen loan.

Input: var chosenLoanId; var email

Output: var navigationUrl

   
FTOS_BARET_UpdateMortgage

This script updates the data in the entity FTOS_BARET_Loan.

Input: N/A

Output: N/A

On demand  
FTOS_BARET_UpdateProductSelection

This script updates the data in the Loan entity.

Input: n/a

Output: IFtosScriptableEbsExecutionContext object

On demand RWM-SDK
FTOS_BNKAP_AddRelatedRetailApplicant

This script inserts the co-applicant data in the RetailApplicantRelation entity.

Input: var masterApplicantId; var loanId

Output: var relatedApplicantId

On demand RWM-SDK
FTOS_BNKAP_AddSolicitorDetails

This script saves in the entity FTOS_BNKAP_Solicitor the details: accountNumber, accountHolderName, sortCode, loanId.

Input: let loanId; let accHolder; let accNumber; let sortCode

Output: let params

   
FTOS_BNKAP_CalcAdjustedIncome

This script determines the monthly net income, i.e., after tax divided by 12 and runs the formula MORTGAGE_KO_DIP.

Input: let incomeAmount; let frequencyId; let categoryId; let applicantId

Output: adjustedIncome

   
FTOS_BNKAP_CoApplicantFullApproval

This script gets the co-applicant data and the loan data and sends them an email and generates a link to the environment.

Input: let firstName; let loanId; let coApplicantsData

Output: updates the email address and phone number in the entity FTOS_BNKAP_RetailApplicantData.

On demand  
FTOS_BNKAP_DeleteAllIncomesByApplicant

This script deletes all the income sources for an applicant from the RetailIncomeData entity.

Input: var masterApplicantId; var loanId

Output: delete incomes

On demand RWM-SDK
FTOS_BNKAP_DeleteFileFromApplicantDocument

This script updates in the entity FTOS_BNKAP_RetailApplicantDocument the files.

Input: let recordId; let files

Output: file

   
FTOS_BNKAP_DeleteFileFromApplicantionDocument

This script deletes the file from an applicantion.

Input: let applicationId; let files

Output: deletes the files

   
FTOS_BNKAP_DeleteFileFromApplicationDocument

This script deletes the file based on the recordId.

Input: let recordId

Output: deletes the record

   
FTOS_BNKAP_DeleteRetailApplicantRelation

This script deletes all the data of the co-borrower from the RetailApplicantRelation & RetailApplicantAddress & RetailIncomeData & RetailLoansData entities.

Input: var relatedApplicantId

Output: deletes the data of the co-applicant

On demand RWM-SDK
FTOS_BNKAP_FinancialAnalysis

This script triggers all the business formulas and determines their result.

Input: var let loanId

Output: boolean

On demand RWM-SDK
FTOS_BNKAP_GetApplicantApplicationDocument

This script gets the documents for the upload process.

Input: let applicationId; let documentsName

Output: array applicationDocuments

   
FTOS_BNKAP_GetApplicantSelectedDocuments

This script gets the documents that were selected by the customer to be uploaded.

Input: let applicantId; let category; var categoryId

Output: var insertedDocs

On demand  
FTOS_BNKAP_GetCoApplicantsFromMainApplicant

This script gets the email address and phone number of the co-applicant.

Input: let applicant

Output: array coAppsId

On demand  
FTOS_BNKAP_GetMortgageFullApprovalStatus

This script sets the result for the: id, address, income, expense, total, coApplicants, isCoApplicant.

Input: let applicantDataId

Output: let result

On demand  
FTOS_BNKAP_GetMortgageLocations

This script gets the location, text, address and open hours depending on the city.

Input: var loc

Output: var data

On demand RWM-SDK
FTOS_BNKAP_GetPurposes

This script gets the destinations of the banking products.

Input: var digitalJourney

Output: boolean

On demand BAN-SDK
FTOS_BNKAP_LoadUWQuestions

This script gets the underwriting questions.

Input: let retailApplicantId

Output: var data

   
FTOS_BNKAP_MortageSaveIncome

This script updates the currency for the income.

Input: var incomeId; var incomeData

Output: update the in incomeData

On demand RWM-SDK
FTOS_BNKAP_Mortgage_CoApplicantStatusData

This script gets the details about the co-applicant and sets a start and end date for the application.

Input: let applicantId

Output: object obj

On demand  
FTOS_BNKAP_MortgageAddSalaryIncome

This script inserts the income in the RetailIncomeData entity.

Input: var incomeData

Output: boolean

On demand RWM-SDK
FTOS_BNKAP_MortgageDeleteIncome

This script deletes the income of an applicant.

Input: var incomeId

Output: void

On demand RWM-SDK
FTOS_BNKAP_MortgageGetAllIncomes

This script gets the income and the currency for it.

Input: var retailApplicantId

Output: var data

On demand RWM-SDK
FTOS_BNKAP_RequestMortgageDocs

This script requests more documents from the customer by generating a link, changing the status to Additiona documents requested.

Input: let loanId

Output: number

   
FTOS_BNKAP_SaveApplicantApplicationDocuments

This script saves the application documents.

Input: let applicantDataId; let applicationId; let documentsType

Output: let documentsType

   
FTOS_BNKAP_SaveApplicantSelectedDocuments

This script saves the type and category of the documents selected by the borrower.

Input: let applicantId; let selectedDocs; let category

Output: inserts in the entity FTOS_BNKAP_RetailApplicantDocument the values for: retailApplicantId, typeId, categoryId.

On demand  
FTOS_BNKAP_SaveCreditKudosData

This script updates in the entity FTOS_BNKAP_RetailFinancialData the values for the: income, incomeWithBankTransfers, essentialExpenditure, affordabilityThreshold, gamblingExpenditureRatioToIncome, currencyId.

Input: let applicantDataId; let ckData

Output: income, incomeWithBankTransfers, essentialExpenditure, affordabilityThreshold, gamblingExpenditureRatioToIncome, currencyId

On demand  
FTOS_BNKAP_SaveUWQuestion

This script updates the answer in the entity FTOS_BNKAP_UnderwritingQuestion.

Input: let questionId; let answer

Output: answer

   
FTOS_BNKAP_UploadMortgageApplicationDocuments

This script uploads the documents for the mortgage, used including for the insurance documents.

Input: let base64; let name; let typeId; let applicationId; let documentType

Output: let insertedDocs

   
FTOS_BNKAP_UploadMortgageProofDocuments

This script updates the documents for the applicant in the database with the uploaded documents.

Input: var base64; var name; var applicantId; var typeId

Output: var insertedDocs

On demand  
FTOS_RWM_CheckForEndpoint

This script verifies the endpoint.

Input: var endpointName

Output: var result

On demand RWM-SDK
 
NOTE  
In addition to the RWM_SDK digital asset, there is the asset BAN-SDK that contains endpoints generically used in all types of digital journeys, not only in Digital Mortgages Self-Service Application.

For details, see Server SDK Reference Guide.