What This Table Is

The ua_task table is the backbone of ServiceNow's HR Service Delivery (HRSD) module, storing all HR case records that employees create for HR-related requests, issues, and services. This includes everything from benefits inquiries and time-off requests to payroll questions and workplace accommodation requests. Each record represents a single HR interaction that needs tracking, assignment, and resolution through the HR department.

The table extends task, inheriting all standard task fields and behaviors while adding HR-specific fields like hr_service, employee, and hr_profile. The HRSD module owns this table and uses it to support the complete HR case lifecycle from initial employee request through HR agent assignment, investigation, and resolution. Unlike standard task records, HR cases often trigger complex workflows involving multiple HR systems and require specialized security controls for sensitive employee data.

Several tables extend ua_task for specific HR service types, including time-off requests (ua_time_off_request), benefits enrollments, and document requests. This creates a hierarchy where general HR cases use ua_task directly, while specialized requests use child tables with additional fields. The table integrations heavily with hr_profile and sys_user to maintain employee context throughout the case lifecycle.

Large enterprises typically see 50,000-200,000+ HR cases annually, making query performance critical. The table includes specialized indexes for employee and hr_service fields, but queries combining multiple reference fields can still be expensive. Record retention policies vary widely - some organizations purge closed cases after 7 years for compliance, while others maintain indefinite history for trend analysis and regulatory requirements.

When You'll Script Against This Table

You'll most commonly script against ua_task in Business Rules that automate HR case workflows - auto-assigning cases based on HR service type, sending notifications to managers for certain request types, or integrating with external HR systems when cases reach specific states. Transform Maps also frequently target this table when importing case data from legacy HR systems or external portals. Script Includes commonly query this table for HR dashboard data, SLA calculations, and custom HR reporting that spans multiple case types.

Access to ua_task is controlled by the sn_hr_core.hr_admin and sn_hr_core.hr_agent roles for full access, with employee self-service limited to their own records through record-level ACLs. Scripts running in the global scope have full table access, but scoped applications need explicit role grants or elevated privileges to read/write HR case data due to the sensitive nature of employee information.

Common scripting patterns:

  • Auto-assigning cases to HR teams based on hr_service category and employee location
  • Calculating SLA targets based on case urgency and HR service level agreements
  • Synchronizing case data with external HRIS systems when cases transition to specific states
  • Generating custom notifications to employee managers for approval-required requests
  • Building HR metrics dashboards that aggregate case volumes by service type and resolution time
  • Creating audit trails for sensitive HR cases that require compliance documentation
  • Implementing escalation rules for overdue cases based on employee hierarchy and case priority

Table Gotchas

⚠️

The employee field is NOT the same as opened_by. Employee represents who the case is about, while opened_by is who created the case. HR agents often create cases on behalf of employees, making this distinction critical for proper case routing and permissions.

⚠️

State field behavior differs from standard task states. HR cases use custom state values like 'Pending Employee', 'Pending Approval', and 'Information Needed' that don't map to standard task workflow states. Always check the choice list values rather than assuming standard task states apply.

  • The hr_profile reference can be null for terminated employees, causing reference field queries to miss historical cases unless you account for this
  • Queries filtering by employee.department are expensive - use hr_profile.department instead as it's indexed specifically for HR queries
⚠️

Record-level security is aggressive on this table. Even with table read rights, you may only see cases where you're the employee, opener, or assigned agent. Test your queries with different user contexts to ensure they return expected results.

  • The hr_service field uses a complex reference qualifier that filters based on employee location and department - direct assignment may fail validation
  • Business Rules on task will fire for HR cases too - use table conditions carefully to avoid unintended side effects on HR workflows
Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime

The parent task table provides all the foundational workflow fields like state, assigned_to, and assignment_group, along with the complete task SLA and approval frameworks. The hr_profile table is the most critical relationship, containing comprehensive employee data including department, location, manager hierarchy, and employment status. Most HR case business logic queries both tables together to access complete employee context for routing and approval decisions.

The hr_service_catalog table defines available HR services and their configuration, while sys_user provides basic user information for both employees and HR agents. The sys_user_group table is frequently joined for assignment group routing, especially when cases need to route to location-specific HR teams. The task_sla table tracks HR case SLA performance, which is critical for HR service level reporting and escalation workflows.

Child tables like ua_time_off_request extend ua_task for specialized HR request types, requiring developers to understand the table hierarchy when building comprehensive HR reports. The sys_attachment table is also commonly referenced since many HR cases require document uploads for processing requests like benefits enrollment or policy exception requests.