Custom Hooks: Customize the Logic for Investor Payouts
Overview
With the Mercury release, CL Loan provides custom hooks so lenders can customize the logic for investor payouts.
Customize
To achieve customization, the following steps need to be carried out:
Create a custom class and implement the methods from AbstractInvestorPayout class, and write the logic within the methods.
Specify the created class name in the Custom Settings > Org Parameters > Investor Payout Class Name field.
Enable the parameters corresponding to the method that you want to implement. The parameters can be enabled in Custom Settings > Fractionalization Parameters. The following Methods and Parameters table describes the method names and their corresponding parameters to be enabled.
Query or DML operations must not be performed in the custom method implementations.
Methods and Parameters
The following are the global virtual methods that can be implemented to achieve the required customization:
Global Virtual Methods | Parameter Name | Description |
---|---|---|
setPriorityForIO | Custom SetPriority |
If this parameter is enabled, the system considers the custom SetPriorityForIO method instead of the default method provided by CL Loan. This method can be implemented to define the investor order priority for the payouts. It returns a map of a list of investor IOs with a defined priority. |
splitPrincipal | Custom Split Principal |
If this parameter is enabled, the system considers the custom splitPrincipal method instead of the default method provided by CL Loan. This method can be implemented to customize the splitting of the principal. It divides the principal amount between investors based on their priority. It returns the principal amount that needs to be paid for the investor payout. |
splitInterest | Custom Split Interest |
If this parameter is enabled, the system considers the custom splitInterest method instead of the default method provided by CL Loan. This method can be implemented to customize the splitting interest. It returns the interest that needs to be paid for the investor payout. |
splitFees | Custom Split Fees |
If this parameter is enabled, the system considers the custom splitFees method instead of the default method provided by CL Loan. This method can be implemented to customize the splitting fee. It returns the fee that needs to be paid for the investor payout. |
splitInterestComponent | Custom Split Additional Interest |
If this parameter is enabled, the system considers the custom splitInterestComponent method instead of the default method provided by CL Loan. This method can be implemented to customize the splitting additional interest component. It returns the additional interest fee that needs to be paid for the investor payout. |
updateLoanInvestor | Custom Update Loan Investor |
If this parameter is enabled, the system considers the custom updateLoanInvestor method instead of the default method provided by CL Loan. This method can be implemented to customize the updating of the balance on IO. It updates the investor account values with the customized values for the principal, interest, additional interest, and fees. |