Employee : Create

Custom ID and web portal configuration

The TrackTik web application has settings for different ways of managing the Custom ID value of Employee records. The settings are here:

Settings → View All → [General Configurations] General → Employee Information

image-20230814-200003.png

Terminology

From the perspective of the web application, these terms are synonymous:

Employee ID ↔︎ UID ↔︎ Custom ID

But from the perspective of the TrackTik API, only these two fields/properties need to be known, and they should be treated separately when using the /employees endpoint:

employee.id
employee.customId

Allow TrackTik to Manage Employee IDs :YES

With this setting enabled, the Custom ID becomes managed by the web application. When new employees are created, the last number used for a Custom ID, procedurally generated by TrackTik or by manual entry before the setting was put to YES, will be incremented by +1.

Normally a Custom ID is an integration tool to have a shared ID to join the TrackTik platform with other systems to form a larger cloud-based ecosystem (typically via API integration). But if the TrackTik application is in its default mode of just owning this identifier for its own display purposes and vocabulary of “Employee ID” (that is not the database primary key), then it will be a number.

In a scenario where there is a mixture of alphanumeric or symbols containing Custom IDs, when creating a new employee while the setting is YES, then the system will scan all Custom IDs to find the largest non-leading 0s number and increment it.

The following is considered STRING/TEXT data and will NOT be considered for auto-incrementation:

  • Numbers with leading 0s, like 03568 or 000123485

  • Custom IDs that contain any alphanumeric variants, like abc123 or abc

  • Custom IDs with any special characters, like 123-456

  • Custom IDs that are longer than 15 characters (e.g. 123456733351234 will be incremented to 123456733351235, but 1234567333512345 will not be incremented to 1234567333512346)

Example

Using the Excel export tool in the top right corner of the employees list, the list of employees belonging to any region come with a column called “Uid”. This is synonymous with Custom ID. When you sort this list, you discover what is the highest non-padded, non comma delinieated, non alphanumeric or special characters containing numbers. In the screenshot below, this number is 12345673334.

ids_list.png

 

While the setting is YES if you create a new Employee, the next automatically generated and assigned Custom ID value will therefore be 12345673334.

A quick peek via API returns a response of:

{ "jobTitle": "", "region": 2, "employmentProfile": 364, "address": 1649, "id": 1446, "customId": "12345673335", "firstName": "UID test", "lastName": "(+1 sequencing)", "name": "UID test (+1 sequencing)", "primaryPhone": "", "secondaryPhone": "", "email": "", "status": "ACTIVE", "avatar": "https://innovation.staffr.net/rest/v1/avatar/employees/1446/c4c854f202946469f5bd57c57ad67bf7" }

 

If you try to use the API or web application UI to change the Employee ID/Uid/Custom ID, it won’t be persisted.

As of 2023-08-14 both the web application and API are missing a common validation for requests to change an Employee ID/Uid/Custom ID and may be give positive feedback even though it won’t persist to the database layer.

Allow TrackTik to Manage Employee IDs :NO

When this web portal setting is set to NO, then you are free to modify the Employee ID/Uuid/Custom ID among other differences.

Difference 1 : When a new employee is created, its Custom ID is populated from the database unique identifier.

E.g.

{ "jobTitle": "", "region": 2, "employmentProfile": 365, "address": 1650, ==> "id": 1447, ==> "customId": "1447", "firstName": "Employee Setting YES 1", "lastName": "(don't change)", "name": "Employee Setting YES 1 (don't change)", "primaryPhone": "", "secondaryPhone": "", "email": "", "status": "ACTIVE", "avatar": "https://innovation.staffr.net/rest/v1/avatar/employees/1447/5c8cbfdcee01c2983b9134dbeb31c738" }

Difference 2 : The Custom ID can be changed after the fact.

E.g.

[PATCH] /employees/1447e

With

{ "customId" : "1447-modified" }

Result

{ "jobTitle": "", "region": 2, "employmentProfile": 365, "address": 1650, "id": 1447, ==> "customId": "1447-modified", "firstName": "Employee Setting YES 1", "lastName": "(don't change)", "name": "Employee Setting YES 1 (don't change)", "primaryPhone": "", "secondaryPhone": "", "email": "", "status": "ACTIVE", "avatar": "https://innovation.staffr.net/rest/v1/avatar/employees/1447/5c8cbfdcee01c2983b9134dbeb31c738" }

 

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more