Rules Applied

General

Your company policies and procedures are likely unique. In an effort to help automate as much of your company’s processes as possible, LoanPro provides the Rules Applied feature. So, what is Rules Applied? This is a way you can create your own list of conditions and then specify how a loan should change when a condition is met. There are three things that need to happen in order for a loan to change based on a rule. This article will cover those three things.

Restrictions — Rules Applied will only run on live accounts, and not archived ones. By default, they are also set to only run on activated loans, but if you want them to run on loans before they are activated, you can check the "Preactivation Loan" box when creating a rule.

Note: You cannot use a computation field in a rules applied rule.
Computation fields are in some ways similar to rules applied: both use Clojure rules to compute a value. The difference is that computation fields can be much, much longer. If you copied and pasted the logic of a computation field into the rule, you could significantly slow the system down. Solving a single computation field might only take a moment, but when its being solved on thousands of loans simultaneously, even that small increase in the time it takes to evaluate each rule makes a big difference.

Example

Let’s say that your company policy is that as soon as a loan has a payoff amount of $0.00, the loan status should be changed to paid off. The next three sections will show how this can be accomplished.

Create a Rule

LoanPro uses the computer language Clojure (pronounced like 'closure') to write rules. If you're unfamiliar with Clojure, there are several articles in this help system that can show you how to use Clojure to write equations, make comparisons, and apply those skills in LoanPro.

Why we use Clojure
First, Clojure is a language that already existed and there are many online resources that can teach you about how to write a Clojure rule. Second, Clojure complies to Java and so it’s a language that can run efficiently on our servers without the need for a custom-built compiler (nerd language for a program that reads a programming language and turns it into something your computer can understand).

In order to use rules applied, first you need a rule. In our example, the rule should be that payoff is equal to zero. Now we need to convert that to a Clojure rule that LoanPro can understand. We’ll start by navigating to Settings > Company > Rules Manager within your company account.

Click Add to add a new rule.

First enter a name for the rule in the Name field. Next, select True/False Output from the Category drop-down menu. We’ll make this selection since we want the rule to evaluate to either true (the loan is paid off) or false (the loan is not paid off).

Enter the new rule into the formula box provided.

Our rule will be (<= status-payoff 0). As the article on comparisons explains, Clojure uses <= to write 'less than or equal to'. It's a logical test to see if the first number, in this case the status-payoff variable, is less than or equal to the second number, zero. The payoff amount is represented by the variable status-payoff, which we found by typing 'payoff' into the search field.

Now you can save the rule by clicking . To validate any rule you entered, click Validate this rule. This will ensure that your rule uses correct Clojure syntax.

The Validate button will tell you if your rule is valid, i.e., whether it's written in correct Clojure syntax and the LoanPro system is able to understand it. But just because it's valid doesn't mean that it's doing what you want. Playing off of our example, (>= status-payoff 0) is also a valid rule, but it asks whether payoff amount is greater than zero, the exact opposite of what we're trying to accomplish. Always double-check that your rules are not only valid, but saying what you want them to.

Apply the Rule

Now that we have our rule created, we need to tell the system what to do with a loan once this rule is met. To do this, we will first navigate to Settings > Loan > Rules Applied > Loan Settings. There are several tabs under the Rules Applied tab. In our example, we want the loan status to change to "paid off" when our rule is met. Since loan status is a loan settings item, we chose the Loan Settings tab under the Rules Applied tab. If we wanted a different action to be taken when our rule was met, we may have chosen one of the other tabs.

Click  to enter the new rule application.

You have many options on this page, showing all the loan settings that you can set to change when a rule applies. First, enter a name for the rule application so that you will be able to distinguish it from the others. Something like ‘Change status to Paid Off when Payoff is $0.00’. Just beneath that, click the word Empty, which shows where the rule we created will go.

In the window that pops up, click Load Existing Rule. Find our rule, Loan is Paid Off, then click Insert in the last column of the rule’s row. This will add the rule to the formula editor. Now click Save in order to add that rule to the rule application. With our rule in place, we can now choose which loans it will apply to when it's evaluated.

If you want the rule application to be active on new loans going forward, click the “Add To New Loans” checkbox. If you would like the rules applied to be executed prior to activating the loan, check the "Preactivation Loan" checkbox; if left unchecked, the rules applied will be executed after the loan has been activated. Use the “Evaluate In Real Time” and “Evaluate In Daily Maintenance” checkboxes to choose whether rules should be evaluated when changes are made to the loan, when daily maintenance runs, or both.

Now we will designate the actual change that needs to occur. You have the option to change any of the loan setting values or custom field values. This includes adding or removing portfolios, setting dates or other values. For our example, we would just change the loan status to paid off.

When you choose to set a date or numeric value, you can choose a base date or number that your change will be relative to. You can choose any of the following as the base date:

  • Current Date
  • Next AutoPay Apply Date
  • Next AutoPay Process Date
  • Loan Creation Date
  • Last Human Activity Date
  • Date Last Current
  • Final Payment Date
  • Original Maturity Date
  • Insurance Start Date
  • Insurance End Date
  • Last Payment Date
  • Next Due Date
  • Next Scheduled Payment Date
  • Closed Date
  • Liquidation Date
  • Repossession Date
  • Follow Up Date
  • Contract Date
  • First Payment Due Date
  • Subsequent Due Date

So, for example, if you choose to change the "Closed Date" for the loan, you could choose to set the closed date relative to the Liquidation Date. After you choose the base date, you can enter an integer value that equals a number of days away from the base date. A negative integer will give a final date that is previous to the base date, and a positive integer will give a date after the base date. So, if the Liquidation Date is 01/01/2019 and you enter 10 as your integer, the final date will be 01/11/2019.

Note: If you choose a base date that doesn't have a value, by default the current date will be used as the base date. For example, if the base date used is Next AutoPay Apply Date but there is no AutoPay on the account, then the field will instead use the current date.

Numbers work in the same way. The following base numbers are available:

  • Base Zero
  • Amount Past Due
  • Principal Balance
  • Payoff
  • Due Fees
  • Due Principal
  • Due Interest
  • Due Escrow
  • Payoff Fees
  • Remaining Interest
  • Total Advancements
  • Total Credits
  • Next AutoPay Amount
  • Available Credit
  • Last Payment Amount
  • Next Payment Amount
  • Total Loan Amount
  • Underwriting Fee
  • TIL Finance Charge
  • TIL Total of Payments

Finally, click Save in order to save the rule application.

If you want to enroll all of your existing loans in the rule application, click subscriptions on the main screen for the rule application you want to enroll loans for.

Custom Fields

Custom fields can be changed by rules applied. In addition to being able to set a value for fields, you can also choose to check a box to the right of the field to let the rule set the value to blank or null.

Applying the Change

Your work is done at this point, but it’s useful to know when your rule will be evaluated by the LoanPro system. There are three times when a rule may be evaluated by LoanPro: when loans are updated daily, when events occur on the loan, or when you choose to force a rule.

  • Daily Update – LoanPro updates all live loans on a daily basis. This is done to compute interest accrued on the loans, update numbers for payoff, record data for specific reports, add automatic fees, etc. Rule application will be applied at this time and any necessary changes to loans will be made.
  • Loan Events – Loan events like the logging of a payment or fee, the adjustment of past-due balance, etc. can also trigger the evaluation of a rule application. This will only happen if the Evaluate In Real Time checkbox is filled in inside the rule application.
  • Force – You may force a rule for a single loan by clicking "Force Rule" in Rules Applied inside the appropriate loan tab. For our example, you could force the rule application for a specific loan by navigating inside of the loan loan to Rules Applied > Loan Settings and then selecting and then "Force Rule". If the account meets the correct rule criteria, the necessary changes will be applied.


How did we do?


Powered by HelpDocs (opens in a new tab)