Skip to main content

Compensation Rules

Compensation rules allow you to assign recurring compensation to multiple employees within a payroll territory.

Creating a Basic Compensation Rule

In this example, we will create a compensation rule to give all employees in the Germany payroll territory a bonus for the last quarter of the year.

You can create a compensation rule by opening the relevant Payroll Territory in flair, selecting the Compensation Rules tab, and clicking New.

Create new compensation rule

Alternatively, you can search Compensation Rules in the App Launcher 𓃑 and click the New button.

Give your compensation rule a name so you can easily identify it. The Start Date and End Date determine the length of time for which the rule will apply. The Recurring Period in Months field defines how often the rule will be applied: type in 1 for monthly, 2 for every two months, and so on. Entering a 0 into this field will apply the compensation rule to every payroll run, regardless of frequency.

info

If you leave the Payroll Territory field blank, the compensation rule will be applied to all employees who are not assigned to a payroll territory.

For a basic rule that applies the same additional compensation to every employee, use the Amount field. In the below example, all employees in the Germany Payroll Territory will receive a €500 bonus each month from October to December.

Fill in the fields for a basic compensation rule

Once you click Save, the compensation rule will be applied to every employee within the chosen payroll territory for the period defined.

info

Compensation rules are automatically applied to employees when they are assigned to a payroll territory (for example when a new employee joins or an existing employee changes payroll territory).

You can check that the compensation was added by opening the current payroll run or by viewing the "Employee Recurring Compensation – Rules" section of an employee record.

info

If you change the payroll territory defined in a compensation rule, future compensations will be deleted and new compensations will be created for the new territory. If you delete the rule, all related compensations will be deleted except for line items in payroll runs that are already locked or completed.

Dynamic Compensation Rule Based on Employee Data

An employee compensation rule (EC rule) is a dynamic compensation rule with an amount that varies based on employee data (years of service, performance ratings, etc.) or employee rates (salary, hourly rates, etc.).

Start by creating a compensation rule using the steps shown above. Instead of the Amount field, dynamic compensation rules use the fields in the Dynamic Formula section. In this example, we will create a compensation rule that increases compensation based on how many years an employee has worked for the organization.

Use the Dynamic Formula fields to create a dynamic compensation rule

To create a dynamic formula, go to Salesforce Setup and open the Object Manager. Use Quick Find to search for the Employee Recurring Compensation object. Select Fields & Relationships from the left menu panel and click New.

Open Fields and Relationships for the Employee Recurring Compensation object

Now select Formula and click Next.

Create a new formula field

Enter a Field Label. In this example, we will label the field "Years of Service Bonus". Now set the Formula Return Type to Currency and click Next.

Set the Formula Return Type to Currency.

Now you can define any formula that you need to be used later in compensation rules.

To create a formula for a years of service bonus, we will select the Advanced Formula tab and click Insert Field. First, select Employee Recurring Compensation > and then Employee > to see a range of fields related to employee records. For this example, we will choose Years of Service. Once you have chosen a field, click Insert.

Choose the fields to insert into your formula

The Insert Operator dropdown allows you to choose what to do with the number years of service. You can select an operator from the list or type the formula yourself. In this formula, we will multiply the years of service by 10 to calculate the bonus for each employee.

Enter your formula using fields and operators.

Once you have created your formula, click Next. You can skip Step 4 by clicking Next again. Finally, click Save.

Your formula will now appear in the Fields & Relationships list. You can use Quick Find to search for it. Copy the the Field Name so you can use this in your compensation rule.

Copy the Field Name of your newly created formula

Now return to the compensation rule you were creating. Paste the Field Name you just copied into the Amount Formula field. Enter flair__Employee_Additional_Compensation__c into the Base Object API Name field. For the formula used in this example, you can leave the Rate Type set to None as it is not needed. Finally, click Save.

info

If no Rate Type is selected, the rule will apply to all employees within this Payroll Territory.

Enter the Base Object API Name and Amount Formula into your compensation rule to apply your newly created formula

Now, your compensation rule will be applied. If you want to check that it is working properly, open the compensation rule and select the Related tab. In the Amount column, you can see the various bonus amounts calculated for each employee.

Select the Related tab to view the newly calculated compensation amounts

Dynamic Compensation Rule Based on Employee Salary

In this example, we will create a compensation rule that multiplies the years of service by 1% of the employee's salary.

To create a dynamic compensation rule based on employee salary, you must first create an Employee Rate for each employee that will receive the compensation.

To do this, open the employee record, select the Salary tab, and click New in the Employee Rates box.

Create a new employee rate

Enter an Employee Rate Name and set the Rate Type to Salary. The Amount should be the same as the employee's salary. Then click Save.

Create a new employee rate

Now, we can create a new formula using the steps defined above in the "Dynamic Compensation Rule Based on Employee Data" section. Or we can edit the formula that we already created.

Instead of multiplying the years of service by 10, we will multiply it by 1% of the employee's salary. So first, we add the field flair__Employee1__r.flair__Years_of_Service__c. Then, click Insert Field and select Employee Recurring Compensation > Reference Employee Rate > Amount. To get 1% of the salary, we can multiply the reference rate by 0.01 by adding *0.01 to the formula. So the formula will be flair__Employee1__r.flair__Years_of_Service__c * flair__Reference_Employee_Rate__r.flair__Amount__c *0.01. Then click Save.

Enter your formula and click save

info

If you edited an existing formula, you will need to recalculate the compensations to apply the new formula. To do this, open the Compensation Rule and click the Recalculate Compensation button in the top right.

If you edit an existing formula, you must recalculate compensations for the formula to take effect

Finally, make sure that the Rate Type in the compensation rule is set to Salary.

Set the correct Rate Type

Payroll Run Rules

Payroll run rules allow you to add compensations to an employee payroll run dynamically based on data related to a specific payroll run, such as working hours, overtime hours, or public holiday hours. In this example, we will create a payroll run rule for public holiday hours.

To start, create a compensation rule as described above. Enter a name, Start Data, and Recurring Period in Months. For Recurring Period in Months, we will enter 0 so that the rule is applied to every payroll run.

Create a new payroll run rule

Now in the Dynamic Formula section, the Base Entity API Name should be filled with flair__Employee_Payroll_Run_Line_Item__c. Select Public Holiday Hours in the Rate Type dropdown.

Set the Base Object API Name and Rate Type

Now go to Salesforce Setup and open the Object Manager. Use the Quick Find field to search for the Employee Payroll Run Line Item object. Click on the object, select Fields & Relationships from the left menu pane, and search for Public Holidays Compensation. This is a formula used to calculate public holiday hours compensation.

Copy the Field Name and go back to the compensation rule you were creating. Now paste the field name into the Amount Formula field. Then click Save.

Copy the Field Name

Paste the field name in the Amount Formula field

info

Please note that the employee recurring compensation amount will initially appear as 0. This is because the employee's hours are needed to calculate the compensation. The amount will be calculated once the payroll run is created.

The last step is to create Employee Rates for all employees who should receive this compensation. To do this, go to the Salary tab in the employee record, scroll down to Employee Rates, and click New. Give the rate a name, select the appropriate Rate Type (in this example Public Holiday Hours), and define an Amount. For the Rate Types "Public Holiday Hours", "Overtime Hours", and "Standard Hours", the Amount refers to the hourly rate of compensation the employee should receive. In the below example, Adamaris Vinke will receive €30 per hour worked on a public holiday.

Create a new employee rate

Adding Deductions to a Payroll Run

Deductions can be added to a payroll run in several ways:

Directly in the Payroll Run

  1. Open the payroll run and click on an employee's name.
  2. Click Add New Compensation.
  3. Enter a negative amount (e.g., -100) for the deduction.
  4. Add a description and save.

Negative amounts appear in the Deductions column of the payroll run.

Via Employee Salary Screen

You can set up recurring or one-time deductions from the employee's salary record:

  • Employee Recurring Compensation: For regular deductions (e.g., monthly loan repayments). Navigate to the employee's Salary tab and add a recurring compensation with a negative amount.
  • Employee One-time Compensation: For one-off deductions. Add a one-time compensation entry with a negative amount.

Via API

For automated deduction processing:

  1. Change the payroll run status to Submitted (this locks the run).
  2. Assign the custom permission for payroll API access to your integration user.
  3. Use the API to add compensation line items with negative amounts.

Summary of Compensation and Deduction Methods

MethodUse Case
Employee Recurring CompensationRegular monthly deductions
Employee One-time CompensationOne-off deductions for a specific period
Payroll Run Line ItemAd-hoc deductions added directly to a payroll run
Compensation RulesRule-based deductions applied to multiple employees