Skip to main content

What an action does

An action is the outcome of an automation step. It can retrieve information, create or update a record, wait for a later event, coordinate a task or approval, prepare a document, return a request/response result, notify people internally, or update role assignments. Every released action runs through the selected organization-scoped KayanOS connection. Validate that connection before mapping inputs; an internal KayanOS outcome does not remove this required authorization boundary. Choose an action because it produces a necessary, reviewable result—not because it is available in the catalog. The safest order is usually:
  1. Read or find the relevant data.
  2. Check the decision condition.
  3. Make one controlled write or response.
  4. Notify the accountable person or team.
  5. Record enough information for a reviewer to find the result.

Before you map an action

For every action, answer these questions before saving it: Do not map a display label when the trigger output supplies a stable ID or relationship value. IDs and scoped selectors are less likely to change unexpectedly.

Current action catalog

The tables below preserve the visible KayanOS action names and required inputs in the current catalog. The editor may present additional optional fields; use them to narrow scope and make the result easier to audit.

Record actions

Task and grouped-work actions

Form and entity-action actions

Flexible-hours approval behavior

An Attendance Schedule Adjustments record created with the existing Create Record action is a schedule decision, not a time claim. It never creates a work-time entry. Actual closed punches remain the only source of productive minutes; an open punch can anchor arrival but contributes no worked minutes until it has a valid checkout. The record has no Decision or approval-status input. Every submitted adjustment is treated as approved. Note is the only optional free-text field. Revision, approval provenance, position, shift, schedule snapshot, and retroactive status are system-managed and never entered in Create Record. Source Submission is optional because the server uses the automation flow-run ID when it is blank. Use a stable source submission when a later run should update the same adjustment; the ledger increments its internal revision automatically. Create Record presents schedule details as typed fields instead of a JSON object. Adjustment Type controls visibility:
  • Fixed Times: Start Time and End Time.
  • Shift Offset: Offset Minutes (positive moves later; negative moves earlier).
  • Flex Window: optional Window Start Time and required Window End Time.
Audit-only values—including the normalized adjustment JSON, derived mode, shift snapshot, revision default, actor, recomputation job, and retroactive marker—are maintained by the system and cannot be edited as ledger fields. Shift Snapshot is captured by the server from the selected assignment’s shift and is never entered manually. Retroactive is also server-derived: it is true when the affected dates already have an approved salary slip. Such a change requires locked-period correction permission; it preserves locked attendance/payroll and uses the existing next-period adjustment behavior.
  • Fixed times accepts an explicit start/end pair only when it preserves the base shift span. Shift offset is the equivalent signed-minute form. Every work range and configured break moves by the same offset.
  • Flex window clamps the first check-in to the approved window. Before the window uses the window start, inside the window uses the actual arrival, and after the cap uses the cap; arrival after the cap is late by the excess.
  • With no check-in, the base schedule remains effective and no minutes are granted. A missing checkout can still establish lateness, but it produces no worked minutes, last-out, early-leave, or overtime until corrected.
  • Required productive duration and scheduled-break allowance do not change. Early leave is measured against the adjusted end. Overtime is productive punch coverage after the adjusted end, not early arrival or a skipped break.
  • Example: base 08:00–16:00, flex window 08:00–10:00, first check-in 09:17 gives 09:17–17:17; a 10:20 arrival is anchored at 10:00 and is 20 minutes late.
  • The range is limited to 366 days. One approved adjustment may exist per member-day. A higher revision replaces the same adjustment and recalculates its affected range. Locked attendance is not rewritten—existing payroll adjustment behavior applies.

Governance and internal notification

How to map actions without surprises

1. Read before creating

When the flow could be retried, begin with Get Record or Find Records. For the permit example, find an open Inspection Cases record whose source application ID matches the permit. If one exists, update or notify that case. If none exists and the decision condition is true, create exactly one new case.

2. Keep correlation values

When one action creates a record, task, epic, form session, file, or response that a later action must use, retain its returned ID and relate it to the source case. That relationship is what makes a wait, update, or response action safe later.

3. Separate machine work from human decisions

Use an action to assemble data, create a task, or wait for a form action. Do not use Execute Task Action, Execute Epic Action, Execute Form Action, or Execute Entity Action to skip a decision that policy assigns to a person or role.

4. Make response actions paired and bounded

Return Form Response belongs with On Form Call; Return Dashboard Widget Response belongs with On Dashboard Widget Call. Define the expected JSON fields before building, return only that schema, and test missing input, no-result, and error cases separately.

Detailed workflow patterns

Pattern: intake to inspection without duplicates

  1. Start with Record Changes on Permit Applications.
  2. Confirm that the status just became Ready for inspection and that the application contains the required locality and address.
  3. Use Find Records to look for an open inspection case related to the application.
  4. If none exists, use Create Record to create one Inspection Cases record with the source application relationship, locality, status, and accountable unit.
  5. Use Create Task for the field-inspection team and Send Notification to its scoped coordinator.
  6. Store or expose the created case ID so a reviewer can trace the result from the application.

Pattern: wait for a human decision, then produce a document

  1. Start with On Form Action when a case is submitted for decision.
  2. Use Wait For Form Signature or Wait For Form Action for the actual approved decision point.
  3. Confirm the accepted decision and the required signed path.
  4. Use Word Template with only the approved fields.
  5. Optionally use Word to PDF, then update the case record with the generated artifact reference.
  6. Notify the accountable service owner inside KayanOS.

Pattern: serve a dashboard response

  1. Start with On Dashboard Widget Call.
  2. Validate its mode and input against the user’s permitted service scope.
  3. Use Find Records to retrieve only the necessary aggregates or records.
  4. Shape the result into the documented JSON schema.
  5. Finish with Return Dashboard Widget Response.

Test each action in the right order

Use one approved non-production record and perform these checks:
  1. Trigger test: verify the source event and expected data.
  2. Read test: verify that lookup actions find the intended record set.
  3. Write test: create or update one clearly identified non-production target.
  4. Wait/execute test: confirm that the exact task, epic, form session, or entity action is correlated correctly.
  5. Notification/response test: verify the recipient or returned payload without using a real citizen, external recipient, or production role scope.
  6. Review: locate the result in KayanOS and record its ID, owner, and outcome.
Do not put a write, execution, role-update, document-generation, or notification action directly after an unfiltered event. Make the condition and the resulting target explicit first.
KayanOS Automations action configuration for a controlled internal follow-up.

Continue building