UKG · Arazzo Workflow

UKG Pro WFM PTO Balance and Schedule Check

Version 1.0.0

Read an employee's accrual balances and branch on available PTO.

1 workflow 1 source API 1 provider
View Spec View on GitHub Human Capital ManagementHCMWorkforce ManagementHRPayrollTime and AttendanceBenefitsSchedulingArazzoWorkflows

Provider

ukg

Workflows

pto-balance-and-schedule
Check accrual balance against requested hours and surface scheduled shifts.
Reads the accrual balances, branches on whether the available balance covers the requested hours, and pulls the employee's scheduled shifts for the window when sufficient balance exists.
2 steps inputs: employeeId, endDate, requestedHours, startDate outputs: accrualName, balance, firstShiftDate
1
getAccruals
getEmployeeAccruals
Retrieve the accrual balances for the employee and branch on whether the first balance covers the requested hours.
2
getShifts
getEmployeeShifts
Retrieve the employee's scheduled shifts across the requested window so a planner can see which shifts the time off would overlap.

Source API Descriptions

Arazzo Workflow Specification

ukg-pto-balance-and-schedule-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: UKG Pro WFM PTO Balance and Schedule Check
  summary: Read an employee's accrual balances and branch on available PTO.
  description: >-
    Checks whether an employee has enough accrued time off and surfaces their
    upcoming schedule in the UKG Pro Workforce Management API. The workflow reads
    the accrual balances, branches on whether the available balance covers the
    requested hours, and when it does, pulls the employee's scheduled shifts for
    the requested window so a planner can see the conflict surface. Every step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: ukgProWfmApi
  url: ../openapi/ukg-pro-wfm-openapi.yml
  type: openapi
workflows:
- workflowId: pto-balance-and-schedule
  summary: Check accrual balance against requested hours and surface scheduled shifts.
  description: >-
    Reads the accrual balances, branches on whether the available balance covers
    the requested hours, and pulls the employee's scheduled shifts for the window
    when sufficient balance exists.
  inputs:
    type: object
    required:
    - employeeId
    - requestedHours
    - startDate
    - endDate
    properties:
      employeeId:
        type: string
        description: The employee checking PTO availability (e.g. EMP001).
      requestedHours:
        type: number
        description: The number of PTO hours the employee wants to request.
      startDate:
        type: string
        description: Start date of the requested time off window (YYYY-MM-DD).
      endDate:
        type: string
        description: End date of the requested time off window (YYYY-MM-DD).
  steps:
  - stepId: getAccruals
    description: >-
      Retrieve the accrual balances for the employee and branch on whether the
      first balance covers the requested hours.
    operationId: getEmployeeAccruals
    parameters:
    - name: employeeId
      in: path
      value: $inputs.employeeId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      accrualName: $response.body#/0/accrualName
      balance: $response.body#/0/balance
      pendingBalance: $response.body#/0/pendingBalance
    onSuccess:
    - name: sufficientBalance
      type: goto
      stepId: getShifts
      criteria:
      - context: $response.body
        condition: $[0].balance >= $inputs.requestedHours
        type: jsonpath
    - name: insufficientBalance
      type: end
      criteria:
      - context: $response.body
        condition: $[0].balance < $inputs.requestedHours
        type: jsonpath
  - stepId: getShifts
    description: >-
      Retrieve the employee's scheduled shifts across the requested window so a
      planner can see which shifts the time off would overlap.
    operationId: getEmployeeShifts
    parameters:
    - name: employeeId
      in: path
      value: $inputs.employeeId
    - name: startDate
      in: query
      value: $inputs.startDate
    - name: endDate
      in: query
      value: $inputs.endDate
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstShiftId: $response.body#/0/shiftId
      firstShiftDate: $response.body#/0/shiftDate
      firstShiftHours: $response.body#/0/totalHours
  outputs:
    accrualName: $steps.getAccruals.outputs.accrualName
    balance: $steps.getAccruals.outputs.balance
    firstShiftDate: $steps.getShifts.outputs.firstShiftDate