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.
How Rules Work
Every commission template starts with a base commission — the default amount paid per loan. Commission rules act as overrides: when a loan matches a rule’s filters, the rule’s commission is used instead of the base.
Loan funded
|
+--> Check rules (most specific first)
| |
| +--> Rule matches? --> Use rule's commission
| |
| +--> No match? --> Check next rule
|
+--> No rules match --> Use base commission
Each rule has its own:
- Commission amount (percentage, flat, or bps)
- Commission basis (loan amount or broker compensation)
- File fee (optional, overrides the template’s file fee)
- Minimum and maximum commission (optional)
- One or more filters that determine when the rule applies
Creating a Commission Rule
Rules are created within a commission template, in the Rules tab.
Step 1: Open the Template Editor
- Navigate to Commission Templates and click on a template.
- Click Edit.
- Switch to the Rules tab.
Step 2: Add a New Rule
- Click Add Rule.
- A new rule form expands with commission settings and filter options.
Step 3: Set the Rule’s Commission
Configure the commission for this rule, which will override the template’s base commission when the rule matches:
| Field | Description |
|---|
| Amount Type | Percentage (%), Flat ($), or Basis Points (bps) |
| Amount | The commission value |
| Commission Basis | Loan Amount or Broker Compensation |
| Minimum Commission | Optional floor |
| Maximum Commission | Optional ceiling |
| File Fee | Optional per-loan deduction (overrides template file fee) |
| Deducts From Loan Officer | Whether this commission reduces the LO’s pay |
| Apply File Fee First | Whether the file fee adjusts the basis before calculation |
Filters determine which loans trigger this rule. A rule with no filters matches all loans (effectively replacing the base commission). Add one or more filters to narrow the match.
Available Filters
Lead Source Filter
Matches loans that originated from a specific lead source (e.g., “Zillow”, “Realtor Referral”, “Company Website”).
| Setting | Description |
|---|
| Lead Source | Select from your configured lead sources |
| Invert | When enabled, the rule matches loans that are NOT from this lead source |
Example: A rule with Lead Source = “Zillow” pays 40 bps instead of 50 bps because Zillow leads have a lower margin.
Lender Filter
Matches loans submitted to a specific lender/investor.
| Setting | Description |
|---|
| Lender | Select from your configured lenders |
| Invert | When enabled, the rule matches loans NOT with this lender |
Example: A rule with Lender = “Wholesale Lender A” pays a $200 flat bonus on top of the base because this lender offers better pricing.
Branch Filter
Matches loans originated by loan officers in a specific branch office.
| Setting | Description |
|---|
| Branch | Select from your configured branches |
Example: The downtown branch has a different cost structure, so loans from that branch earn 45 bps instead of 50 bps.
Loan Purpose Filter
Matches loans with a specific purpose.
| Setting | Description |
|---|
| Loan Purpose | Purchase or Refinance |
| Invert | When enabled, matches the opposite purpose |
Example: Refinance loans earn 40 bps while purchase loans earn the base 50 bps.
Loan Type Filter
Matches loans of a specific product type.
| Setting | Description |
|---|
| Loan Type | One of: Conventional, FHA, VA, USDA, Non-QM, Reverse Mortgage, HELOC, Commercial, HELOAN |
| Invert | When enabled, matches all loan types EXCEPT the selected one |
Example: VA loans earn a flat $400 commission because the margins are typically lower.
Payer Type Filter
Matches loans based on who is paying the broker compensation.
| Setting | Description |
|---|
| Payer Type | Lender, Borrower, Investor, or Seller |
Example: Lender-paid compensation (LPMI) loans earn 45 bps, while borrower-paid loans earn the base 50 bps.
Tax Classification Filter
Matches based on the employee’s tax classification.
| Setting | Description |
|---|
| Tax Classification | W-2 or 1099 |
| Invert | When enabled, matches the opposite classification |
Example: 1099 contractors earn a higher base rate of 75 bps to offset the lack of benefits, while W-2 employees earn 50 bps.
Property State Filter
Matches loans where the property is located in one or more specific states.
| Setting | Description |
|---|
| Property States | Select one or more U.S. states |
| Invert | When enabled, matches loans in states NOT in the list |
Example: Loans in California and New York earn 40 bps due to higher regulatory costs, while all other states earn the base 50 bps.
Matches loans where a business contact (e.g., realtor, title company, builder) matches a name or email pattern.
| Setting | Description |
|---|
| Business Contact Name | Text to match against contact names (case-insensitive, partial match) |
| Business Contact Email | Text to match against contact emails (case-insensitive, partial match) |
| Invert | When enabled, matches loans WITHOUT a matching business contact |
Example: Loans with a business contact from “ABC Realty” earn a $100 bonus because of a referral partnership.
Filter Inversion
Most filters support an Invert toggle. When inversion is enabled, the filter logic is reversed:
| Normal | Inverted |
|---|
| Loan IS from Lender A | Loan is NOT from Lender A |
| Loan IS a Purchase | Loan is NOT a Purchase (i.e., Refinance) |
| Property IS in California | Property is NOT in California |
This is useful for creating “everything except” rules. For example, instead of creating separate rules for 49 states, you can create one rule for “NOT California” that applies to all other states.
Rule Matching and Precedence
When the commission engine processes a loan, it evaluates rules in a specific order to find the best match.
Matching Process
- Only rules matching the current role context are considered.
- Employee-specific rules are evaluated before template-level defaults.
- More specific rules rank higher than less specific rules.
- All filters on a rule must match (AND logic).
- If the rule is linked to a special case group, that group’s conditions must also be satisfied.
- The first matching rule wins.
Specificity Example
Given these rules on a template:
| Rule | Filters | Commission |
|---|
| Rule A | Loan Type = FHA, Payer Type = Lender | 35 bps |
| Rule B | Loan Type = FHA | 40 bps |
| Rule C | (no filters) | 50 bps |
For an FHA loan with Lender-paid compensation:
- Rule A matches (both filters pass) — 35 bps is used
For an FHA loan with Borrower-paid compensation:
- Rule A does not match (payer type does not match)
- Rule B matches — 40 bps is used
For a Conventional loan:
- Rule A does not match
- Rule B does not match
- Rule C matches (no filters = always matches) — 50 bps is used
Employee-Specific vs. Template Rules
When a template is assigned to an employee, all rules are copied into employee-bound rules. Employee-bound rules take precedence over template-level rules. If an admin creates an employee-specific override rule directly on the employee, it will rank above the template-generated rules.
Combining Multiple Filters
When a rule has multiple filters set, all of them must match for the rule to apply (AND logic). For example:
| Filter | Value |
|---|
| Loan Type | FHA |
| Property State | Texas |
| Payer Type | Lender |
This rule only matches FHA loans in Texas with lender-paid compensation. A loan must satisfy all three conditions.
If you need OR logic (e.g., “FHA OR VA loans”), create separate rules — one for FHA and one for VA.
Worked Example
A brokerage wants to set up the following commission structure for loan officers:
- Default: 50 bps on loan amount
- FHA loans: 40 bps on loan amount
- VA loans: $400 flat
- Zillow leads: 35 bps on loan amount (regardless of loan type)
- California properties: Minimum commission of $500
Template Configuration
Base Commission:
- Basis: Loan Amount
- Amount Type: Basis Points
- Amount: 50
Rule 1 — FHA Override:
- Amount Type: Basis Points, Amount: 40
- Filter: Loan Type = FHA
Rule 2 — VA Override:
- Amount Type: Flat, Amount: 400
- Filter: Loan Type = VA
Rule 3 — Zillow Lead Override:
- Amount Type: Basis Points, Amount: 35
- Filter: Lead Source = Zillow
Rule 4 — California Minimum:
- Amount Type: Basis Points, Amount: 50
- Minimum Commission: 500
- Filter: Property State = California
Calculation Results
| Loan | Type | State | Lead Source | Amount | Commission |
|---|
| Loan 1 | Conventional | Texas | Direct | $350,000 | $1,750 (50 bps) |
| Loan 2 | FHA | Florida | Referral | $300,000 | $1,200 (40 bps) |
| Loan 3 | VA | Georgia | Direct | $500,000 | $400 (flat) |
| Loan 4 | Conventional | Ohio | Zillow | $400,000 | $1,400 (35 bps) |
| Loan 5 | Conventional | California | Direct | $250,000 | $1,250 (50 bps) |
| Loan 6 | Conventional | California | Direct | $80,000 | $500 (min applied; 50 bps = $400 < $500 min) |