Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gorules.io/llms.txt

Use this file to discover all available pages before exploring further.

This guide shows how to build commission rules that handle tiered rates, quota attainment, and complex payout structures.

What you’ll build

A commission decision that:
  • Calculates base commission from tiered rates
  • Applies accelerators for exceeding quota
  • Handles multiple product types with different rates
  • Supports team-based splits
Want to skip ahead? Download the completed decision and import it directly.

Decision flow

Example: Sales commission

Input data

{
  "rep": {
    "id": "SR-1234",
    "role": "account_executive",
    "quota": 100000
  },
  "period": {
    "sales": 125000,
    "newBusiness": 45000,
    "renewals": 80000
  },
  "deal": {
    "amount": 15000,
    "type": "new_business",
    "productLine": "enterprise"
  }
}

Step 1: Base commission rates

Define rates by product and deal type:

Step 2: Quota attainment tiers

Calculate quota percentage and tier: Then apply accelerators based on attainment:

Step 3: Calculate commission

Combine base rate with attainment multiplier:

Step 4: Role-based caps

Apply maximum commission by role:

Output structure

{
  "dealAmount": 15000,
  "baseRate": 0.12,
  "baseCommission": 1800,
  "attainmentPercent": 125,
  "tier": "accelerator_2",
  "multiplier": 1.5,
  "adjustedCommission": 2700,
  "finalCommission": 2700,
  "capped": false
}

Variations

Team splits

Split commission between reps:

Spiffs and bonuses

Add special incentives:

Clawbacks

Handle commission recovery:

Best practices

Version commission plans — Keep history when plans change mid-year. Show calculations — Output intermediate values for transparency. Handle edge cases — Zero quota, partial periods, mid-month starts. Audit trail — Log all inputs and outputs for disputes.