Flex Hr Details 

This function allows integration with Flex HR service which will simplify the process of updating personnel information but also ensures that the changes are reflected in the company's Active Directory (AD) system promptly and securely. 

1.Flex HR Personnel Update: 

When personnel information is updated in Flex HR—whether it's a change in contact details, job roles, or any other relevant data—the system triggers an automated process to communicate these changes to the NSP ITSM service. 

2.Ticket Creation in NSP: 

NSP creates a service ticket to log and track the personnel update request. This ticket serves as a record of the change, including details such as the nature of the update, timestamp, and the employee's information. 

3.AD Update: 

Simultaneously, NSP communicates with the company's Active Directory to implement the approved changes. This ensures that the AD system is kept up-to-date with the latest personnel information, reflecting the changes made in Flex HR accurately. 

4.Automated Tracking and Notifications: 

Throughout the process, automated tracking mechanisms within NSP monitor the status of the ticket. Notifications can be configured to alert relevant stakeholders of successful updates or any issues that may require attention.  In the ticket that is created after successfully updating , a new comment with all necessary information (successfully or not) will be created.    

 

 

 

 

Notification example 

 

Configuration of the Flex HR 

Step 1.  Integration settings 

Agent Portal> Configuration> Channels and Integrations> Integration Settings> Flex HR 

Edit - opens a popup with settings parameter for Flex HR details 

 

 

Flex HR Register Settings 

 

1.  Service Url* - add the URL used to connect to the API of the service.  

2.  Username* - insert your username. 

3.  Password * - insert your password. 

4.  Instance Id * - id provided by the customer. 

 

 

Flex HR Register Settings 

Company - A list of companies provided by the connected API service. 

 

Step 2. Configuring the LDAP Connection 

To make LDAP settings go to Configuration> Settings> Account management> LDAP Connections.  

This section is explained in more detail in this section of the user manual. 

 

Step 3. Add event Trigger 

In order for the configuration to work, you will need to create a special event trigger for it. 

To access Event Triggers, go to Configurations > Business Rules > Event Triggers. 

Two conditions must be met : 

 

1.  Created equal true 

2.  Source equal FlexHR 

 

In order for the trigger to work you will also add an event which will  run the script api.ProcessFlexHrUserOnAD(record, “ActiveDirectory”); 

 

This section is explained in more detail in this section of the user manual. 

 

 

Event based trigger from Flex HR 

Tickets that have been created from using Flex HR service will also have a special icon. 

 

 

 

 

Flex HR ticket identification 

 

Flex HR System Operation

1. Triggering Mechanism:

Scheduled Job Execution:

Within the [sch].[ScheduledJobs] table, there is an entry named 'FlexHR-FlexHRJob' under the job type. This job is configured to execute repeatedly based on the CronExpression value (e.g., every 2 minutes). The primary purpose of this job is to invoke the FlexHRJob service within the NSP environment at specified intervals.


When the FlexHRJob worker (service) starts running at the designated interval, it connects to the FLEX HR REST API. The service fetches the most recent system users who have been active within the last 30 days (this value can be adjusted via the 'Flex_ModifiedSince' parameter). The retrieved users may include new entries or updates to existing records.

Data Processing and Logging:

After obtaining the user list, the data is sanitized and inserted into the [app].[FlexLogs] table. During this process, a new ticket of the FlexHR entity type is created for each record.
If a record already exists and needs updating, the system checks whether the related ticket is still open. If the ticket is open, a comment is added to indicate that the user information has changed but the ticket remains open. If the user is new, they are marked as IsNewUser = 1 in the table; otherwise, they are marked as IsNewUser = 0.

2. Entity Trigger Activation:

At this point, the ProcessFlexHrUserOnAD trigger, created on the entity, is activated:
The trigger first attempts to establish a connection with the LDAP server. If the connection fails, an error is logged.
If the connection is successful, the trigger proceeds to fetch records from the FlexLogs table and inserts them into the Active Directory (AD). The process includes:
- Inserting a new user into AD.
- Checking if the new user already exists in AD.
- Creating the AD user if they do not exist, setting the manager paths if resolved; otherwise, a comment is added indicating that the manager must be entered manually before processing the user in AD.
- If the user is successfully created without new comments from the manager, the ticket is closed with a comment indicating success, along with logging the base DN and username.
- If the process fails, a comment is inserted, indicating the failure to synchronize with Flex.