Categorize and map payroll components
In order for your customers to be able to represent their payroll costs appropriately in their accounting software, they will first need to do some initial configuration.
Typically each company will want to set:
- Which bank account payments are made from
- Which expense account each payroll component corresponds with
- Any additional mapping for things like departments and locations
SMB Has accounting platform
Client Has payroll components list Has departments, locations,
Select the account payroll payments will be made from
The payment account is a bank account from which payroll payments can be dispersed from to employees bank accounts.
A list of the available options in the company's accounting platform can be retrieved from the bankAccounts endpoint:
Map payroll components to relevant accounts
Each company will have different preferences for how they want to record their employees payroll costs, pensions, and taxes against various nominal accounts.
You will have in your system some list of payroll components that constitute the different parts of a company's payroll. For example:
const payrollComponents = [
name: "Performance bonuses"
You should provide your customer with a flexible interface to enable companies to handle the nuances of how they want to reconcile their data. Mapping could be as complex or granular as suits your usecase.
Get the accounts
You can use the chartOfAccounts to populate this interface with the
name representing what the account is called in their accounting software.
Query parameters can also be used to narrow the list of accounts you want to retrieve:
status=Activereturns only active accounts
type=Expensereturns accounts that are used for recording as business expenses
You'll need to build an interface that lists all the payroll components of your system, and allows the user to set which account in their accounting platform it corresponds to.
Example mapping UI
Map your payroll components to a relevant account.
Map tracking categories
Businesses may want additional categorization for their payroll expenses. For example they might want to group it by department (e.g. sales and marketing) or location.
You will have in your system some list of the additional things you want to track. For example:
const categories = [
name: "Department - Sales"
name: "Department - Marketing"
name: "Location - US"
name: "Location - UK"
Tracking categories can be used to retrieve departments, locations and projects for each company.