Xero Payroll Guide: Add two tracking categories in employee salary & timesheet Chintan Prajapati August 22, 2024 6 min read Do you use Xero for your payroll management, and have you encountered any restrictions with tracking categories?If so, this article is right for you because I will cover the entire problem and provide multiple solutions to overcome the limitations.Problem: Xero’s Payroll Tracking LimitationsWhen consulting business owners for Xero integration, I found that timesheets can only have one tracking category, which is problematic for payroll administrators needing detailed tracking.Isn’t it a strange limitation?Rather than worrying about why a major company like Xero would enforce such a limit, let’s understand the problem and derive solutions to it.I am hoping that someday xero will make this enhancement to its core product. until then you can keep using this workaround to have multiple tracking categoriesHere is some proof of other customers having similar problems reported in Xero Central.Xero central discussions under payroll & employeesA Xero product idea to assign multiple tracking categories to employees has received 8 upvotes as of July 2024(https://central.xero.com/s/question/0D53m00007ERyhUCAT/can-i-split-an-employees-salary-across-two-tracking-categories)According to [Xero’s official documentation](https://central.xero.com/s/article/Payroll-tracking-in-Xero), payroll tracking currently allows the assignment of only 1 employee group and 1 tracking category.In this, the client must assign both tracking categories in pay run/timesheet transactions.This basic limitation in Xero has many reports in the Xero business community (Xero central) and product idea requests, showing it is a common concern among users.Let’s Investigate in Xero Tracking CategoriesXero is powerful accounting software suitable for Small and Medium Businesses, allowing accountants to track transactions with features called tracking categories.To find out if payroll tracking categories are limitations?Technically, Xero allows you to create any number of tracking categories. However, Xero allows only 2 active tracking categories to be used within all transaction pages, including quotes, invoices, payments, bills, bill payments, and manual journals.However, Xero doesn’t provide the same coverage of two tracking categories in payroll modules like payroll settings, timesheets, and pay runs.Below is the ProofConfiguring Default Timesheet Category in Xero Payroll SettingsTo configure a default timesheet category in Xero Payroll Settings, follow these steps: Log in to Xero: Enter your credentials and access your Xero account. Navigate to Payroll Settings: Click on the “Payroll” tab in the main menu. Open Payroll Settings: Select “Payroll Settings” from the dropdown menu. Configure Default Timesheet Category: In the Payroll Settings page, locate the section for configuring the default timesheet category and set your preferred tracking category.Configure timesheet categories for payroll tracking. Payroll settings are showing only one tracking category selection, notice that Xero doesn’t show two tracking categories for payroll tracking configuration.Demonstrating Tracking Category Limitations in Xero PayrollTo illustrate the limitations of tracking categories in Xero Payroll, let’s go through the following steps:let’s select one tracking category for the department in the Timesheet Categories select box.Now let’s add a time log for one of the employees, Notice that the screenshot below it shows only one select box of tracking category.These screens prove that only 1 tracking category selection is allowed for posting timesheets in Xero.In contrast, Xero invoice transactions support two tracking categories, highlighting the difference in functionality between payroll and transaction modules. Bill Transactions: Xero allows two tracking categories. Quote Transactions: Xero supports two tracking categories. Expense Receipt Transactions: Xero supports two tracking categories.This highlights the difference in functionality between the payroll module and other transaction modules in Xero.Same way Xero bill transaction has support for two tracking categoryXero Quote transaction has two tracking categories supportedXero expense receipt transaction has two tracking categories supported.Solution for Managing Two Tracking Categories in Xero PayrollWhen Xero creates a pay run for an employee’s timesheets, which has only one tracking category, it generates a journal entry behind the scenes for the pay run.Let’s understand this with an example of Alex Martin’s timesheet.Below is a fictitious timesheet for Alex for one week. Note that one department has been assigned:Let’s process a pay run in Xero for 1 employee for 1 weekPost the Pay Run: Once you post the pay run in Xero, you can view it in the “pay run journal” report. This report shows the account, description, debit, and credit entries.We can retrieve this pay-run journal original data using Xero API and then repost the same data as a “manual journal with two tracking categories”.Below is an example of a manual journal showing the same account, description, debits, and credits, but with two tracking categories: department and client.This approach allows you to bypass the limitation of only one tracking category in the payroll module, ensuring comprehensive tracking and reporting.Also Read: Bank Revaluation in XEROHigh-Level Technical Solution for Managing Tracking Categories in Xero PayrollTo develop a technical solution for managing tracking categories in Xero Payroll, follow these high-level steps: Retrieve Last Pay Run Data using Xero API Copy and Modify Pay Run Line Items: Copy all pay run line items. Add these items to a new manual journal. Assign a second tracking category to each line item. Post New Manual Journal: Delete Original Pay Run:Multiple approaches can be used to achieve this solution: SaaS Integration Tool – Make.com: Use Make.com to automate the process of retrieving, modifying, and reposting pay run data. SaaS Integration Tool – Zapier: Use Zapier to create automated workflows that handle the retrieval and reposting of payroll journals with multiple tracking categories. Xero Custom Solution: Develop a custom solution tailored to your specific needs to manage payroll journals and handle multiple tracking categories effectively. By following these steps and considering the various approaches, you can efficiently manage and report payroll data with the desired tracking categories in Xero.Solution 1: Make.comLet’s look at the feasibility of using the SaaS integration tool Make.comAssuming you already have a make.com account, you create a scenario with a custom Xero connection.While creating a new connection, make.com shows that it has the capability for access to pay runs, and timesheets within the scope selectionBut when you search for the entity in make.com with the word “pay” I can’t find any entity showing the ability to retrieve pay runs.Documentation Review: After reviewing Make.com’s documentation (https://www.make.com/en/help/app/xero), it’s clear that it does not support the Payroll API.Due to these limitations, Make.com cannot be used to solve this problem quickly. As a result, it is not a viable option for this particular solution.Solution 2: ZapierLet’s try the first AI copilot in Zapier, it’s in beta as of now.It seems the copilot understands what I need, but is not able to translate that understanding to correct zap.Let’s skip Copilot and create Zap manually,But as shown in the screenshot below, there is no event available for pay-run data reading.API Limitations: The key reason for this limitation is that Xero has multiple APIs available based on usage. The most common API is the Accounting API, whereas the Pay run endpoint falls under the Payroll API.Neither Zapier nor Make.com supports the Payroll API.Additionally, the Payroll API is only available for Australia, New Zealand, and the United Kingdom. It is not available in other countries like Canada, the USA, etc.Solution 3: Custom Xero IntegrationTo develop a custom Xero integration with the Xero Payroll API, the following API endpoints can be used Retrieve Pay Runs: Use the Xero Payroll API to retrieve pay runs via the GET API: GET Pay Runs(https://developer.xero.com/documentation/api/payrollau/payruns#get-payruns) Alternatively, you can scan through the Journal report within a specific account to get all pay-run journals using the GET Journals API(https://developer.xero.com/documentation/api/accounting/journals#get-journals). Create Rules in Xero Spreadsheet: Develop a spreadsheet where rules are defined to assign a second tracking category. This can be based on the first tracking category, employee, or employee group. Payroll Automation with Custom App: Develop a custom Xero app that uses the rules defined in the spreadsheet. This app will automate the process of recreating journals with the second tracking category and posting them based on the rules spreadsheet, a Xero custom app can do automation to recreate journals and post them. at the moment delete API for the pay run is not available so, deletion of the pay run has to be done manually.By following these steps, you can efficiently manage and automate payroll journal entries with multiple tracking categories in Xero.Conclusion on adding two tracking categories in XEROUntil Xero adds the feature of supporting two tracking categories in payroll. The best way to move forward is to develop a custom solution that recreates the manual journal for each pay run because make.com and Zapier both don’t support the payroll API endpoints.Writing custom functions in both integration tools would be more complex and time-consuming. So creating a custom Xero app for handling this would be the best option which gives flexibility, scalability, and control.Have you faced a similar issue? How did you fix it? Let us know via email!