Scheduled Processes

Scheduled processes are executable code that runs on a schedule, such as contact syncing or polling the DocuSign system to retrieve document status. Processes are scheduled based on frequency, frequency type, and valid days. Access to the Scheduled Processes Admin dashboard is only available to system admins and users with access to the Advanced settings.

To view your scheduled processes:

  1. Go to System Admin > Advanced > Scheduled Processes.
    The Scheduled Processes Admin dashboard opens.
  2. To view the configuration, double-click the selected row or click (Open).

Schedule Sleep Time Window for Your processes

Use a sleep time window for a scheduled process to prevent the system from running the scheduled process during that time frame, A developer user can set the days, start time, and end time for a sleep window. For example, if a system undergoes weekly maintenance from 1:00 AM to 5:00 AM on Sunday mornings, a developer user can set a sleep time window for a scheduled process to avoid running the process during the system maintenance. The developer user can set the sleep window for the process to occur on Sundays with a start time of Midnight and an end time of 6:00 AM (to overlap the maintenance time frame). During the sleep time window, the system prevents the scheduled process from running. Using a sleep window for scheduled processes can minimize the chance of an error occurring during a scheduled process due to conflicts that might occur during activities like system maintenance.

To view your scheduled processes:

Note:   This procedure is for developer users only.

  1. Go to System Admin > Advanced > Scheduled Processes.
    The Scheduled Processes Admin dashboard opens.

  2. To view the configuration, double-click the selected row or click (Open).

  3. Complete the information in the Developer Options: Sleep Window Settings fields set.

    Sleep Fields
    Field Description
    Days Of The Week

    The Days of the Week that will make this Scheduled Process sleep if it is triggered.

    Start Time

    The starting time of the Sleep Window. Applies to each selected Day.

    Note:  If the Start Time and End Time are the same time, or if the Start Time is not blank and the End Time is blank, the Sleep Window will be for that whole hour. For example, if the Start Time field contains 1 AM and the End Time contains 1 AM, the time frame for the Sleep Window is 1:00 AM to 1:59 AM .

    End Time

    This field indicates the end time of the sleep window. This setting applies to each day that you indicated in the Days of the Week field. End time always runs through the end of the hour selected, so selecting 1 AM as the end time means the sleep window will run through 1:59 AM.

    Note:  If the Start Time and End Time are the same time, or if the Start Time is not blank and the End Time is blank, the Sleep Window will be for that whole hour. For example, if the Start Time field contains 1 AM and the End Time contains 1 AM, the time frame for the Sleep Window is 1:00 AM to 1:59 AM .

  4. Click (Save).

Queuing Your Processes

Scheduled processes are Advanced Administration functions. Global administrators can queue scheduled processes from the Scheduled Processes Admin list from the Queue Process function. When you queue a process, it sets the Next Run Date to Now and updates the Queued column to 1. If you try to queue a process that is currently running, you receive an alert to wait for the process to finish running before queuing it again. In some cases, processes inactivate after they have run. However, many processes stay active all of the time.

To queue a scheduled process:

  1. Go to System Admin > Advanced > Scheduled Processes.
    The Scheduled Processes Admin dashboard opens.
  2. To queue a process, select an entry, and click Queue Process.
    Queue Process sets the Next Run Date to the current date and time so that the process initiates as part of a scheduled process run, instead of running immediately.
  3. To edit the frequency of a process, select the entry, and click Edit.
    The scheduled process form opens, ready for your edits.
  4. To save your changes, click Save.

List of scheduled processes

The following list comprises both CORE and PEO level scheduled processes, with CORE processes marked with (CORE).

Scheduled process name Description

ActivatePending

Find all Client workspaces with Pending Activation status that have an activation date equal to or less than today’s date. Change their status to Client and their Pricing Batch Status to Activated if using pricing.

Approval Expirations

Compare the Date Approved field of the pricing batch to today’s date and the Approval Expiration # of Days on the Default Info form of the Admin workspace. If the difference exceeds the default, expire the pricing batch.

Auto Archive BI Reports

Finds Business Intelligence reports that have not been run in 120 days and archives them. (These are default parameters that can be changed. See Configuring the Auto Archive BI Reports Scheduled Process.)

Benefit Renewals

Compare the Benefits Plan expiration date to the Default Benefits Renewal Lead Time setting on Admin Workspace > Default settings. If the plan (Expiration Date - Default Lead time) is >= Now, clone any Benefit Plan template tasks with a trigger object of BenefitsRenewal.

BenefitActivations Activates Benefits Plans and associated Offered Plans that are in Pending Activation status and Effective Date is on or before the day this process executes.

Bidirectional Contact Sync

HRPBiDirectionalContactsSync. For Initial Imports, it only retrieves ClientSpace Clients in Client, Terminated, and PendingTermination status.

BrokerOutstandingProposalsEmail

Generates and sends an email to the primary contact of Broker Orgs that have associated client workspaces with a Client Master status of Submitted with a subject line of Outstanding PEO Proposals with XXXX - XXXX being the name of the ClientSpace PEO organization.

CaseTypeRowLevelSecurityUpdate Find missing row-level security settings for Client Service Cases with secured Case Types and inserts or updates as needed. Deletes row-level security when case type security has been removed for a role.
ClientSpace Digest Daily (CORE) Sends daily digest of follow-ups.
ClientSpace Digest Weekly (CORE) Sends weekly digest.
CriticalCaseNotification Sends Critical Case notification email with case list. Case priority must be critical – sends emails to members of Admin roles.

Delete Email (CORE)

Delete all emails and associated attached files older than 30 days from today.

Delete Marked Task (CORE)

Find all incidents marked for deletion and delete the following: Incident Users, Template Triggers, templates marked for delete, Incident Contacts, Uploaded files attached to incidents, binary files attached to incidents, and finally, incidents.

Delete Orphaned Time Records (CORE)

Deletes time records that are > 1 day old and have no associated record or workspace.

DocuSign Get Docs Status (CORE) Polls the DocuSign system using an API to find documents matching Queue records and retrieves the current status of those docs. Requires a DocuSign account.
DocuSign Request Signature (CORE) Polls the Uploaded File Queue for docs in New status then post the records to DocuSign using an API to request signatures of the addressees of those docs. Requires a DocuSign account.
Expire Passwords (CORE) Automatically Expires user passwords based on Install Security setting and Password Change Date on the user account.
Expire Sessions (CORE) Automatically Expires user sessions after a set amount of inactivity based on Install Security Setting.

External Source Linking Cleanup

When deleting dataforms and workspaces, External Source Linking Cleanup deletes any associated external source linking records to prevent orphaned entries. A warning message is displayed when deleting dataforms and workspaces with External Source Linking records.

FileManagement Cleanup (CORE)

Interrogates the file linking table for unprocessed links, determines if they are not orphaned, removes the link if orphaned, and marks the associated file for deletion. Then finds all files marked for deletion in uploaded files binary and uploaded files tables and delete them.

Generate Recurring Tasks (CORE)

Evaluates a recurrence table to identify the tasks to be generated. This only functions on non-template recurring tasks. The task that is configured to generate recurring tasks is the Primary task; those generated from this task's configuration information are Recurring tasks.
Generate Scheduled Workflow Find all scheduled workflow from the Workflow Item table and trigger scheduled workflows for each based on Date offset and grace period.
Import Cleanup (CORE)

This scheduled process deletes the following:

  • Completed import files that are ImportComplete and are greater than 5 days old.

  • Completed import queue records that are Completed and greater than 1 day old.

  • Import records with the Status of UploadComplete that are greater than 1 day old.

  • Import records with the status of ImportCanceled that are greater than 1 day old.

  • Import records with the status of ImportInProgress that are greater than 30 days old.

Manage Non-Active Users (CORE) Internal and External users who have not logged in during the last 30 days are hibernated. External users who have not logged in the last 180 days are expired.
Marketo Leads (CORE) Polls the Marketo system using a configured API to synchronize Lead data. Requires a Marketo account.

Move Queued Files (CORE)

Get all files that need to be moved. Create an uploaded file object for each. Move each file and delete the binary file if successful.

Offered Benefits Plan Summary Update

Insert Offered Benefit Plan Summary records on a nightly scheduled process replicates the data grid from the header of Offered Benefits Plan dataform for cross workspace reporting purposes.

PrismHR Employee Sync With Prism

This process synchronizes ClientSpace Employees with PrismHR. It validates that Employees in ClientSpace (for Companies that have Client Numbers in PrismHR) are in PrismHR. If the Employee record is not in PrismHR, it sets the Employment status to Deleted and inactivates the Employee record. This process is scheduled to run once and then inactivates.

PrismHR Bill Records

This process exports Workers Compensation Claim Deductible Billing records to Prism HR when the billing records are in "Ready to Bill" status (and where the WC Deductible Bill Opt-Out setting on the Client Master record of each associated client workspace is unchecked.) It creates a "Bill Pending" record for each exported bill in PrismHR. Bill Pending Comment text, if entered, is also exported to the Comments field of the Bill Pending record in PrismHR. Upon a successful export, the process updates the status of the Claim Deductible Billing records in ClientSpace to "Billed" and writes "Successfully Created Bill Record in Prism" to the Export Log field of the exported Claim Deductible Billing records. If the export is not successful, the process updates the status of the Claim Deductible Billing records in ClientSpace to "Failed to Export" and writes an error message to the Export Log field of the affected Claim Deductible Billing records.

 

Note:

  • Multi-tenancy is supported.

  • Contact Professional Services for assistance configuring API parameters.

PrismHR Export Contacts

This process exports any contact to PrismHR when the Sync With PrismHR checkbox on the contact is checked.

The Sync With PrismHR is checked when a user adds a new contact or when a user updates any of the following fields on an existing contact:

  • contactName

  • contactTitle

  • contactPhone

  • contactPhoneExt

  • contactEmail

  • comments fields

Note:  If these fields changed due to the PrismHR API, the system does not export the change to PrismHR.

PrismHR Import Initial Locations This scheduled process uses the HRPAPI_initial_location*.csv import configuration (must be active) to retrieve a list of Active ClientMaster records where Client Number is not empty. These Client Numbers are then matched in PrismHR and used to create a list of locations for each client. If the client number cannot be matched in PrismHR, the client is ignored. For Initial Imports, it only retrieves ClientSpace Clients in Client, Terminated, and PendingTermination status.

PrismHR Import Initial Sync

This processes the Clients to Sync and import remaining active Import Map data (employee, employment, location).

PrismHR Import Ongoing

Only imports ongoing data for Clients that exist in ClientSpace.

PrismHR Import Payroll Batch Ongoing

The PrismHR Import Payroll Batch Ongoing scheduled process imports payroll batches, billing vouchers, and pay groups from PrismHR. The PrismHR Ongoing import will still generate the Payroll Batch Queue records in pending status, but the batch records will be retrieved from PrismHR and the Queue records completed by the new Payroll Batch Ongoing scheduled process.

The PrismHR Import Payroll Batch Ongoing scheduled process is Active by default and processes payroll batches in a separate scheduled process from the other import processes in the PrismHR Import Ongoing scheduled process. This breakout was done to prevent system performance issues that could arise when large numbers of payroll batches are processed at once.

Note: Only 250 payroll batch records may be returned and processed at one time.

PrismHR Import Queue Initial Clients

This scheduled process obtains a list of all clients available through the PrismHR API, creates Import records for each, and sets the Sync with PrismHR flag on the Client Master for each Client imported (company initial import map HRPAPI_initial_company*.csv MUST be active). The company initial import map contains the Sync with PrismHR column (scripted out as active) to allow the setting of that flag on the Client Master.

PrismHR Import OSHA Location Data CLIENT

This scheduled process runs every 15 minutes and obtains location totals from PrismHR when the user has requested location totals. This process excludes location totals if the Obsolete Date on the Client Location dataform does not fall within the current OSHA year. If the Retrieve OSHA Location Totals (Import) field on the Client Location dataform is selected, this process retrieves location totals for each location that is not obsolete in the workspace. The scheduled process retrieves totals for the current year from PrismHR. See OSHA 300A Report Details.

PrismHR Import OSHA Location Data

This scheduled process obtains data for the previous one, two, or three years and populates the dataform Location OSHA Totals. This process excludes location totals if the Obsolete Date on the Client Location dataform does not fall within the selected OSHA year (or years). The process obtains Total Hours Worked and Average Employee Count by Location from PrismHR. This data is then available to run the OSHA 300A report. See OSHA 300A Report Details.

The process runs for all PrismHR clients in the status Under Contract, Client, Pending Term, and Term.

To set the number of years of data to populate, configure the OSHAYearsToProcess parameter in the PrismHR API Configuration. See Initial Import: Configuring the API for Import Map Details or Ongoing Imports: Configuring the API for Import Map Details.

PrismHR Initial Employee Sync

This scheduled process uses the HRPAPI_initial_employee*.csv and HRPAPI_initial_employment*.csv import configurations (must be active, See Activating Import Map Headers) to retrieve a list of active ClientMaster records where Client Number is not empty.

 

The Client Numbers are then matched in PrismHR to create a list of Employee and Employment records for each client. If the Client Number cannot be matched in PrismHR, the client is ignored. The Employee and Employment records are then mapped into an import file for the nn number of clients, with the number of clients (nn) set from the InitialImportClients parameter (numeric value) of the relevant API configuration. The import files are based on the initial_employee and initial_employment import configurations. When all records for the first nn clients are retrieved, the import begins.

 

This process seeds the system with any missing or new Employee and Employment records, batching these records based on the number previously retrieved until all Employee and Employment records for the designated clients are synchronized. At the end of this process, the scheduled process inactivates itself. For Initial Imports, it only retrieves ClientSpace Clients in Client, Terminated, and PendingTermination status.

 

The process inactivates when all generated records are processed.

Process Case Escalations  Checks Case Escalation records. Records with escalation date and time scheduled prior to NOW() are then processed, including (where applicable) updating priority, updating the assigned to user, and notifying the selected user or role.

Process Client Statistics

Runs once a month to create new entries and updates the Client Statistics Table. When this process runs, the procedure aggregates each of the types by month. It searches for all Employee Vouchers or UIBenefitCharges that are not yet processed, then sums the totals and creates new Client Statistics records. Each client has one record per month and type. If an unprocessed record is found for an already existing month and type, the process updates the totals on that Statistics record. When the scheduled process completes, it enables the IsProcessed option on any records that are used in creating a Client Statistics record.

Process Email Integration (CORE) The Email Integration feature uses this process to check the designated mailbox for new entries and generate dataform records from these emails.

Process Scheduled Imports

Imports any uploaded import file whose matching map header is Import Type = Scheduled Process. The import file status must be Ready for Import or Validated.

Purge I9 Records

Check the date of all I9 records pending purge in the system against the business rules, and mark all appropriate records as purged.

Salesforce Sync Rest API

Synchronizes data between Salesforce and ClientSpace.

Seed Client Team Role

The Seed Client Team Role scheduled process deletes all Client Team Role rows before recreating Client Team Role forms.

Send Email (CORE)

Collect all unsent mail in the system, send them, and mark them as sent.

ServiceCaseNotification

Checks Client Service case records for cases with escalation date and time prior to NOW(). Sends an escalation case report with the subject "Cases requiring attention" to users in escalation roles on the case type. Includes any role that has the biz_email_ClientServiceCase_notifications entity.

Task Escalation (CORE)

Get all the incidents that have passed their due date. Sends email notifications with the Subject "Tasks requiring attention" with a list of these tasks to the associated user email accounts. Notifications are sent to the Assigned To and Owner users, users with the Send Escalation Email option enabled in their user profile, as well as anyone in the task category notification role.

TerminatePending

Find all Client workspaces with Pending Termination status that have a termination date equal to or less than today’s date. Change their status to Terminated.

Update Act-On contacts (CORE) Polls the Act-On system using a configured API to synchronize contact data. Requires an Act-On account.
Update Client Teams Finds Default Client Team records in Pending status and updates Client Team records for workspaces with the same Sales Region.

Update User Time Notifications (CORE)

Find all new time tracker users and insert their records into the Notification and notification users table.
Find all users with open time records over the preset threshold and notify them: "You have not updated your time in X minutes."
Find all users without open time records and notify them: "You currently have no open time records."

Vouchers

HRPImportVoucher. For Initial Imports, it only retrieves ClientSpace Clients in Client, Terminated, and PendingTermination status.