Employee availability override API for extension scripts

Starting with release version 2026.01, a new API framework is available for programmatically creating and reading Employee Availability Override records. This enhancement enables customers and implementers to automate the management of employee availability—such as providing default availability for new hires—directly from Groovy extension scripts. The API is designed to support migration from custom Java processors to Groovy-based solutions, addressing a previous limitation where programmatic access to employee availability was not possible.

Key capabilities

  • Read Employee Availability: Retrieve existing availability override records for a specific employee.
  • Insert Availability Overrides: Programmatically create new availability override records.
  • Script Integration: All API methods are accessible from Groovy extension scripts configured in interface layouts or the Job Scheduler.
Note: The API currently supports only the creation and reading of employee availability override records.

Use cases

  • Automating the assignment of default availability for new employees during onboarding
  • Migrating legacy Java-based employee import processors, such as custom post-processors, to Groovy extension scripts
  • Integrating availability management into broader data import or export workflows

Example usage in Groovy extension scripts

This shows a conceptual example of how you can use the new API within a Groovy extension script:

// Example: Retrieve, and insert employee availability overrides
// Retrieve current availability overrides for an employee
def availabilityRecords = employeeAvailabilityApi.getAvailabilityByEmployeeId(employeeId)
// Insert a new availability override
def newOverride = employeeAvailabilityApi.buildOverride()
    .withEmployeeId(employeeId)
    .withStartDate(startDate)
    .withEndDate(endDate)
    .withAvailabilityType('DEFAULT')
    .withDetails(details)
    .build()
employeeAvailabilityApi.insertOverride(newOverride)
Note: The actual API class names, method signatures, and builder pattern can differ.

See Advanced Groovy script for alerts for advanced Groovy scripting techniques.

Migration guidance

If you are currently using a custom Java processor, such as a post-processor for employee imports, to manage employee availability, you should migrate your logic to a Groovy extension script using the new API. The API provides equivalent functionality for reading and inserting availability records, enabling automation within the supported scripting environment.

Error handling

If an error occurs during the insertion of an employee availability override, the API generates a public exception. Ensure your scripts incorporate appropriate error handling to manage these scenarios gracefully.