PS0 is also deadheading crew.
PS5 for employees/crew going to or returning from training.
IT is by status: ie SA3 for employee vs SA4 for employee dependent.
Then it goes by hire year. So you would see SA3P98 for an employee hired in 1998. If two or more people are same hire year then it is by check in time. If family travels together then they all go by highest boarding priority. Vacation passes puts the person to the top of their class and shows like SA3V98.
So you could have boarding order:
SA3V08
SA3P83
SA4V05
SA4P98