TM Employee Syncronization API

Introduction

The Remoting Web Service is a larger service that consists of many different functions that allow Customers to integration with the System on different levels.
This documentation focuses on the functions used for batch synchronization of employees through Remoting Web Service. These functions allow the Customers to pull out a subset of employees from their directory service, and send them to HR Manager as employees of the System. Using these functions, the Customers gain following major benefits:

  • They can create automated rules for their employees’ access to the System.
  • New employees joining the organization automatically get access to HRMTS System.
  • Employees leaving the organization automatically loose access to the System.
  • Change of employees’ roles in the organization automatically reflect in the System.
  • Transparent management of Single Sign-On configuration for employees.


API Functions

Following is a brief overview of the API functions used in synchronization of employees. Synchronization of employees is handled asynchronously in the System. It means that there is one API function to submit the request, and another one to get the status of the request.


Batch synchronize employees

Use the API function BatchSyncEmployees to submit a request to synchronize employees.

Request

The request object, BatchSyncEmployeeRqt, requires following properties in addition to the general requirements of requests made to Remoting Web Services.

PropertyTypeDescription
SendSignInInfoToNewEmployeesBooleanFlag to indicate whether an email should be sent to newly created employee containing sign-in link, sign-in id and password.
NewEmployeesMustChange PasswordOnFirstSignInBooleanFlag to indicate whether new employees must change password the first time they sign into the system.
PlaceEmployeeOnRootIfAcce ssDepartmentDoesNot
Exist
BooleanFlag to indicate that if employee's primary access department does not exist, then place the employee on root department. When it happens, the employee get account is automatically locked.
DoNotDeleteUnlistedSynchronizedEmployeesBooleanFlag to indicate whether previously synchronized employees, that are not listed in current request, should be deleted or not.
AutoCreateJobTitlesBooleanFlag to indicate whether Job Titles should be created automatically when it does not exists in the DDList. The auto-creation will only work if the customer is using 'ThirdpartyId' for JobTitle.
See: JobTitleId
EmployeeListList of EmployeesList of employees to synchronize.
The list must contain at least one valid employee.

Employee

The Employee object consists of many properties that represent a employee in the System. Following are the properties required for the synchronization.

PropertyTypeDescription
IdRemotable id of type IntegerId of the employee.
In case of new employees, the Id-part must be empty, but a unique ThirdPartyId-part can be supplied.
In case of existing employees, either the Id-part or the ThirdPartyId-part must be supplied.
UsernameStringEmail address of the employee.
Must be unique for each employee.
FirstNameStringFirst name of the employee.
LastNameStringLast name of the employee.
Details.
ThirdPartyUsername
StringLogin id of the employee in Customer’s network.
This property is only required if Single Sign-On is in use.
DetailsEmployeeDetailsDetails of the employee.


EmployeeDetails

The EmployeeDetails object consists of many properties that represent details of a employee in the System. Following are the properties required for the synchronization.

PropertyTypeDescription
ThirdPartyUsernameStringLogin id of the employee in Customer’s network.
This property is only required if Single Sign-On is in use.
AddressString
Address2String
ZipString
CityString
CountryString
NationalityString
GenderEnumValid values:
Male, Female, Other
BirthDateNullable<DateTime>
AnniversaryDateNullable<DateTime>
PersonIdString
AlternateEmailString
PhonePrivateString
PhoneMobileString
PhoneFaxString
PhoneWorkString
PhonePrivateCountryCodeString
PhoneMobileCountryCodeString
PhoneWorkCountryCodeString
EmploymentIdString
EmploymentDateNullable<DateTime>
WorkTimeStartint
WorkTimeEndint
WorkPercentageint
WorkLocationstring
BankAccountNumberstring
MaritalStatusIdRemotableId<int>

JobTitleId

RemotableId<int>
JobTypeIdRemotableId<int>
NoticeTimeIdRemotableId<int>
EducationLevelIdRemotableId<int>
ProbationPeriodIdint
ParentEmployeeIdint
ParentEmployeeRemotableId<int>
CostCenterstring
StaffCategorystring
LastName2string
AvailabilityDateNullable<DateTime>
ResignationDateNullable<DateTime>Should not be used. Will be deprecated soon. (01.05.2021) 
'Lastworkingdate' should be used instead
(24.02.2021)
Salarystring
AppraisalImageFileNamestring
SeniorityDateNullable<DateTime>
ReasonForLeavingIdRemotableId<int>
FTEdouble
BankRegistrationNumberstring
LastWorkingDateNullable<DateTime>
EmploymentEndDateNullable<DateTime>
RelativeInfo1Emailstring
RelativeInfo1RelationIdRemotable<int>
RelativeInfo1Namestring
RelativeInfo1Phonestring
RelativeInfo2Emailstring
RelativeInfo2RelationIdRemotable<int>
RelativeInfo2Namestring
RelativeInfo2Phonestring
AccessLevelListList<UserAccessInfo>List of UserAccessInfo entries that define employee’s access and roles in different departments.
At least one AccessInfo entry must be supplied.
The first entry in the list servers as employees’ default access.
KeyInformationAnswerListList<EmployeeKeyInformationAnswer>





UserAccessInfo

The UserAcceessInfo object consists of two required properties.

PropertyTypeDescription
DepartmentIdStringRemotable id of an existing department where the user will have access.
UserRoleListList of
remotable id of type Integer
List of remotable ids of roles for the user in the specified department.
At least one existing role id must be supplied.



RemoteableId

xxxx

PropertyTypeDescription
Id<T>Internal, system-generated identifier
ThirdPartyIdstringCustomer generated  unique identifier




EmployeeKeyInformationAnswer

xxxx

PropertyTypeDescription
ParentQuestionIdint
QuestionIdint
QuestionGroupIdint
AnswerGroupIdint
CustomAnswerstring
DateTimeAnswerNullable<DateTime>
ParentAnswerOptionIdint
RowIdint
AnswerOptionsIdListList<int>













Response

The API function returns BatchSyncEmployeeRsp as result of the request. In addition to standard response from Remoting Web Service, it returns following properties:

PropertyTypeDescription
BatchSyncStatusTypeEnumeratorStatus of the request registration.

Get status of batch synchronize employees

The function to batch synchronize employees is an asynchronous function that only registers the synchronization request in an internal queue. The queue is processed once a day, usually after midnight. Use the API function GetBatchSyncEmployeesStatus to get status of the actual synchronization.

Request

The request object, GetBatchSyncEmployeesStatusRqt, requires following properties in addition to the general requirements of requests made to Remoting Web Services.

PropertyTypeDescription
InitialReferenceTokenStringThe reference token of the initial submission you are trying get the status of.

Response

The API function returns GetBatchSyncEmployeesStatusRsp as result of the request. In addition to standard response from Remoting Web Service, it returns following properties:

PropertyTypeDescription
InitialReferenceTokenStringThe reference token of the initial submission you are trying get the status of.
BatchSyncStatusTypeEnumeratorStatus of the request processing.
EntitySyncStatusListList of
BatchSyncEn
tityStatus
List of status for each synchronized entry.

BatchSyncEntityStatus

The BatchSyncEntityStatus object consists of two required properties.

PropertyTypeDescription
EntityIdRemotable id of type IntegerRemotable id of the entity being synchronized.
Upon successful synchronization, the id always contains System’s internal id assigned to the entity.
EntitySyncStatusTypeEnumeratorStatus of the entity synchronization.
DescriptionStringAny other relevant information.

Important to know

The following points are important to know in relation to synchronization. Familiarizing with them will help understanding what to expect from using the API functions.

Configuration

The Customer’s account in the System must be configured for use of Remoting Web Service.

Submitting Requests

  • The requests for synchronizations are processed once a day after midnight.
    • Submit the request for synchronizations before midnight.
    • Call the function to get the status of the submitted request after 08:00 the following morning.

Processing

Only the last submitted request is processed as long as it is registered without errors.

  • Each employee must have unique Id, Username, ThirdPartyId and ThirdPartyUsername.
  • For each employee in the request, if no matching employee exists in the System, then a new employee is created and marked synchronized.
  • For each employee in the list, if a matching employee exists in the System, then the existing employee is updated and marked synchronized.
    • If the employee was previously deleted or locked, then the employee is reactivated.
  • Existing employees in the System that are marked synchronized, but not present in the synchronization request, are marked deleted.
    • The employees are soft-deleted to maintain their history.