---
schema_version: "1"
id: 226d254e0e4586ef056c13b0ff9cc1bc147a1d147a61ccbdab3c7c2a09c5c51c
title: Quarterly Payout Rule Examples
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_rules_quarter.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_rules_quarter.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d49d8afef7b946c8358d23242ac9fb4f68c1a903f4bb577e378093040b43bb2a
description: Sometimes you want to pay commission to an employee but only at a certain time, such as at the end of a quarter. If you have monthly statement periods, you can use Salesforce Spiff date functions to pay out at a time you choose.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Quarterly Payout Rule Examples

Sometimes you want to pay commission to an employee but only at a certain time, such as at the end of a quarter. If you have monthly statement periods, you can use Salesforce Spiff date functions to pay out at a time you choose.

### 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>

## Dynamic Dates

The `end_of_quarter()` function returns the last day of the quarter for a hard-coded date. For example, if you pass February 5 as the date to this function, the return value is March 31.

Instead of a hard-coded date, we recommend using dynamic dates, such as the end date of a statement period.

```
=end_of_quarter(statement_period.end_of_date)
```

With a dynamic date, the function continues to work regardless of the specific period being calculated. For example, a statement period of April returns an end of quarter date of June 30. You can avoid updating your logic every quarter.

## Calculating End of Quarter

A summary calculation on a worksheet determines whether the current statement period is the last period of the quarter.

```
=statement_period.end_date = end_of_quarter(statement_period.end_date)
```

If the statement period is March, June, September, and December, the summary calculation returns `true`. Otherwise, the summary calculation returns `false`.

To make sure that the rule pays out only at the end of a quarter, add an `if` statement in the calculation. The rule results in any commission being multiplied by zero unless it is the last period of the quarter. The TotalDealAmountInPeriod still gets calculated, but commission gets paid only when you want it to.

```
=if(IsEndOfQuarter, 1, 0) * TotalDealAmountInPeriod * 10%
```

Or, structure the rule where the first argument of the `if` function determines whether the current statement period end date matches the end of the quarter. In ‌periods where the argument is `true`, the rule pays out the commission you define in your payout variable. In ‌periods where the argument is `false`, the rule pays out zero. The BonusPayout gets calculated only for the end-of-quarter months, and reps can’t trace through the calculation unless it is the last month of the quarter.

```
=if(IsEndOfQuarter, TotalDealAmountInPeriod * 10%, 0)
```