Skip to content

Time & Attendance schema

Current data contract for Time, Attendance, Leave Management, and Shift Management's ServiceNow-side tables, read directly from nova-timenattend-sn-app's live fluent dictionary (sn_app/nova_src/fluent/dictionary/*.now.ts) on main. Reverse-engineered per the 2026-08-07 decision retiring schema/pending/ — goes directly here with status: applied, since this reflects real, committed, shipped code, not a proposal. This is the first schema content in this repo — bootstrap of specs-time-attendance's schema/ folder.

Workers' Comp (claim/incident intake), named in this domain's topology scope, has no corresponding tables in the live code — nothing in this pass covers it; treat that as a gap, not an omission from this doc. Every table carries sys_domain (ServiceNow Domain Separation) — omitted from the entity blocks below for readability.

Diagram

erDiagram
    AttendanceDay }o--|| CorehrPerson : "worker (cross-repo)"
    AttendanceDay }o--|| ShiftAssignment : "shift_assignment"
    AttendanceDay }o--|| LeaveRequest : "leave_request"
    AttendanceRequest }o--|| CorehrPerson : "worker (cross-repo)"
    AttendanceRequest }o--|| AttendanceDay : "attendance_day"
    AttendanceTransaction }o--|| CorehrPerson : "worker (cross-repo)"
    AttendanceTransaction }o--|| AttendanceDay : "attendance_day"
    AttendanceViolation }o--|| CorehrPerson : "worker / resolved_by (cross-repo)"
    AttendanceViolation }o--|| AttendanceDay : "attendance_day"
    LeaveBalance }o--|| CorehrPerson : "user (cross-repo)"
    LeaveBalance }o--|| LeaveType : "leave_type"
    LeaveLedger }o--|| CorehrPerson : "user (cross-repo)"
    LeaveLedger }o--|| LeaveType : "leave_type"
    LeaveLedger }o--|| LeaveRequest : "leave_request"
    LeaveRequest }o--|| CorehrPerson : "request_for (cross-repo)"
    LeaveRequest }o--|| LeaveType : "val_leave_type"
    LeaveRequest ||--|| Task : "extends (platform native)"
    LeavePolicy }o--|| LeaveType : "leave_type"
    ShiftAssignment }o--|| CorehrPerson : "worker / assigned_by (cross-repo)"
    ShiftAssignment }o--|| ShiftTemplate : "shift_template"
    ShiftAssignment }o--|| ShiftCalendar : "shift_calendar"
    ShiftCoverageRule }o--|| ShiftTemplate : "shift_template"
    ShiftCoverageRule }o--|| CorehrJobProfile : "coverage_by_role (cross-repo)"
    ShiftRequest }o--|| CorehrPerson : "worker (cross-repo)"
    ShiftRequest }o--|| ShiftTemplate : "requested_shift / target_shift"
    HolidayCalendarDate }o--|| HolidayCalendar : "holiday_calendar_id"
    TnaTransactionInstance ||--|| PlatformTransactionInstance : "extends (cross-repo)"
    TnaTasks ||--|| SuperagentTasks : "extends (cross-repo)"

    AttendanceDay {
        ref worker
        date date
        ref shift_assignment
        string status
        datetime check_in
        datetime check_out
        decimal hours_worked
        decimal overtime_hours
        ref leave_request
    }

    AttendanceRequest {
        ref worker
        string request_type
        date date
        datetime requested_check_in
        datetime requested_check_out
        string reason
        string status
        ref attendance_day
    }

    AttendanceTransaction {
        ref worker
        ref attendance_day
        string transaction_type
        decimal hours
        string earnings_code
        date processed_date
        string source
    }

    AttendanceViolation {
        ref worker
        ref attendance_day
        string violation_type
        string description
        string severity
        string status
        ref resolved_by
    }

    LeaveBalance {
        ref user
        ref leave_type
        decimal available
        decimal balance
        decimal accrued
        decimal allocated
        decimal used
        decimal carry_forward_in
        decimal carry_forward_out
        string unit
        datetime cycle_start
        datetime cycle_end
    }

    LeaveLedger {
        ref user
        ref leave_type
        ref leave_request
        datetime ledger_date
        string type
        string unit
        decimal value
        string state
    }

    LeaveType {
        string name
        string code
        string category
        string unit
        boolean is_accruable
        decimal min_units_per_request
        decimal max_units_per_request
        int minimum_approval_count
        string applicable_to_gender
        boolean active
    }

    LeavePolicy {
        ref leave_type
        string country
        date effective_from
        date effective_to
        ref policy_kb
        boolean requires_hr_approval
    }

    LeaveRequest {
        date start_date
        date end_date
        string requested_unit
        decimal requested_value
        string state
        string reason
        string agent_process_id
        ref val_leave_type
        ref request_for
    }

    ShiftAssignment {
        ref worker
        ref shift_template
        ref shift_calendar
        date assigned_date
        string status
        ref assigned_by
    }

    ShiftCalendar {
        string name
        ref location
        ref department
        ref coverage_rule
        date valid_from
        date valid_to
        boolean is_active
        boolean is_published
    }

    ShiftCoverageRule {
        string name
        ref shift_template
        ref coverage_by_role
        int min_headcount
        int max_headcount
        date effective_from
        date effective_to
    }

    ShiftRequest {
        ref worker
        string request_type
        ref requested_shift
        ref target_shift
        date requested_date
        string reason
        string status
    }

    ShiftTemplate {
        string name
        string shift_type
        string start_time
        string end_time
        int break_duration
        ref location
        ref department
    }

    HolidayCalendar {
        string name
        int year
        string country
        ref location
        string timezone
        boolean is_active
    }

    HolidayCalendarDate {
        ref holiday_calendar_id
        date holiday_date
        string holiday_name
        string holiday_type
        boolean is_paid
    }

Also present, not diagrammed (config/infra tables rather than domain entities): x_novaw_tna_event_queue (own event queue, separate from x_novaw_tna_transaction_instance), x_novaw_tna_field_mapping (extends sys_metadata), x_novaw_tna_validation_scripts (extends sys_metadata, references a x_novaw_tna_transaction_configuration table not found in this repo's dictionary export — see Open items).

Cross-repo dependencies

  • Nearly every domain entity's worker/user/request_for/assigned_by/ resolved_by field → x_novaw_corehcm_person (not x_novaw_corehcm_worker — this domain references Person directly, unlike EDM/Onboarding/Compensation which reference Worker; worth confirming this is deliberate).
  • ShiftCoverageRule.coverage_by_rolex_novaw_corehcm_job_profile.
  • x_novaw_tna_transaction_instance extends x_novaw_platform_transaction_instance (Platform domain — see specs-platform/schema/platform-schema.md).
  • x_novaw_tna_tasks extends x_novaw_superagent_tasks (specs-superagent dependency, outside this bootstrap's three-repo scope — specs-superagent already exists).
  • ShiftCalendar/ShiftTemplate.location → native cmn_location; .department → native cmn_department; LeavePolicy.policy_kb → native kb_knowledge (all platform/global ServiceNow tables, not Novaworks-owned).

The Person-vs-Worker reference choice above is the one finding here that's genuinely worth a second look before treating this schema as fully settled — every other -sn-app repo checked in this pass references Worker, not Person, for the same "which employee is this record about" role.

Discrepancies vs. github-private's component KB

github-private/docs/profile/repos/nova-timenattend-sn-app/tables.md lists 14 tables; live code has 21. Entirely missing from tables.md: x_novaw_tna_attendance_transaction, x_novaw_tna_attendance_violation, x_novaw_tna_shift_assignment, x_novaw_tna_shift_calendar, x_novaw_tna_shift_coverage_rule, x_novaw_tna_shift_template, x_novaw_tna_validation_scripts — the entire Shift Management sub-domain is undocumented there. Several tables that are listed have partial field sets relative to code (LeaveType, LeavePolicy, LeaveLedger, EventQueue, HolidayCalendar, HolidayCalendarDate, FieldMapping all have fields in code not mentioned in tables.md). LeavePolicy.notes (per tables.md) doesn't exist in code — actual fields are country/effective_from/ policy_kb/requires_hr_approval.

Open items

  • x_novaw_tna_validation_scripts.transaction_id references x_novaw_tna_transaction_configuration — that table wasn't found anywhere in this repo's dictionary export. Confirm whether it's defined elsewhere in the codebase (e.g. generated/config files not checked in this pass) or the reference is stale.
  • Confirm the Person-vs-Worker reference choice noted above.
  • No table found for Workers' Comp (claim/incident intake) — in scope per this domain's topology entry, but nothing in nova-timenattend-sn-app covers it. Either it lives in a different, not-yet-identified repo, or it genuinely hasn't been built yet.