1

Most payroll systems have some sort of employee code that is unique to employees. I have been using the Employees endpoint to GET all employees in the Demo company and can see the EmployeeID field which appears to be a regular GUID. But when browsing the employee list through the Xero user interface it is not possible to see an employee's GUID like we can for Contacts or Invoices?

I actually just see a number like this... What is this number at the end of the URL?

https://payroll.xero.com/Employee?CID=!tkSD3#employees/12345678

Tommy Sharp
  • 65
  • 2
  • 8

1 Answers1

1

It looks like this has been an issue with Xero since 2015 that has still not been resolved!

https://community.xero.com/developer/discussion/12133203/

Tommy Sharp
  • 65
  • 2
  • 8
  • Hey @TommySharp, unfortunately this is still the case. What are you trying to achieve here? What's the use case? I can send that feedback to the team – RJaus Aug 29 '21 at 22:52
  • I have a client who needs to link their Xero employees to employee records in our system. All they can see in Xero is the 8 digit number... But in our system we need to know the GUID of the xero employee so we can post updates to Xero. – Tommy Sharp Aug 31 '21 at 03:20
  • Correct, the employee id is not accessible, only the GUID. In order to facilitate your use case you need to have a "setup" phase in your application which retrieves all employees, with their GUID, enabling you to push data to Xero. If the user is in Xero, and you want to push data to the employee they're looking at, you could leverage the combination of firstname, lastname & dob. But I'm still not quite clear on your use case. But it suggests to me that you'll need to manage the process from your own application, via the API. – RJaus Aug 31 '21 at 04:14
  • Yes, this is how we have had to manage it, we pull down ALL employees from Xero using the API and then in our application an employee can then be linked to a Xero employee. It's manual because linking on Name and DOB is not 100% accurate as there could be duplicates. – Tommy Sharp Sep 01 '21 at 01:19
  • For the ccounting side of Xero if you view an Invoice you can see the GUID in the browser address bar so it makes sense that payroll and looking at an employee record would be the same? – Tommy Sharp Sep 01 '21 at 01:19
  • Yea, you'd think that. But actually Accounting & AU Payroll are completely different applications, with two completely separate API's, but both are exposed through a unified gateway to external API users like yourself. I don't disagree with your premise, a unified GUID between the frontend app and backend API would be best. But knowing the architecture and roadmap, it's just not going to happen in the timeframe you need. That's just the way it is. This shouldn't be a roadblock to your use case tho, happy to work with you on that front. – RJaus Sep 01 '21 at 10:49