How Payroll Batch Data Is Updated

The PrismHR API updates the payroll batch throughout the payroll creation process. The system creates a new ClientSpace Payroll batch record as soon as the record is created in PrismHR. The PrismHR Import Payroll Batch process uses two separate but related scheduled processes to import and process payroll details, billing vouchers, and pay groups from PrismHR. This breakout was done to prevent system performance issues that could arise when large payroll batches are processed.

We retrieve the batch status from Prism.

  • If the batch is not Complete in Prism, we do not process it. The batch status remains in the status it is in (Pending, Reporting, etc.)

  • If the batch is Complete in Prism, that signals ClientSpace to place a check mark in the Sync with PrismHR checkbox on the Payroll batch record which triggers the Prism Import Payroll Batch Sync scheduled process (described below) to run at the appropriate time.

The two scheduled processes are:

  • PrismHR Import Payroll Batch Ongoing: Runs first to process basic payroll information.

  • PrismHR Import Payroll Batch Sync: If the Sync with PrismHR checkbox is checked, the Prism Import Payroll Batch Sync process runs and billing vouchers, pay groups, and costs based on employee count information are processed. This process is set by default to only run on weekends.

If a batch is stopped at a certain point in the payroll system, notification and workflow events are triggered in ClientSpace based on the status update.

Available statuses include:

Payroll calculation results rejected by client

Payroll calculation completed with warning

Payroll printed with errors

Payroll calculation results pending client approval

Payment pending

Time sheet entry in progress

Payroll is ready for time sheet entry

Payroll is complete

Payroll is ready to print

Payroll is ready to calculate

Payroll finalization in progress

Payroll finalization complete with errors

Wire transfer pending

Payroll calculation completed with errors

Finalization pending approval

 

Payroll reports are ready for review

Payroll is ready to ship

Payroll Batch processing handles failed or deleted payroll batches in PrismHR.

  • Payroll Batch DELETE events are processed to create Import Queue records.
  • A DELETE event triggers business logic that updates the Batch Status field on the Payroll Batch form to "Deleted" and deactivates the Payroll Batch record along with the associated Pay Groups and Billing Vouchers
  • When a payroll batch record does not have a payDate value, the system marks the record as Completed with the message: "Pay date is required to import payroll batches into ClientSpace"
  • If ClientSpace cannot retrieve a Payroll Batch from an event, that event (Import Queue record) is marked as Completed with a message: "Batch '#####.###' Unable to include Queue Record in Import file, no getBillingCodeTotalsForBatch response info, this event will not be processed"
  • If no billing vouchers are found for a Payroll Batch from the PrismHR Import Payroll Batch Complete scheduled event, the system marks the record as Completed (as there is no data to process) and creates a log entry that indicates that no vouchers were found. For example:

    No billing vouchers found for client ID "<api:clientId>" and batch ID "<api:batchId>.

Client validation

In ClientSpace, Client number validation occurs before processing the Payroll Batch Import Queue records. If the Client is not found, the queue record is completed with a note. The validation occurs for queue records created from the Payroll Batch Import process, not the Ongoing Import process. The Ongoing process checks the Client number in ClientSpace before creating the queue record.

Employee count

When regular payroll batches are processed as Completed, the employee counts are calculated from the Employee records and their status classifications: full-time active, part-time active, full-time terminated, part-time terminated, full-time leave, and part-time leave. Use the Employee count records in the ClientSpace Executive Dashboards to compare the number of active employees to the number of paid employees.

Voided batches

For voided batches, ClientSpace uses the list of employees to determine the pay groups that are being voided and builds that batch similar to running a scheduled payroll batch. The billing codes are then distributed across the pay groups to balance out the original payroll batch. This provides a zero-sum between the initial run batch and the batch that is voiding the first batch.

Deleted batches

For deleted batches, ClientSpace deactivates the Payroll Batch as well as the associated pay groups and billing vouchers by removing the check marks from the Active checkboxes on these forms. Additionally, ClientSpace updates the Batch Status field on the Payroll Batch form to "Deleted".