Manage payroll data and documents
Set up the territory and period for payroll data, then control Payroll Run stages and documents in Salesforce.
Who can use this?
HR Admins and payroll teams in the flair HR app in Salesforce. Salesforce Admin access is required to change State picklist values or use Developer Console.
Create a Payroll Territory
- In the flair HR app, open HR Admin → Payroll Territories.
- Click New.
- Enter the territory name, country, and currency.
- Click Save.
- Open the territory and add its employees. Only assigned employees appear in Payroll Runs for that territory.

note
If an employee is missing from a Payroll Run, confirm that the employee belongs to the selected Payroll Territory.
Create a Payroll Run
- In the flair HR app, open Payroll Runs.
- Click New.
- Enter Name, Start Date, and End Date.
- Select Payroll Territory.
- Click Save.
- Click Add Employees, then select employees from the territory.

Payroll Runs use these default stages:
| Stage | What it means |
|---|---|
| Draft | You can add or remove employees and change data. |
| Pending Approval | The run is ready for review and approval. |
| Submitted | The run is approved, submitted, and locked for processing. |
| Completed | Payroll processing is finished. |
Add a Payroll Run stage
- In Salesforce Setup, open Object Manager.
- Search for
Payroll Run, then open Payroll Run. - Open Fields & Relationships → State.
- Under Values, click New.
- Enter the stage name, then click Save.
- Optional: Click Reorder, then use Up, Down, Top, or Bottom to position the stage.
- To lock data in this stage, click Edit next to the value.
- Add
_lockedto the value's API name, then click Save.
The Completed stage is locked by default. For API deductions, use a locked stage named Submitted.

Reverse a completed Payroll Run
Clearing flair__Completed_At2__c returns a completed run to Pending Approval.
Use Salesforce Inspector
- Install the Salesforce Inspector browser extension.
- Open the Payroll Run.
- From Salesforce Inspector, click Show All Data.
- Find Completed At (
flair__Completed_At2__c). - Clear the field value, then click Save.
- Return to the Payroll Run. The run can move back to Pending Approval.

Use Developer Console
- From Salesforce settings, open Developer Console.
- Open Query Editor.
- Enter
SELECT Id, Name, flair__Completed_At2__c FROM flair__Payroll_Run__c. - Click Execute.
- Find the Payroll Run and clear its Completed At value.
- Save the change, then close Developer Console.
- Return to the Payroll Run. The run can move back to Pending Approval.

Generate payroll documents
- In Payroll Runs, open the run.
- Open Documents on the right.
- Click Generate.
- Select the required document type, including payslips when configured.
- Complete the generation action. The documents appear on the Payroll Run.
Configure documents for data export
- In the flair HR app, open HR Admin → Payroll Territories.
- Open the territory.
- Open Data Export.
- Add or remove the documents included in Payroll Runs for this territory.
- Save the configuration.
In a Payroll Run, select employees to create payment summaries or payslips. You can also upload other documents and include them in the generated files.