Importing to ClientSpace
The PrismHR Import Ongoing process evaluates PrismHR Events (Company and Employee changes) that may affect existing ClientSpace Client and Employee data, as well as those events that create new Clients and Employees. All active ongoing import map configurations are processed each time the scheduled process executes on the same set of PrismHR Events (this minimizes the amount of data retrieved from PrismHR). Data from PrismHR is extracted and loaded into ClientSpace through scheduled processes.
Note: During an Import, if an exception occurs during the dataform save, the system logs an appropriate exception in both the Import logs and the exception log.
Client records
For PrismHR API Ongoing events, ClientSpace ignores inactive Client Master records. When events are retrieved and converted into Import Queue records, for non-Company ongoing import maps, the Client associated with the event must be in ClientSpace. If not, the event is discarded, and an Import Queue record is not created for that event.
- The PrismHR Import Ongoing scheduled process imports ongoing data for clients only when a matching client number exists in ClientSpace.
- If the Client Number exists, but the Client is not in a Status of Client, PendingTermination, Termination, or UnderContract, the event is ignored.
- If the ongoing event is a Client schema event (UPDATE or CREATE), the event is processed, and an Import Queue record is created.
- If the event is a Security schema event, the event is processed, and an Import Queue record is created.
- All other events test whether the associated Client exists; if not, the ongoing event is skipped. No Import Queue record is created, and a Business Intelligence report entry is logged
"---Create Import Queue Events, ClientNumber not found in ClientSpace, this event will not be processed"
. - If a DELETE event is received for a Client, the Import Queue record is automatically completed without attempting to retrieve the Client details. No import row is generated. The Queue record is marked with a comment indicating the Client was deleted from PrismHR.
- If importing data from a Client Team event, and the 'my SupportTeamDashboard' value is empty, the system clears the value on the Client Team form (unless a default value is configured in the import).
- Activation Date mapping - The system evaluates the Set Activation Date on Import business rule during import. If the Activation Date is populated, and the status equals Client, the system accepts the imported value. If the Status does not equal Client (for example, Terminated) the system reverts to the previous value.
Employee and Employment records
Employee records
- When an Employee record is not found in PrismHR, the associated Event Import Queue record is marked Completed with a note indicating the Employee was removed from PrismHR.
- For Employee records, when a DELETE queue record is created, ClientSpace inactivates the associated Employee record.
- For Employment records, when a DELETE queue record is created, ClientSpace sets the status of the associated Employment record to Deleted.
- Future changes are supported by the import configuration HRPAPI_emp_futurechange*.csv, which captures Termination Date and Termination Reason from the employee record when that date occurs in the future. You can synchronize the fields for future changes while leaving the employment status Active.
Employment records
-
For Employment data on an Employee that is not found in ClientSpace, the system creates a stub Employee record and populates the Employee ID and ImportID. The record is set to Active. The stub Employee record is created to accept Employment data. The system creates a new Employee Import Queue record in Pending status. This action populates the new Employee data the next time the scheduled process runs.
-
If the AnnualPay field from PrismHR is not between -10,000,000.00 and 10,000,000.00, the AnnualPay field value is not imported into ClientSpace. In the Employment record, the field Invalid Annual Pay field is selected, and the Annual Pay is not set for the Employee. This logic applies to Employment imports that use the ClientSpace.PEO.Import.Employment Custom Import Class (in the Import Map Header Detail).
-
Employment Status Codes are recorded in the ClientSpace Employment Status (EmploymentStatus) field. The code imports from the PrismHR employeeStatus field. See the ClientSpace API Data Mapping file in Attachments and Templates.
-
To determine a "Termination" code, ClientSpace uses the PrismHR Status Classification (statusCode) field. See the ClientSpace API Data Mapping file in Attachments and Templates.
-
If the PrismHR statusCode is set to "Terminated", the ClientSpace Employment Status field is updated to "Terminated" and the ClientSpace Termination Date is set to the PrismHR statusDate value. If PrismHR statusCode is NOT set to "Terminated", the ClientSpace Employment Status field is updated to the value in the PrismHR employeeStatus field.
Benefit data
- If the Employment record is not found, the Import Queue record is set to Completed, with a note indicating the Employment record was not found.
Location records
- For Location records, when a DELETE queue record is created, ClientSpace inactivates the associated Location record.
- Location events with locationCode values containing # or & are processed.
The process
- Based on the PrismHR configuration data provided, the process logs into the PrismHR server. Failure to log in terminates the process (a log entry is generated).
- A list of PrismHR Subscriptions is retrieved from PrismHR.
- Typically, there are two Subscriptions: Company Information and Employee Information.
- The Subscriptions establish the type of information that must be monitored for change (Events).
- The API parameter value for HRPRunImport is retrieved, and if set to 1, a list of Import Map Configurations is retrieved from ClientSpace in this order:
- HRPAPI_company_ongoing
- HRPAPI_clientteam_ongoing
- HRPAPI_location
- HRPAPI_employee
- HRPAPI_employment
For each Subscription
- The last ReplayID is retrieved from ClientSpace. This indicates the last event that was retrieved by the process. All events from that point to the current point in time are evaluated.
- If the last ReplayID is equal to the current value associated with the Subscription (meaning no events have occurred since the last process run time), no new events are retrieved from PrismHR.
- If the Replay IDs are different, a list of events is retrieved from PrismHR, from the last ReplayID to the current point in time. These events are associated with this instance of the Subscription ID.
For each Import Map configuration
- A list of Import Map Fields and Paths is retrieved.
- For each new event, if the event action is Delete, no action is taken on this event.
- For each Modified Attribute in the event, the Modified Attribute (the actual field in PrismHR that has changed) is compared to the list of Import Map Paths.
- If the Modified Attribute is not found in the Import Map Path list, this event is ignored. Because it is a change, ClientSpace does not need to process. The associated Subscription dataform is updated with this Attribute as an Exclude value.
- If the Modified Attribute is found in the Import Map Path list, the Company or Employee for which thiseEvent is associated is saved for Import.
- After all Events are evaluated, the result is a list of distinct Companies and Employees that will be queued. For example:
- EventID 1: Company 123 Address changed
- EventID 2: Company 123 Phone changed
- EventID 3: Company 456 Fax changed
- These three Events produce the following list of Companies to be queued:
- Company 123 and Company 456.
- Company 123 is only in the list once even though it had multiple changes. The process only operates on the unique set of Company or Employee changes.
For each Company or Employee in the list
- An entry is created in tblImportQueue with the following data:
- The current Import Map Header ID
- A formatted Identifier (EventObjectID!.!EventClientID!.!EventSchema)
- Status of Pending
After all Import Map Configurations are processed
- The ClientSpace Subscription dataform associated with this Subscription is updated with the latest ReplayID from the Event list.
- Regardless of whether new events were available, queued events are then processed, for each Import Map Configuration, a list of Import Map Fields and Paths is retrieved
- A call to tblImportQueue is made to retrieve event details for and queued record whose status = Pending or Failed
- A call is made to PrismHR to retrieve specific Company/Employee/Location data for each queue record.
- Based on Import Map Fields and Paths and the Company or Employee data retrieved from PrismHR, an Import file row is constructed for the particular Import Map being processed.
- The Import file row is presented to any Custom Import Business Class for further manipulation (if configured).
After all Companies or Employees are processed
- The Import File is generated and uploaded to ClientSpace, status = Ready for Import.
- If the configuration value HRP Run Import is set to True, the file is immediately imported using the ClientSpace Import process.
- The next Import Map configuration is processed.
The next Subscription is processed
- After all Subscriptions are processed, the process logs out of the PrismHR server.
Excludes Import Map Detail
Review the PrismHR Security subscription record to ensure that Users=activeUser is NOT part of the Excludes Import Map Detail for the HRPAPI_users import. The import must contain a valid record for the Active flag.
User status in PrismHR and ClientSpace
The ClientSpace user Active value is automatically set to the PrismHR value so that when a user is inactivated in PrismHR, the same status is reflected in ClientSpace.