Using Computation Rules to Automate Stoplights and Flags


This article assumes that you have read and understand the material covered in Using Conditional Statements.

In LoanPro, there are several automated evaluation channels that can change the stoplight or flag status for your loan. These status changes are evaluated when a loan is updated on a daily basis, generally outside of business hours for the US and Canada, and can be run manually from inside of a loan as needed. This article will primarily cover how to create these computation rule systems.

Stoplight and Flag Rule Basics

Up until now, almost all of the rules you made could return just about any kind of data, whether it be a number, a date, text, or true/false. This is because the computation rule(s) that you made just displayed the value to you and LoanPro didn’t use the value directly for interacting with your loans. However, this is no longer the case. Your computation rules become only a single part of a larger expression in LoanPro, and as a result LoanPro expects them to return a specific set of values otherwise, it won’t work.

For Stoplight and Flags, your computation rule(s) must return either true or false; any other value that your rule evaluates to will not be understood by LoanPro or will result in behavior that you didn’t intend.

As a general rule of thumb, always test your rule(s) through a computation field before adding it to a flag or stoplight rule. This helps speed up the process of developing and testing a rule since you won’t have to wait until the next day to see if the rule did what you wanted it to.

The reason for this is that your rules are the conditional expression in an IF statement generated by LoanPro. This expression looks similar to the following:

(if {your computation rule} {perform desired stoplight/flag change})

This means that the rule you provide is used to determine whether or not the system is supposed to perform the desired changes to the flag or stoplight. Keep this in mind as you create your stoplight and flag rules since it can determine if the system performs how you expect it to or not.

Creating a Stoplight Rule

To create a stoplight rule, navigate to Settings > Loan > Alerts > Stoplight and then click the blue 'Add' button in the upper right corner.

This should take you to a new page where you can create a formula for your stoplight rule. You'll first want to select active or inactive status for the rule, along with the stoplight color. Keep in mind that if a stoplight rule is inactive, the system will ignore it. Otherwise, the system will test it against all loans to see if a loan matches the condition. The formula editor, where you'll write your formula, is located at the bottom of the screen (remember, it needs to evaluate to true or false).

When you are done, click Save.

Evaluation Order

It's important note that each loan can only have one stoplight value set at a time. As a result, each stoplight has a priority which determines which stoplight rule is evaluated first, which one second, and so forth. On the main screen, you'll see that there are numbers in orange boxes that indicate the order in which the stoplight rules will be evaluated. LMS will stop evaluating once it finds the first active rule that a loan matches.

This means that when a loan’s stoplight status is being evaluated, LoanPro will check to see if the first rule works; if not then it will do the second, and then if that rule doesn’t work it will check the third rule and so forth until it finds the first rule that works. That means if a loan matches the first rule the system will ignore all other rules for that loan and will move on to the next loan, even if you have other rules that would’ve matched for that loan. To change the order of evaluation, simply click the blue arrow to the right of the orange number.

Creating a Flag Rule

To create a flag rule, navigate to Settings > Loan > Alerts > Flag System and then click in the blue 'Add' button in upper right corner.

This will take you to the flag rule creation screen. There are four fields of interest when creating a flag: The flag’s name, it’s color, it’s description, and the computation rule/formula for it.

The flag name is placed in the textbox labeled 'Name.' Enter the name that you want this flag to be known by. Then you'll select the flag’s color using the drop-down box next to the name field.

Next is the flag description. This is the text that you want to be displayed whenever someone views the flag’s details. This can optionally have information about the loan with the flag. To insert loan information click on the “Help Variables” text just above the description box and then select the desired variables just like you would with a computation rule. The main distinction here is that the variables are formatted differently for the description than for rules, since the system needs help to know when you want the loan-amount and when you want to display “loan-amount”.

Finally, enter the computation rule that determines when the flag status will change. In order to do so, click the blue link that says 'empty' beneath rule field, which should be directly to the right of the flag name. Doing so will open the formula editor. When you’re done, click Save in both the formula editor and the creation screen.

As you’ve probably noticed, there is no priority category for flags, unlike Stoplights. This is because the same loan can have multiple flags, so LoanPro evaluates every loan against all of the flags to see which one(s) match. This means that if there are two flag rules that a loan matches, then there will be two flags for that loan. 

How did we do?

Powered by HelpDocs (opens in a new tab)