Skip to main content

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

ScenarioUse
Different commission for FHA loansRegular rule with Loan Type filter
Different commission for a specific lenderRegular rule with Lender filter
Different commission for FHA loans over $300,000 in TexasSpecial case group (multiple conditions on different attributes)
Different commission when broker comp is below a thresholdSpecial case group (supports numeric comparisons)
Different commission when loan amount is in a specific rangeSpecial 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

  1. Navigate to Commission Templates and click on a template.
  2. Click Edit.

Step 2: Add a Special Case Group

  1. In the template editor, find the Special Cases section.
  2. Click Add Special Case Group.

Step 3: Add Criteria to the Group

Each criterion checks a single property of the loan:
  1. Click Add Condition within the group.
  2. Select the Filter Type (what loan attribute to check).
  3. Set the Value (what to compare against).
  4. Choose the Operator (AND or OR) to control how this criterion combines with others.
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 TypeDescriptionValue Type
Loan TypeThe loan product typeText (e.g., “FHA”, “VA”, “Conventional”)
Loan PurposePurchase or RefinanceText (“Purchase” or “Refinance”)
Payer TypeWho pays the broker compensationText (“Lender”, “Borrower”, “Investor”, “Seller”)
Property StateThe state where the property is locatedText (state code, e.g., “TX”, “CA”)
LenderThe lender/investor on the loanText (lender ID)
Lead SourceWhere the loan originated fromText (lead source ID)
Loan Amount MinLoan amount is at or above a thresholdNumber (e.g., 300000)
Loan Amount MaxLoan amount is at or below a thresholdNumber (e.g., 500000)
BrokerCompMinBroker compensation is at or above a thresholdNumber (e.g., 3000)
BrokerCompMaxBroker compensation is at or below a thresholdNumber (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:
  1. Loan Type = FHA
  2. AND Loan Amount Min = 300000
  3. 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:
  1. Loan Type = FHA
  2. OR Loan Type = VA
This matches either FHA or VA loans.

Example: Mixed Logic

A group with criteria:
  1. Loan Type = FHA
  2. AND Loan Amount Min = 300000
  3. 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:
  1. The engine first checks the rule’s standard filters (lender, loan type, etc.).
  2. If the standard filters pass, the engine evaluates the special case group.
  3. Each criterion in the group is evaluated against the loan’s properties.
  4. The criteria are combined using their operators (AND/OR) in sequence.
  5. If the final result is true, the rule applies.
  6. 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 TypeValueOperator
1Loan TypeFHA
2Loan Amount Min400000AND
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 TypeValueOperator
1BrokerCompMax2500
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 TypeValueOperator
1Loan TypeVA
2Property StateTXAND
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 TypeValueOperator
1Loan Amount Min200000
2Loan Amount Max500000AND
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).