Straight Commission - Billing Frequency Based Commission

This rule pays straight commission on invoices based on their billing frequency, but only for deals in the "Won" stage. Each billing type (monthly, yearly, quarterly and semiannual) has its own commission rate.

🔍 How It Works

  1. Start node initiates the rule.
  2. Filter node restricts the scope to deal.stage == "Won".
  3. Multi-path node splits logic based on billing_period:
  • "monthly" → 2%
  • "yearly" → 4%
  • "quarterly" or "semiannual" → 5%
  1. Each path goes through a commission node that calculates the payout based on invoice.total.
  2. All payouts are routed to a payment node which pays 100% to the owner in the current month.

🧩 Nodes Used

Node TypePurpose
startEntry point for the rule logic.
filterFilters deals where deal.stage == "Won".
multi-pathRoutes logic to separate commission tiers based on billing_period.
commissionCalculates payout using a rate and the invoice.total field.
paymentSends payout to the deal owner in the current month.

💰 Commission Tiers

Billing FrequencyRate
Monthly2%
Yearly4%
Semiannual/Quarterly5%

📤 Payout

  • Recipient: Deal owner
  • Timing: Current month
  • Amount: 100% of calculated commission

🧱 Full Dolfin Diagram

{
  "edges": [
    {
      "source": "start-node",
      "target": "placeholder-718e5a4b-9d6b-48d4-850b-4e4e97bf182e",
      "type": "default"
    },
    {
      "source": "placeholder-718e5a4b-9d6b-48d4-850b-4e4e97bf182e",
      "target": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e0",
      "type": "default"
    },
    {
      "data": { "pathNumber": 0 },
      "type": "multi-path",
      "source": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e0",
      "target": "ee9662c1-df29-441a-ae9b-68203458dce9",
      "sourceHandle": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e00"
    },
    {
      "data": { "pathNumber": 1 },
      "type": "multi-path",
      "source": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e0",
      "target": "8eefe109-b899-4b69-acd2-5af4835c23d0",
      "sourceHandle": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e01"
    },
    {
      "data": { "pathNumber": 2 },
      "type": "multi-path",
      "source": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e0",
      "target": "b54b957f-c544-4001-80d8-79ba6ae9694d",
      "sourceHandle": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e02"
    },
    {
      "data": { "pathNumber": 3 },
      "type": "multi-path",
      "source": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e0",
      "target": "2004e305-415f-423b-9d7a-8260ddccbb2b",
      "sourceHandle": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e03"
    },
    {
      "type": "default",
      "source": "8eefe109-b899-4b69-acd2-5af4835c23d0",
      "target": "73cd8802-87e7-45b3-8e9f-0de67b7f07be"
    },
    {
      "type": "default",
      "source": "b54b957f-c544-4001-80d8-79ba6ae9694d",
      "target": "73cd8802-87e7-45b3-8e9f-0de67b7f07be",
      "sourceHandle": null
    },
    {
      "type": "default",
      "source": "ee9662c1-df29-441a-ae9b-68203458dce9",
      "target": "73cd8802-87e7-45b3-8e9f-0de67b7f07be",
      "sourceHandle": null
    },
    {
      "type": "default",
      "source": "2004e305-415f-423b-9d7a-8260ddccbb2b",
      "target": "73cd8802-87e7-45b3-8e9f-0de67b7f07be",
      "sourceHandle": null
    }
  ],
  "nodes": [
    {
      "id": "start-node",
      "data": {},
      "type": "start"
    },
    {
      "id": "placeholder-718e5a4b-9d6b-48d4-850b-4e4e97bf182e",
      "data": {
        "id": "filter",
        "type": "condition",
        "edges": [{ "type": "default" }],
        "formData": {
          "filters": {
            "==": [
              { "var": "deal.stage" },
              "Won"
            ]
          }
        }
      },
      "type": "filter"
    },
    {
      "id": "f9e31159-f013-44e6-8cf6-ea4cb4e7e1e0",
      "data": {
        "formData": {
          "filters": [
            {
              "id": "filter-1",
              "data": {
                "and": [{ "contains": [{ "var": "billing_period" }, "monthly"] }]
              }
            },
            {
              "id": "filter-2",
              "data": {
                "and": [{ "contains": [{ "var": "billing_period" }, "yearly"] }]
              }
            },
            {
              "id": "867e1c2a-6f3e-4ce6-9f0f-aded674e5195",
              "data": {
                "or": [
                  { "contains": [{ "var": "billing_period" }, "semiannual"] },
                  { "contains": [{ "var": "billing_period" }, "quarterly"] }
                ]
              }
            }
          ]
        }
      },
      "type": "multi-path"
    },
    {
      "id": "ee9662c1-df29-441a-ae9b-68203458dce9",
      "data": {
        "formData": {
          "type": "straight",
          "percentage": 0.02,
          "calculate_over_column": {
            "name": "total",
            "type": "numeric",
            "label": "Invoice Total Amount"
          }
        }
      },
      "type": "commission"
    },
    {
      "id": "8eefe109-b899-4b69-acd2-5af4835c23d0",
      "data": {
        "formData": {
          "type": "straight",
          "percentage": 0.04,
          "calculate_over_column": {
            "name": "total",
            "type": "numeric",
            "label": "Invoice Total Amount"
          }
        }
      },
      "type": "commission"
    },
    {
      "id": "b54b957f-c544-4001-80d8-79ba6ae9694d",
      "data": {
        "formData": {
          "type": "straight",
          "percentage": 0.05,
          "calculate_over_column": {
            "name": "total",
            "type": "numeric",
            "label": "Invoice Total Amount"
          }
        }
      },
      "type": "commission"
    },
    {
      "id": "73cd8802-87e7-45b3-8e9f-0de67b7f07be",
      "data": {
        "formData": {
          "phases": [
            {
              "id": "d0d0d7ff-67e2-40a2-8902-2e17defd3abe",
              "timing": "current_month",
              "percentage": 1
            }
          ],
          "recipients": [
            {
              "id": "4e3a1c3b-49b3-4252-9b4f-2126d671c9fb",
              "recipient": "owner",
              "percentage": 1
            }
          ]
        }
      },
      "type": "payment"
    }
  ]
}

Sample test case

📄 Example Invoices for a Monthly Commission Cycle

Invoice IDDeal IDBilling PeriodStageAmount (USD)Contributes?Commission %Commission Value
INV-001D-101monthlyWon10,000✅ Yes2%200
INV-002D-102yearlyWon24,000✅ Yes4%960
INV-003D-103quarterlyWon18,000✅ Yes5%900
INV-004D-104onboardingWon8,000❌ No0
INV-005D-105monthlyOpen15,000❌ No0

📊 Commission Summary

Only invoices tied to Won deals and supported billing periods are considered.

Applied Logic:

  • Monthly invoices → 2% commission
  • Yearly invoices → 4% commission
  • Quarterly/Semiannual invoices → 5% commission
  • Unsupported billing periods or deal stages → 0%

Total Commission Payout:

  • INV-001: $200
  • INV-002: $960
  • INV-003: $900
  • Total: $2,060

💰 Final Payout

  • Rule Type: Commission
  • Calculation Basis: Per invoice
  • Timing: Paid in current month
  • Recipient: Deal owner
  • Total Commission: $2,060

On this page