Create employee

You call this function when you want to create a new employee or update an existing.

The minimum to create a new employee would usually be these fields
  • sAPIKey
  • sEmployeeCode
  • sName
  • dtEmployedStartDate
  • sTemplateCode

You only need to specify the parameters you need to change on an update. So if you want to tell SmartTID that a specific employee is not employed anymore you can just pass these fields. 
  • sAPIKey
  • sEmployeeCode
  • dtEmployedEndDate
Then the integraton procedure in SmartTID will take care of the rest.

It's ok to pass all fields every time if thats the easiest way to handle in your system. We only update in SmartTID when the value for a field has changed


Field
SQL Type
Comment
sAPIKey
VARCHAR(64)
Unique key for each SmartTID customer
sEmployeeCode
NVARCHAR(20)
The number of the employee. Can be letters and/or numbers like A360. Use the same value as in payroll system if possible
sName
NVARCHAR(50)

sAddress
NVARCHAR(50)

sZipCode
NVARCHAR(20)

sCity
NVARCHAR(50)

sCellPhone
NVARCHAR(50)

sEmail
NVARCHAR(50)

sCPRNo
NVARCHAR(20)
We only se the first 6 charaters in our event system too notify on certain birthdays.
sDepartmentCode
NVARCHAR(20)
If the department does not exists it's created
sDepartmentName
NVARCHAR(50)
If the department does not exists it's create with sDepartmentCode and this name
sWorkCalendarCode
NVARCHAR(20)
Can be passed but is most often taken from the (see sTemplateCode)
sWorkFunctionCode
NVARCHAR(20)
If the work function does not exists it's created
sWorkFunctionName
NVARCHAR(50)
If the work function does not exists it's create with sWorkFunctionCode and this name
sPayrollTypeCode
NVARCHAR(20)
If the payroll type does not exists it's created
sPayrollTypeName
NVARCHAR(50)
If the work payroll type does not exists it's create with sPayrollTypeCode and this name
sJournalCode
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sJournalName
NVARCHAR(50)
If the journal does not exists it's created with sJournalCode and this name
sEmployedStartDate
NVARCHAR(20)
Start date of employement as a string in format dd-mm-yyyy
sEmployedEndDate
NVARCHAR(20)
End date of employement as a string in format dd-mm-yyyy
dtEmployedStartDate
DATETIME
Start date of employement - use either this or sEmployedStartDate
dtEmployedEndDate
DATETIME
End date of employement - use either this or sEmployedEndDate
sTeamleaderCode
NVARCHAR(20)
Number of another employee which is team leader
bActive
BIT
Default set to 1 (True) but can be changed to 0 (False) if employee should not be created in journal automatic every day
sEmployeeCode2
NVARCHAR(20)
Can be used to integrate to payroll system if sEmployeeCode must be another number due to integraton to ERP systems
sGroundsForTerminationCode
NVARCHAR(20)

sDistrictCode
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sEmployeeGroupCode
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sProfileCode
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sOldEmployeeCode
NVARCHAR(20)
If you need to rename an employee you can pass this code to tell SmartTID which employee to rename to sEmployeeCode in stead off creating a new
sSystemID
NVARCHAR(30)
Used by SmartTID Panel to identify the user - is the login from the PC/domain - like smarttid\pc
sTAG
NVARCHAR(20)
Identification number in employee chip, card, barcode etc.
sTemplateCode
NVARCHAR(20)
When using templates you simplify the process to create an employee. It can hold informations like
sDistrictCode
sDepartmentCode
sEmployeeGroupCode
sJournalCode
sWorkCalendarCode
sPayrollTypeCode
sWorkFunctionCode
sProfileCode
sDimensionCode1
sDimensionCode2
sDimensionCode3
sDimensionCode4
sDimensionCode5
sDimensionCode1
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sDimensionCode2
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sDimensionCode3
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sDimensionCode4
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
sDimensionCode5
NVARCHAR(20)
Can be passed but is most often taken from the template (see sTemplateCode)
bTransferToPayroll
BIT
Default set to 1 (True) but can be changed to 0 (False) if employee registrations should not sent to payroll system


Rev 02, Poul Christensen, 29-03-2019 

From database version 6.01.01