Manual Allocation
Here are the journeys, entities, libraries and endpoints related to the Manual Allocation functionality:
Entity FTOS_PYMT_Payment with all attributes. This entity stores payment data from all FintechOS insurance solutions.
FTOS_PYMT_Payment_EditForm Journey
This is a user journey aimed at implementing the Manual Allocation functionality. This journey is marked as Default for insert on FTOS_PYMT_Payment entity.
Search Statement: After clicking the Allocate button on the FTOS_PYMT_Payment_EditForm, the Statement Search grid is displayed. Clicking the Search Statement button returns data about an Installment or a Statement, based on the following search parameters:
-
startDueDateFrom
-
startDueDateTo
-
firstName
-
statementAmount
-
lastName
-
PaymentTypeSearchId
-
policyNo
-
currencyId
-
currencyName
In order to perform a search the user must specify at least one parameter.
In order to show the results, we are using the following functions:
This function uses FTOS_AllocationInstallmentSearch
automation script to get installments based on search. Next, it uses the generateCustomGrid
function to return the results in a grid.
Input parameters: N/A.
Output parameters: Returns the fetch - installments to be allocated.
This function uses the FTOS_INSP_ManualAllocationSearch
automation script to get statements based on search. Next, it uses the generateCustomGrid
function to return the results in a grid.
Input parameters: N/A.
Output parameters: N/A.
This function generates the grid that displays the results of the search.
Input parameters:
-
viewId
- (String) – The name of the CSS Id. -
viewDataSource
– (Object/JSON) – The data resulted from calling thegetInstallmentSearch
orgetStatementSearch(
) function. -
viewColumns
– (Variable) – The type of columns that are displayed in the grid.
Output parameters: N/A.
This function generates the grid that displays the found installments.
Input parameters:
-
viewId
- (String) – The name of the CSS Id. -
viewDataSource
– (Object/JSON) – The data result from the getInstallmentSearch or getStatementSearch function. -
viewColumns
– (Variable) – The type of columns that are displayed in the grid.
Output parameters: N/A.
This function uses the FTOS_PYMT_ManualPaymentAllocation
server automation script in order to allocate the selected payment.
Input parameters: details
– (Object) – The needed data from the generateCustomGridInstallments
function in order to manually allocate a payment.
Output parameters: N/A.
In order to manually allocate a payment, the user clicks on the Add button next to the desired Statement or Installment from the list.
Server Automation Scripts
This script fetches the installments for the search made on the FTOS_PYMT_Payment_EditForm form, after clicking on the Search Statement button.
The script contains the flowing functions:
This function creates the fetch for the results.
Input parameters: N/A.
Output parameters: Returns the fetch.
This function adds the search conditions from the input parameter to the original fetch.
Input parameters: searchObj
– (Object) – This object contains the search values selected by the user in the front end.
Output parameters: Returns the fetch with the newly added conditions.
This script fetches the statements for the search made on the FTOS_PYMT_Payment_EditForm form, after clicking on the Search Statement button.
The script contains the flowing functions:
This function creates the fetch for the results.
Input parameters: N/A.
Output parameters: Returns the fetch.
This function adds, to the original fetch, the search conditions from the input parameter.
Input parameters: searchObj
– (Object) – This object contains the search values selected by the user in the front end.
Output parameters: Returns the fetch with the newly added conditions.
Server Automation Script Library
The FTOS_PYMT_PaymentAllocation_Manual library contains an object with the following functions:
This function fetches the payment.
Input parameters: paymentId
– (variable) -The Id of the payment.
Output parameters: Returns the fetch.
This function fetches the payment schedule.
Input parameters: installmentId
– (variable) -The Id of the installment.
Output parameters: Returns the fetch.
If there is an installment and the installment unpaid amount is greater than 0, then this function inserts the below object into the FTOS_PYMT_StatementDetail entity. The object properties are:
-
statementId
, -
installmentId
, -
insuranceProductId
, -
installmentUnpaidAmount
, -
dueDate
, -
policyId
, -
insuredId
, -
grossInstallmentAmount
, -
totalInstallmentAmount
, -
customerId
.
Input parameters:
-
statementId
– (variable) – The Id of the statement. -
installments
– (array) – An array with the installments.
Output parameters: N/A.
If there is a statement and the installment unpaid amount is greater than 0, then this function inserts the below object into the FTOS_PYMT_Statement entity. The functions also calls the getPaymentScheduleDetail
and insertStatementDetailForStatement
functions. Finally, it changes the business status to Generated for the selected payment. The object properties are:
-
statementType
, -
customerId
, -
installmentsStartDate
, -
dueDate
, -
statementMonthId
, -
installmentsEndDate
, -
statementAmount
, -
statementDate
, -
unpaidAmount
, -
unconfirmedPayAmount
, -
confirmedPayAmount
, -
currencyId
, -
brokerId
, -
productId
, -
isGenerated
, -
expireDate
, -
paymentTypeId
.
Input parameters: installmentId
– (variable) – The Id of the installment.
Output parameters: If currency is missing , the output is an error message. If currency is present and the sumInstallmentAmount
is greater than 0, the output is an object
with the following properties:
-
statementId
, -
statementDetailId
.
This function returns the remaining installment amount in the payment currency.
This function also uses the following libraries:
-
FTOS_PYMT_PaymentAllocation – To call the
getDefaultExchangeRate
function from the Payment Allocation object. -
FTOS_INS_Exchange - To call the
returnExchangeRate
function from the Exchange object.
Input parameters:
-
amount
– (variable) – The amount of the installment. -
installmentCurrency
– (variable) – The installment currency. -
paymentCurrency
– (variable) – The payment currency. -
date
– (variable) – Not used.
Output parameters: Remaining installment amount, in payment currency.
This function returns the installment amount in the payment currency.
This function also uses the following libraries:
-
FTOS_PYMT_PaymentAllocation – To call the
getDefaultExchangeRate
and thegetExchangeCalculationType
functions from the Payment Allocation object. -
FTOS_DFP_FlowProcessorSettings – To call the
getFlowProcessorSettingsByType
function from the Flow Setting object. -
FTOS_INS_Exchange - To call the
returnExchangeRate
function from the Exchange object.
Input parameters:
-
amount
– (variable) – The amount of the installment. -
installmentCurrency
– (variable) – The installment currency. -
paymentCurrency
– (variable) – The payment currency. -
paymentDate
– (variable) – The payment date. -
statementDate
– (variable) – The statement date.
Output parameters: Returns the installment amount in payment currency.
This function allocates a payment for an installment. First the statement is generated and then the payment is allocated. If the payment is greater than the installment, the remaining amount can be manually allocated to other installments.
This function also uses the following libraries:
-
FTOS_PYMT_PaymentAllocation – To call the
getPayment
,getStatement
,getDefaultExchangeRateType
andinsertAllocation
functions from the Payment Allocation object. -
FTOS_INS_Exchange - To call the
returnExchangeRate
function from the Exchange object.
Input parameters:
-
installmentId
– (variable) – The Id of the installment. -
paymentId
– (variable) – The Id of the payment. -
statementId
– (variable) – The Id of the statement. -
statementDetailId
– (variable) – The statement detail id.
Output parameters: N/A.
This function returns the exchange rate details.
This function also uses the following libraries:
-
FTOS_PYMT_PaymentAllocation – To call the
getDefaultExchangeRateType
andgetExchangeCalculationType
functions from the Payment Allocation object. -
FTOS_DFP_FlowProcessorSettings – To call the
getFlowProcessorSettingsByType
function from the Flow Setting object. -
FTOS_INS_Exchange - To call the
returnExchangeRate
function from the Exchange object.
Input parameters:
-
paymentDate
– (variable) – The payment date. -
paymentCurrencyId
– (variable) – The payment currency id. -
statementDate
– (variable) – The statement date. -
statementCurrencyId
– (variable) – The statement currency id.
Output parameters: The exchange rate for the selected payment.
This function allocates a payment on a statement.
This function also uses the FTOS_PYMT_PaymentAllocation library to call the getPayment
, getStatement
, getDefaultExchangeRateType
and insertAllocation
functions from the Payment Allocation object.
Input parameters:
-
paymentId
– (variable) – The Id of the payment. -
statementId
– (variable) – The Id of the statement.
Output parameters: N/A.