Creating a Rule That Only Pays Out at the End of A Quarter

Sometimes you want to commission an employee but only at a certain time, for example at the end of a quarter.  We can do this by taking advantage of several built-in properties associated with every statement in Spiff.   

The Statement Period Object which you can reference in any formula by writing "statement_period" has several useful custom functions.  One of these functions allows us to find the end of the current quarter from the date of the statement.

You can find this by writing "statement_period.end_of_current_quarter_date."  If Spiff is building a statement for the month of January and it finds a variable with this formula, it will return March.  If Spiff is building a statement for the month of February and it finds a variable with this formula, it will return March.  The same thing goes for March.  But in April, Spiff will return June, etc.

Example

So to create a rule that only pays out at the end of a quarter, we simply need to include this logic in the Rule:  

if(statement_period.end_date == statement_period.end_of_current_quarter_date, Payout, 0)


Did this help answer your question?

thumbs up
thumbs down

Thanks for the feedback! 🙏🏽