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
Available in: both Salesforce Classic (not available in all orgs) and Lightning
Experience
Available in: Enterprise, Unlimited, and Developer
Editions
Available for an additional cost in: Professional Edition with Web
Services API Enabled
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.
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.
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.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.