Workday · Arazzo Workflow

Workday Log Time Entry

Version 1.0.0

Confirm a worker and read their timesheets, then log a new time entry.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Cloud ComputingEnterprise SoftwareFinancial ManagementHCMSaaSArazzoWorkflows

Provider

workday

Workflows

log-time-entry
Resolve a worker, read timesheets, then log a new time entry.
Reads the worker, their timesheets, and their existing time entries, then logs a new time entry with the supplied date, hours, time entry code, and worktag.
3 steps inputs: authorization, comment, date, hours, timeEntryCode, workerId, worktag outputs: entryId, timesheets, workerDescriptor
1
getWorker
getWorkerById
Confirm the worker exists before logging time.
2
getTimesheets
getTimesheets
Read the worker's timesheets for context.
3
logEntry
requestTimeEntry
Log the new time entry for the worker.

Source API Descriptions

Arazzo Workflow Specification

workday-log-time-entry-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Workday Log Time Entry
  summary: Confirm a worker and read their timesheets, then log a new time entry.
  description: >-
    A time entry flow. It resolves the worker, reads their timesheets and
    existing time entries for context, and then logs a new time entry for a
    given date and number of hours against a time entry code and worktag. 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: hcmApi
  url: ../openapi/hcm.yml
  type: openapi
- name: timeTrackingApi
  url: ../openapi/timeTracking.yml
  type: openapi
workflows:
- workflowId: log-time-entry
  summary: Resolve a worker, read timesheets, then log a new time entry.
  description: >-
    Reads the worker, their timesheets, and their existing time entries, then
    logs a new time entry with the supplied date, hours, time entry code, and
    worktag.
  inputs:
    type: object
    required:
    - authorization
    - workerId
    - date
    - hours
    - timeEntryCode
    properties:
      authorization:
        type: string
        description: OAuth2 bearer token, e.g. "Bearer eyJ...".
      workerId:
        type: string
        description: The Workday ID of the worker logging time.
      date:
        type: string
        description: The date of the time entry (YYYY-MM-DD).
      hours:
        type: number
        description: The number of hours to log.
      timeEntryCode:
        type: object
        description: The time entry code reference object (id, descriptor, href).
      worktag:
        type: object
        description: The worktag reference object (id, descriptor, href).
      comment:
        type: string
        description: An optional comment for the time entry.
  steps:
  - stepId: getWorker
    description: Confirm the worker exists before logging time.
    operationId: getWorkerById
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      workerDescriptor: $response.body#/descriptor
  - stepId: getTimesheets
    description: Read the worker's timesheets for context.
    operationId: getTimesheets
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      timesheets: $response.body#/data
  - stepId: logEntry
    description: Log the new time entry for the worker.
    operationId: requestTimeEntry
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: ID
      in: path
      value: $inputs.workerId
    requestBody:
      contentType: application/json
      payload:
        date: $inputs.date
        hours: $inputs.hours
        timeEntryCode: $inputs.timeEntryCode
        worktag: $inputs.worktag
        comment: $inputs.comment
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      entryId: $response.body#/id
      entryStatus: $response.body#/status
  outputs:
    workerDescriptor: $steps.getWorker.outputs.workerDescriptor
    timesheets: $steps.getTimesheets.outputs.timesheets
    entryId: $steps.logEntry.outputs.entryId