---
schema_version: "1"
id: d39f4bd909098e1d2946e14edffc3e72cce807b7ae93799527cd00bdd1e7ba88
title: Special Commission Expense Cases in Salesforce Spiff
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_expense_edge_cases.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_expense_edge_cases.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a019cb24b0e48dbf7194550595ab83544848c745e064b25201bb6bf2d16bd985
description: Some commission expense scenarios in Salesforce Spiff require some creativity and workarounds.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Special Commission Expense Cases in Salesforce Spiff

Some commission expense scenarios in Salesforce Spiff require some creativity and workarounds.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</td></tr></tbody></table>

## Long-Term

To handle commission expenses for periods that are longer than 12 months, create a separate portfolio for the long-term portion, based on the original portfolio. The differences between the original and long-term portfolio are the amounts to expense and the end dates.

### Average Duration

Start with an original portfolio, New Bookings Commission, where the commission amounts are amortized over 36 months using this Commission Values rule.

```
if(ProductName = "Services", 0, obligation.amount)
```

![Example of an original portfolio with an Average Duration for a 36-month amortization period](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_expense_long_term_average_duration_original.png)

To create a separate portfolio for handling long-term assets, create a separate portfolio with almost the same entries, but small changes.

![Example of a separate portfolio with an Average Duration, modified Commission Values rule, and 24-month amortization period](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_expense_long_term_average_duration_portfolio.png)

In the separate portfolio, the Commission Values rule (1) includes logic that calculates only the long-term amount to expense.

```
if(ProductName = "Services", 0, obligation.amount) * 24/36
```

The Amortization Period (2) also changes from 36 to 24 months to match the long-term allocation.

### Dynamic Duration

Add logic in the Additional Logic and End Date fields that accounts for the percent of assets that are long-term. We recommend that create a field in Designer that specifies the formula for this extra logic.

![Example of a portfolio with with a Dynamic Duration](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_expense_long_term_dynamic_duration.png)

For example, create a ContractLengthOpportunities calculated field that returns the number of months in a contract, and reference that calculated field in the the Commission Values rule (1).

```
if(ProductName = "Services", 0, obligation.amount) * (ContractLengthOpportunities - 12) / ContractLengthOpportunities
```

The amortization period ends 12 months earlier than the original portfolio, so the End Date (2) calculates the end of the adjusted contract length.

```
months_ago(end_of_month(ContractStartDate), -1 * (ContractLengthOpportunities, -12))
```

## Accrued

If you have payout rules that split earned commission and paid commission, you can reference those rules in a commission expense portfolio.

For example, maybe you have this payout rule for a rep who receives half of their commission when a deal closes and receives the remaining half after the invoice is paid.

```
Subscription_Commission_USD_FY24 * CommissionAdvanceRate_InitialPct + One_Time_Commission
```

This rule captures the total commission earned and represents the total amount to expense. Although the rule logic multiplies this amount by a percent that represents the 50% amount they're paid in the period, you have a calculated value for the total commission that you can reference in a portfolio.