Documentation Index
Fetch the complete documentation index at: https://docs.keystn.com/llms.txt
Use this file to discover all available pages before exploring further.
What are special case groups?
A special case group is a named collection of criteria attached to a commission template. Each group contains one or more conditions that are evaluated against a loan’s attributes.
When a commission rule is linked to a special case group, the rule only applies if the group’s criteria evaluate to true for the loan being processed.
Commission Rule
|
+--> Standard filter checks (lender, loan type, state, etc.)
|
+--> Special case group check
| |
| +--> Criterion 1: Loan Type = FHA --> true
| +--> Criterion 2: Loan Amount >= 300000 --> true
| +--> Criterion 3: Property State = Texas --> true
| |
| +--> All criteria met (AND) --> Group passes
|
+--> Rule applies --> Use rule's commission
When to Use Special Cases vs. Regular Rules
| Scenario | Use |
|---|
| Different commission for FHA loans | Regular rule with Loan Type filter |
| Different commission for a specific lender | Regular rule with Lender filter |
| Different commission for FHA loans over $300,000 in Texas | Special case group (multiple conditions on different attributes) |
| Different commission when broker comp is below a threshold | Special case group (supports numeric comparisons) |
| Different commission when loan amount is in a specific range | Special case group (min/max numeric conditions) |
In short: use regular rule filters for single-attribute matching, and special case groups when you need to combine conditions that go beyond what filters alone can express — especially numeric thresholds on loan amount or broker compensation.
Creating a Special Case Group
Special case groups are configured within a commission template.
Step 1: Open the Template Editor
- Navigate to Commission Templates and click on a template.
- Click Edit.
Step 2: Add a Special Case Group
- In the template editor, find the Special Cases section.
- Click Add Special Case Group.
Step 3: Add Criteria to the Group
Each criterion checks a single property of the loan:
- Click Add Condition within the group.
- Select the Filter Type (what loan attribute to check).
- Set the Value (what to compare against).
- Choose the Operator (AND or OR) to control how this criterion combines with others.
Step 4: Link a Commission Rule to the Group
After creating the group, create or edit a commission rule and select this special case group. The rule’s commission will only apply when the group’s criteria are satisfied.
Condition Fields
Each special case criterion checks one of the following fields:
| Filter Type | Description | Value Type |
|---|
| Loan Type | The loan product type | Text (e.g., “FHA”, “VA”, “Conventional”) |
| Loan Purpose | Purchase or Refinance | Text (“Purchase” or “Refinance”) |
| Payer Type | Who pays the broker compensation | Text (“Lender”, “Borrower”, “Investor”, “Seller”) |
| Property State | The state where the property is located | Text (state code, e.g., “TX”, “CA”) |
| Lender | The lender/investor on the loan | Text (lender ID) |
| Lead Source | Where the loan originated from | Text (lead source ID) |
| Loan Amount Min | Loan amount is at or above a threshold | Number (e.g., 300000) |
| Loan Amount Max | Loan amount is at or below a threshold | Number (e.g., 500000) |
| BrokerCompMin | Broker compensation is at or above a threshold | Number (e.g., 3000) |
| BrokerCompMax | Broker compensation is at or below a threshold | Number (e.g., 10000) |
Operators: AND vs. OR
Each criterion after the first has an operator that determines how it combines with the previous result:
- AND: Both the accumulated result and this criterion must be true.
- OR: Either the accumulated result or this criterion must be true.
Criteria are evaluated in order, left to right, with the operator applied sequentially:
Result = Criterion1
Result = Result AND/OR Criterion2
Result = Result AND/OR Criterion3
...
Note: There is no grouping or parentheses. Operators are applied strictly in sequence. If you need complex boolean logic, consider breaking it into separate special case groups, each linked to its own rule.
Example: AND Logic
A group with criteria:
- Loan Type = FHA
- AND Loan Amount Min = 300000
- AND Property State = TX
This matches FHA loans in Texas with a loan amount of $300,000 or more. All three must be true.
Example: OR Logic
A group with criteria:
- Loan Type = FHA
- OR Loan Type = VA
This matches either FHA or VA loans.
Example: Mixed Logic
A group with criteria:
- Loan Type = FHA
- AND Loan Amount Min = 300000
- OR Property State = CA
Evaluated as:
Step 1: result = (LoanType == FHA) --> true/false
Step 2: result = result AND (Amount >= 300k) --> true/false
Step 3: result = result OR (State == CA) --> true/false
This matches: (FHA loans over $300k) OR (any loan in California).
How Special Cases Are Evaluated
When the commission engine processes a loan and encounters a rule linked to a special case group:
- The engine first checks the rule’s standard filters (lender, loan type, etc.).
- If the standard filters pass, the engine evaluates the special case group.
- Each criterion in the group is evaluated against the loan’s properties.
- The criteria are combined using their operators (AND/OR) in sequence.
- If the final result is
true, the rule applies.
- If
false, the engine continues to the next rule.
If a special case group has no criteria, it always evaluates to true (the rule applies unconditionally, subject to its standard filters).
Worked Examples
Example 1: High-Value FHA Bonus
Scenario: Pay an extra 10 bps on FHA loans with a loan amount of $400,000 or more.
Special Case Group:
| # | Filter Type | Value | Operator |
|---|
| 1 | Loan Type | FHA | — |
| 2 | Loan Amount Min | 400000 | AND |
Linked Rule:
- Amount Type: Basis Points
- Amount: 60 (instead of the base 50)
- Commission Basis: Loan Amount
Result: A $450,000 FHA loan earns 60 bps ($2,700) instead of the base 50 bps ($2,250).
Example 2: Low Broker Comp Override
Scenario: On loans where broker compensation is less than $2,500, pay a flat $500 minimum to ensure the employee still earns a reasonable commission.
Special Case Group:
| # | Filter Type | Value | Operator |
|---|
| 1 | BrokerCompMax | 2500 | — |
Linked Rule:
- Amount Type: Flat ($)
- Amount: 500
- Commission Basis: Loan Amount
Result: A loan with $2,000 broker compensation earns a flat $500 instead of the percentage-based commission.
Example 3: State-Specific Loan Type Override
Scenario: VA loans in Texas earn 45 bps, while VA loans elsewhere earn 40 bps.
Special Case Group A (VA in Texas):
| # | Filter Type | Value | Operator |
|---|
| 1 | Loan Type | VA | — |
| 2 | Property State | TX | AND |
Linked Rule A: 45 bps
Special Case Group B (VA not in Texas):
This can be handled with a regular rule: Loan Type = VA (no special case needed), set to 40 bps. Since Rule A with its special case is more specific, it will match first for Texas VA loans.
Example 4: Loan Amount Range
Scenario: Loans between $200,000 and $500,000 earn the standard rate. Loans outside that range earn a different rate.
Special Case Group (in range):
| # | Filter Type | Value | Operator |
|---|
| 1 | Loan Amount Min | 200000 | — |
| 2 | Loan Amount Max | 500000 | AND |
Linked Rule: 50 bps (standard rate, applied only when loan amount is $200K-$500K).
A separate rule without a special case group could handle loans outside this range at a different rate.
Relationship to commission rules
A single special case group can be linked to multiple rules within the same template. When the group’s criteria are met, all linked rules become eligible for matching (subject to their own filters and the rule precedence system described in Commission Rules).