Integration of BC and HRIS systems
Extension - SMART Payroll HRIS Integration Core (add-on to SMART Payroll)
The system provides the ability to set up integration between Business Central and Human Resource Information Systems (HRIS). Currently, API integration is implemented for the HiBob system; the description of the HiBob integration is provided in the scenario below. At the same time, the SMART Payroll HRIS Integration Core add-on allows processing information received from other systems and creating corresponding processes in Business Central, namely:
- Creating Persons, maintaining information on Person documents and addresses. Automatically creating entries in the Personal Information Codes and Causes of Absence directories
- Creating organizational structure, namely Organization Units, Job Titles, Positions
- Creating Employment Contracts and HR Operations, namely Labor Hire, Labor Transfer due to changes in job title, organization unit, FTE, salary, and Labor Dismiss of employees
- Maintaining information on employee bank accounts.
Step 1: Integration Setup
Path: HRIS Integration Setup
On the HRIS Integration Setup page you can configure the following parameters/processes that will be executed during integration with Human Resource Information Systems (HRIS).
Section General
| Field | Description |
|---|---|
| Service Type | Select the HRIS system with which the integration will work via API. Currently, API integration is implemented for the HiBob system. |
| Enabled | If enabled, integration between the systems will take place |
| Service API Url | Specify the API service URL with which the integration will work |
Section Templates
| Field | Description |
|---|---|
| Organization Unit Nos. | Specify the number series that will be assigned to Organization Units created during integration. This field is mandatory. |
| Template Organization Unit Code | Defines the organization unit that will be used as a template for Organization Units created during integration. If organization units should not be created automatically during integration, leave this field empty. |
| Match Org. Unit by field | Select the field number from the "Organization Unit" table by which to determine whether such an organization unit already exists in the system or is missing. For example, if the field value is "2" ("Name"), then during integration when creating a position for an employee and determining the organization unit code, the system will search the value from the HRIS Employee card's "Department" field in the list of organization units by the "Name" field. If no such value is found — it will either create a new one (if the "Template Organization Unit Code" field is filled), or produce an error during integration process execution. Note that the search is performed only on records with "Approved" status and that are not blocked. |
| Job Title Nos. | Specify the number series that will be assigned to Job Titles created during integration. This field is mandatory. |
| Template Job Title Card | Defines the job title that will be used as a template for Job Titles created during integration. If job titles should not be created automatically during integration, leave this field empty. |
| Match Job Title by field | Select the field number from the "Job Title" table by which to determine whether such a job title already exists in the system or is missing. Note that the search is performed only on records with "Approved" status and that are not blocked. |
| Firstly Validate Department for Position | By default, when creating a position, the organization unit code is validated first in the card, then the job title code. This means that if the Payroll Calculation Group Code and Payroll Posting Group are specified on the job title and organization unit cards, then with the standard validation sequence, the position card will be populated with values from the corresponding fields of the Job Title card. If this sequence needs to be overridden — validate the job title first, then the organization unit — set the "Firstly Validate Department for Position" field to Yes. |
| Person Address Nos. | Specify the number series that will be assigned to Person addresses created during integration. This field is mandatory. |
| Employee Bank Nos. | Specify the number series that will be assigned to employee bank accounts created during integration. This field is mandatory. |
Section Enabled Processes
In this section you can configure the processes that should be created in Business Central during integration with HRIS systems. The Create Person process always runs by default.
| Field | Description |
|---|---|
| Update Person | If set to "Yes", when Person information is updated in the HRIS system, a task to update Person information will be created in Business Central. |
| Labor Hire | If set to "Yes", tasks for hiring employees will be created in the system. |
| Labor Transfer | If set to "Yes", tasks for transferring employees due to changes in job title, organization unit, FTE, or salary will be created in the system. |
| Labor Dismiss | If set to "Yes", tasks for dismissing employees will be created in the system. |
| Adress Information | If set to "Yes", tasks for creating and updating Person addresses will be created in the system. |
| Bank Information | If set to "Yes", tasks for creating and updating employee bank accounts will be created in the system. |
| Person Document | If set to "Yes", tasks for creating and updating Person documents will be created in the system. |
Step 2: Setting Up Integration with HiBob
Extension - SMART Payroll Connector for HiBob (add-on to SMART Payroll)
Path: HRIS Integration Setup
To set up integration with the HiBob HRIS system, perform the following configuration steps.
-
On the HRIS Integration Setup page, on the Hibob tab, fill in the Hibob ApiUser Name and Hibob ApiUser Token fields (this service user data must be provided by the client).
-
On the HRIS Integration Setup page, on the General tab, in the Service Type field select HiBob and specify the Service API Url.
-
On the HRIS Integration Setup page, in the actions select Hibob tables, then on the opened page click: Actions - Import tables. During import, the system will create all tables (standard and custom) that exist in the client's HiBob system. For the created tables, you need to configure field mapping with the main table SMA HRIS Employee (71732322) in the system. HRIS Employee is a card where all information defined in the settings from the external HRIS system is recorded.
For each created table, you need to define the fields that will be transferred from the HiBob system and assign them fields from the SMA HRIS Employee (71732322) table where values should be recorded. Example of settings:
Note that for HiBob fields with the list type, it is mandatory to create and specify a Transformation Rule in the corresponding column of the HiBob table, because values in such list fields are maintained in separate list directories. You can view them from the HRIS Integration Setup page by selecting the Hibob lists action. List values are imported by executing the Import lists action on the Hibob lists page.
When creating a transformation rule, the following fields need to be filled in:
| Field | Description |
|---|---|
| Code | Transformation Rule code |
| Transformation Type | HiBob List Lookup. After specifying this type, you need to reopen the page so that the HiBob list field appears on the Transformation Rule card. |
| HiBob list | Select the list for the corresponding HiBob field. |
- During integration, you can set up employee import filters from the HiBob system to Business Central. To do this, in the People table at the bottom of the page, set the required filters in the Table Import Filters area. Filtering is set by values in the required HiBob fields:
| Field | Description |
|---|---|
| Id | The field Id in HiBob by which records should be filtered during integration |
| Comparison | Logical comparison operator. Available values: 1) Equal To 2) Not Equal To 3) Starting With 4) Ending With |
| Field Filter | Filter value |
Step 3: Using Position Templates
To be able to create and approve operations in Employment Contracts through integration with HRIS systems, you need to create position templates (path: Position Templates) and configure filters for position templates to ensure their correct selection when creating positions for a specific employee.
To do this, on the position template card in the HRIS Filters area, specify the parameters for determining position selection when creating operations in Employment Contracts. Filters can be set not only on the main SMA HRIS Employee (71732322) table but also on other tables that contain Person No. or Employee Code values.
| Field | Description |
|---|---|
| Table ID | The number of the table containing the field used for filters |
| Table Name | The name of the table containing the field used for filters |
| Field ID | The number of the field used for filters |
| Field Caption | The name of the field used for filters |
| Comparison | Logical comparison operator. Available values: 1) Equal To 2) Not Equal To 3) Less Than 4) More Than 5) Starting With 6) Ending With |
| Field Filter | Filter value |
Step 4: HRIS Employees
Information that, according to field mapping settings for the corresponding service, is transferred to Business Central from HRIS systems is stored in the HRIS Employee card (table SMA HRIS Employee (71732322)). The HRIS Employee card has the following fields:
Section General
| Field | Description |
|---|---|
| ID | Unique ID of the employee record in the HRIS system. |
| First Name | Employee's first name. Populated via field mapping for the corresponding service |
| Last Name | Employee's last name. Populated via field mapping for the corresponding service |
| Middle Name | Employee's middle name. Populated via field mapping for the corresponding service |
| State | Employee status. For employees who have a Termination Date filled in, the status is set to Terminated. For employees without a termination date, the status is set to Active. Note that all processes created during integration are created for employees with an empty "Termination Date" or with a termination date no earlier than the current month. |
| Full Name | Employee's full name. Populated via field mapping for the corresponding service |
| First Name (Second language) | Employee's first name in the second language. Populated via field mapping for the corresponding service |
| Last Name (Second language) | Employee's last name in the second language. Populated via field mapping for the corresponding service |
| Middle Name (Second language) | Employee's middle name in the second language. Populated via field mapping for the corresponding service |
| Full Name (Second language) | Employee's full name in the second language. Populated via field mapping for the corresponding service |
| Birth Date | Employee's date of birth. Populated via field mapping for the corresponding service |
| VAT Registration No | Employee's tax identification number. Populated via field mapping for the corresponding service |
| Mobile Phone | Employee's mobile phone. Populated via field mapping for the corresponding service |
| Phone No. | Employee's phone number. Populated via field mapping for the corresponding service |
| Employee's email. Populated via field mapping for the corresponding service | |
| Private Email | Employee's private email. Populated via field mapping for the corresponding service |
| Gender | Employee's gender. Populated via field mapping for the corresponding service |
| Family Status | Employee's family status. Populated via field mapping for the corresponding service and matched by the Name field in the Personal Information Codes directory of the "Family Status" group. If no such value is found in the personal information codes directory, the system will automatically create a new entry in the directory. |
| Nationality | Employee's nationality. Populated via field mapping for the corresponding service and matched by the Name field in the Personal Information Codes directory of the "Nationality" group. If no such value is found in the personal information codes directory, the system will automatically create a new entry in the directory. |
| Employee ID | Employee ID. Populated via field mapping for the corresponding service |
| Creation Date | Creation date. Populated via field mapping for the corresponding service |
Section Work
| Field | Description |
|---|---|
| Work Start Date | Work start date. Populated via field mapping for the corresponding service |
| Work Effective Date | Date of change in working conditions (job title, organization unit, FTE). Populated via field mapping for the corresponding service |
| Department | Employee's organization unit. Populated via field mapping for the corresponding service |
| Job Title | Employee's job title. Populated via field mapping for the corresponding service |
| Contract Type | Value from the "Employment Contracts" directory. The procedure for assigning values in this field should be determined individually for each client as needed. |
| FTE % | The FTE rate at which the employee works. Populated via field mapping for the corresponding service. If the field equals 0, then in all related processes the FTE will be populated with the value "1". |
| Salary Effective Date | Date of salary change. Populated via field mapping for the corresponding service |
| Base Salary | Employee's salary amount. Populated via field mapping for the corresponding service |
| Base Salary Currency Code | Employee's salary currency. Populated via field mapping for the corresponding service |
| Termination Date | Employee's termination date. Populated via field mapping for the corresponding service |
| Termination Reason | Employee's termination reason. Populated via field mapping for the corresponding service and matched by the Description field in the Causes of Absence directory. If no such value is found in the directory, the system will automatically create a new entry. |
| Person No. | Automatically populated with the Person code created for the given HRIS Employee. |
Section Bank
| Field | Description |
|---|---|
| Bank Name | Employee's bank name. Populated via field mapping for the corresponding service |
| IBAN | Employee's IBAN account details. Populated via field mapping for the corresponding service |
| SWIFT | Employee's SWIFT account details. Populated via field mapping for the corresponding service |
Section Address
Note, the address section contains information about the employee's registration address. The address with the registration type will then be created by default from the information in this section.
| Field | Description |
|---|---|
| Address Effective Date | The date from which the employee's registration address is effective. Populated via field mapping for the corresponding service |
| Address | Employee's registration address. Populated via field mapping for the corresponding service |
| City | Employee's registration city. Populated via field mapping for the corresponding service |
| Country Code | Employee's registration country. Populated via field mapping for the corresponding service |
| Post Code | Employee's registration address post code. Populated via field mapping for the corresponding service |
Section Document
| Field | Description |
|---|---|
| Document Type | Value from the "Identity Document Types" directory. Can be populated via field mapping for the corresponding service using transformation rules. |
| Document Valid Date | The date from which the employee's document is valid. Populated via field mapping for the corresponding service |
| Document Series | Employee's document series. Populated via field mapping for the corresponding service |
| Document No | Employee's document number. Populated via field mapping for the corresponding service |
| Document Issue Authority | The authority that issued the employee's document. Populated via field mapping for the corresponding service |
| Document Issue Date | The date the employee's document was issued. Populated via field mapping for the corresponding service |
On the HRIS Employees list page, the following actions are available:
| Action | Description |
|---|---|
| Import Employee Ids | Imports all record IDs from the HiBob system. During ID import, only the Termination Date is populated on the HRIS Employee cards and the status "Terminated" is set by default for all. After executing this action, you need to run the "Update fields from HRIS" or "Update all active employees" action. |
| Update fields from HRIS | Updates the information on the HRIS Employee card with data from the HRIS system only for the selected employee. At the moment of action execution, the status changes to "Active" for employees with an empty termination date. Data update is triggered only for employees with "Active" status, as well as those with "Terminated" status and a termination date in the current month. |
| Update all active employees | Updates the information on the HRIS Employee card with data from the HRIS system for all employees. At the moment of action execution, the status changes to "Active" for employees with an empty termination date. Data update is triggered only for employees with "Active" status, as well as those with "Terminated" status and a termination date in the current month. |
Step 5: HRIS Integration Processes
Processing information on the HRIS Employee card and subsequent creation of related processes in the Business Central system is done by creating and executing tasks on the HRIS Integration Process page.
The HRIS Integration Process page contains the following fields:
| Field | Description |
|---|---|
| HRIS ID | ID from the HRIS Employee card for which the task was created |
| Employee Full Name | Full name from the HRIS Employee card for which the task was created |
| Created DateTime | Date and time the task was created |
| Task Type | Task type |
| Status | Task execution status |
| Completed DateTime | Date and time the task was completed |
| Error Text | If an error occurs during task execution, its description is recorded in this field |
| Error Call Stack | Technical error information |
| Indentation | For the "Create Person" task this field equals 0. For other tasks = 1. |
The following actions are available on the page:
| Action | Description |
|---|---|
| Show related record | Opens the last record created in the system during task execution |
| Process records manualy | Clicking this triggers task execution |
| Complete manualy | Clicking this forcefully completes the task, transitioning it to "Completed" status without creating corresponding records in the system |
| Update all employees | Updates information on the HRIS Employee card with data from the HRIS system for all active employees. |
| Create tasks | Triggers task creation for all employees. |
| Delete Selected | Deletes selected records. Note, records can only be deleted if no Person has been created in the system for the HRIS Employee. |
When executing the Create tasks action, the following Task Types are created in HRIS Integration Processes. Note, tasks are created only for HRIS Employees with "Active" status, as well as those with "Terminated" status if the termination date falls in the current month or later.
| Task Type | Conditions for successful task creation |
|---|---|
| Create Person | No Person has been created for the HRIS Employee |
| Update Person | 1) The "Update Person" process is enabled on the "HRIS Integration Setup" page. 2) Information in one of the fields in the "General" section of the HRIS Employee card has been updated. 3) A Person exists in the system for the HRIS Employee. |
| Address Information | 1) The "Adress Information" process is enabled on the "HRIS Integration Setup" page. 2) Information in one of the fields in the "Address" section of the HRIS Employee card has been updated. 3) A Person exists in the system for the HRIS Employee. |
| Bank Information | 1) The "Bank Information" process is enabled on the "HRIS Integration Setup" page. 2) Information in one of the fields in the "Bank" section of the HRIS Employee card has been updated. 3) An employee has been created in the system for the HRIS Employee. |
| Person Document | 1) The "Person Document" process is enabled on the "HRIS Integration Setup" page. 2) Information in one of the fields in the "Document" section of the HRIS Employee card has been updated. 3) A Person exists in the system for the HRIS Employee. |
| Labor Hire | 1) The "Labor Hire" process is enabled on the "HRIS Integration Setup" page. 2) Required information is filled in the "Work" section of the HRIS Employee card. 3) A Person has been created in the system for the HRIS Employee. 4) No employee has been created for the HRIS Employee. |
| Labor Transfer | 1) The "Labor Transfer" process is enabled on the "HRIS Integration Setup" page. 2) Information in one of the following fields has been updated in the "Work" section of the HRIS Employee card: Department, Job Title, FTE %, Base Salary, Base Salary Currency Code. 3) An employee has been created in the system for the HRIS Employee. |
| Labor Dismiss | 1) The "Labor Dismiss" process is enabled on the "HRIS Integration Setup" page. 2) The Termination Date field is filled in the "Work" section of the HRIS Employee card. 3) An active (not dismissed) employee exists in the system for the HRIS Employee. |
After creating tasks, you need to run the Process records manualy action. During task execution, the following processes are created in the system:
| Task Type | Result of successful task execution |
|---|---|
| Create Person | Creates a Person card and populates all information contained in the "General" section of the HRIS Employee card. During the first Person creation, if the "Address" and "Document" sections are filled on the HRIS Employee card, an entry is created in the Person's addresses and Person's documents as part of this task execution. |
| Update Person | Updates information in the corresponding fields on the Person card, and if an employee has been created, on the Employee card as well. Note, when changing an employee's name, the name must be updated manually using the standard Change Name action on the Person card. After that, the task on the "HRIS Integration Process" page must be forcefully completed using the Complete manualy action. |
| Address Information | If no record with the same date as specified in the "Address Effective Date" field on the HRIS Employee card exists in the "Alternative Address List" table for the Person, a new address entry with the "Registration" type is created. If a record with that date already exists, the information in the existing record is updated. |
| Bank Information | If no record with the same IBAN as specified in the "IBAN" field on the HRIS Employee card exists in the "Employee Bank Account List" table for the Employee, a new bank account entry is created. If a record with that IBAN already exists, the information in the existing record is updated. |
| Person Document | If no record with the same date as specified in the "Document Valid Date" field and the same type as specified in the "Document Type" field on the HRIS Employee card exists in the "Identity Documents" table for the Person, a new document entry is created. If a record with those values already exists, the information in the existing record is updated. |
| Labor Hire | Creates an employment contract with a Start Date defined in the "Work Start Date" field on the HRIS Employee card; creates an Actual Position based on position templates and defined filters; if the required organization unit or job title is missing in the system, creates new ones based on templates and settings specified on the "HRIS Integration Setup" page; creates an operation in the employment contract with the "Labor Hire" type; creates Employment Contract Conditions; approves the Hire; creates and populates the Employee card. |
| Labor Transfer | Creates an operation in the employment contract with the "Labor Transfer" type, where the transfer date is determined by comparing the dates in the "Work Effective Date" and "Salary Effective Date" fields on the HRIS Employee card. The transfer date will be the later of these two dates; creates an Actual Position based on position templates and defined filters; if the required organization unit or job title is missing in the system, creates new ones based on templates and settings specified on the "HRIS Integration Setup" page; creates Employment Contract Conditions; approves the Transfer; closes the previous position. |
| Labor Dismiss | Creates an operation in the employment contract with the "Labor Dismiss" type, with a Termination Date defined in the "Termination Date" field on the HRIS Employee card; if the termination reason specified in the "Termination Reason" field is missing in the system, a new entry will be created in the Causes of Absence directory; approves the Dismissal; closes the position. |
Note when creating an Actual Position for the "Labor Hire" and "Labor Transfer" tasks, the following priority applies for determining position information:
- The highest priority is given to information specified on the HRIS Employee card. For example, if a job title is specified on both the HRIS Employee card and the Position Template, the value from the HRIS Employee card will be used for the created actual position. If no job title is specified on the HRIS Employee card, the value from the Position Template will be used.
- The second priority is given to information specified on the Position Template card. For example, if a payroll calculation group is specified on both the Position Template card and the Organization Unit or Job Title card, the value from the Position Template card will be used for the created actual position. If no payroll calculation group is specified on the Position Template card, the value from the Organization Unit or Job Title card will be used.
Step 6: Template Tables
Note, by default when executing tasks, information from the HRIS Employee card is populated into identically named fields on the corresponding pages in the system. At the same time, it is possible to override the field population logic on the required pages, as well as add population of fields that are not present on the HRIS Employee card. This can be done using the following functionality.
On the HRIS Integration Setup page, in the Actions section, select Template Tables. On the opened page, create a template for the table to which different or additional field population logic should apply:
| Field | Description |
|---|---|
| Code | Template code |
| Description | Template description |
| Table Id | Id of the table for which the template is created |
| Table Caption | Name of the table for which the template is created, populated automatically |
To configure the template, click the Edit action. On the opened template card, fill in the Lines area:
| Field | Description |
|---|---|
| Field ID | The field from the table to which the template applies, whose population logic needs to be defined |
| Field Caption | Field name, populated automatically |
| Validate Field | Determines whether the value to be inserted into the field needs to be validated |
| Const Value | If the table field needs to be populated with a constant value, specify that value in this field |
| Map-from Table Id | If the table field needs to be populated from another field in the system, for example from a different field of the HRIS Employee table than what is coded, specify the table from which the value should be transferred |
| Map-from Table Name | Name of the table specified in the "Map-from Table Id" field |
| Map-from Field ID | The field of the table defined in "Map-from Table Id" from which the value should be transferred |
| Map-from Field Caption | Name of the field specified in "Map-from Field ID" |
| Transformation Rule | If needed, specify a transformation rule for converting the value from the source field to the final result. |
Step 7: Job Queue Entries for Integration
For automatic regular import of records from the HRIS system and creation of corresponding tasks in Business Central, the following job queue entries are available:
| ID | Object Type to Run | Description |
|---|---|---|
| 71732323 | Codeunit | Imports record IDs and updates information in the HRIS Employees table |
| 71732322 | Codeunit | Creates tasks in the HRIS Integration Processes table |
| 71732321 | Codeunit | Executes created tasks in the HRIS Integration Processes table |
The frequency of job queue entry execution should be determined individually for each client project.
Step 8: Updating Records via Webhook
To avoid updating information for absolutely all employees each time, and instead update only those for whom changes were made in the HRIS system, you can set up such updates via Webhook.
To do this, enable Webhook in the corresponding HRIS system and add the following settings for the job queue entry with codeunit 71732323, namely:
-
Create a job queue entry with codeunit 71732323 and specify "Import New Employees" in the Parameter String field — this is necessary so that the system imports new employees upon their creation
-
Create a job queue entry with codeunit 71732323 and specify "Update Employees From Queue" in the Parameter String field — this is necessary so that the system updates information only for employees who had changes made in the HRIS system.
For these two job queue entries, you can set a daily execution frequency.
- To verify that information has been updated for all employees, you can create another job queue entry with codeunit 71732323 and specify "Update All Employees" in the Parameter String field, setting the execution frequency to, for example, weekends only. During execution, the system will update information for all employees.
When changes are made in the HRIS system, the IDs of employees for whom changes were recorded are written to the HRIS Employee Update Queue table. When the job queue with codeunit 71732323 and parameter string "Update Employees From Queue" is executed, only employees whose IDs are in this table will be updated. After job queue execution completes, records from the HRIS Employee Update Queue table are deleted.