arazzo: 1.0.1 info: title: Workday Create Scheduling Organization and Shift summary: Create a scheduling organization, schedule a worker's shift within it, and confirm the shift. description: >- Stands up a new scheduling organization and immediately schedules a worker shift inside it. The workflow creates a scheduling organization, creates a schedule shift that references the new organization, and reads the shift back to confirm it persisted. 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: schedulingApi url: ../openapi/workday-tracking-system-scheduling-openapi.yml type: openapi workflows: - workflowId: create-scheduling-org-and-shift summary: Create an organization, schedule a shift in it, and confirm the shift. description: >- Creates a scheduling organization, schedules a worker shift that references the newly created organization, then fetches the shift to confirm it persisted. inputs: type: object required: - bearerToken - orgName - orgType - workerId - shiftDate - startTime - endTime properties: bearerToken: type: string description: OAuth 2.0 JWT bearer token for authenticating with Workday. orgName: type: string description: Name of the scheduling organization to create. orgType: type: string description: Organization type (Site, Department, Team). timezone: type: string description: Optional timezone identifier for the organization. workerId: type: string description: Worker ID to assign to the shift. shiftDate: type: string description: Date of the shift (YYYY-MM-DD). startTime: type: string description: Shift start time (HH:MM:SS). endTime: type: string description: Shift end time (HH:MM:SS). shiftType: type: string description: Optional type of shift (Regular, Overtime, OnCall, Split). steps: - stepId: createOrg description: >- Create a new scheduling organization that the shift will belong to. operationId: createSchedulingOrganization parameters: - name: Authorization in: header value: Bearer $inputs.bearerToken requestBody: contentType: application/json payload: name: $inputs.orgName type: $inputs.orgType timezone: $inputs.timezone successCriteria: - condition: $statusCode == 201 outputs: orgId: $response.body#/id orgName: $response.body#/name - stepId: createShift description: >- Schedule a worker shift that references the newly created scheduling organization. operationId: createScheduleShift parameters: - name: Authorization in: header value: Bearer $inputs.bearerToken requestBody: contentType: application/json payload: workerId: $inputs.workerId organizationId: $steps.createOrg.outputs.orgId shiftDate: $inputs.shiftDate startTime: $inputs.startTime endTime: $inputs.endTime shiftType: $inputs.shiftType successCriteria: - condition: $statusCode == 201 outputs: shiftId: $response.body#/id - stepId: confirmShift description: >- Read the created shift back to confirm it persisted with the expected organization and worker. operationId: getScheduleShift parameters: - name: Authorization in: header value: Bearer $inputs.bearerToken - name: shiftId in: path value: $steps.createShift.outputs.shiftId successCriteria: - condition: $statusCode == 200 outputs: confirmedShiftId: $response.body#/id confirmedOrgId: $response.body#/organizationId confirmedWorkerId: $response.body#/workerId outputs: orgId: $steps.createOrg.outputs.orgId shiftId: $steps.createShift.outputs.shiftId