Prerequisite for next experience resource management

JayanthiHCL
Tera Contributor

Prerequisite for next experience resource management

 

1. We use custom app for HR - so we installed plugin for employee profile

but we need start and end date  - how do we populate from sys user to emp profile table

2.  so for primary attribute how do we populate 

 

any best practice or recommendation

 

 

 

2 REPLIES 2

Marcos Gianoni
Giga Expert

 

1. Getting sn_employee_profile records from sys_user

1.1. Understand what the Employee Profile plugin gives you

When you activate Employee Profile (sn_employee), you get the table:

  • Table: sn_employee_profile

  • Key fields (for SPM):

    • user → reference to sys_user

    • employment_start_date

    • employment_end_date

The plugin exists specifically to expose employment start/end date outside HRSD so other apps such as SPM can use them. ServiceNow+1

1.2. Create Employee Definitions based on sys_user

Even if you use a custom HR app, SPM expects you to generate Employee Profiles using an Employee Definition:

  1. Navigate to All → Employee Profile → Employee Definitions.

  2. Click New and set:

    • Table = User (this means “use sys_user as the source”).

    • Add a filter that defines who is a “resource” (for example, users with the pps_resource role, or a custom HR flag).

    • Set Active = true and Save.

From this definition you then:

  1. Click Generate Employee Profiles (related link on the definition).
    This creates one sn_employee_profile record per matching sys_user. ServiceNow+2ServiceNow+2

This step is the supported way to link sys_user to Employee Profile for Resource Management / Capacity Planning.


2. Populating Employment Start / End Date

There is no out-of-the-box mapping from sys_user to employment dates, because sys_user does not normally carry these fields. The Employee Profile plugin is meant to be the place where these dates live. ServiceNow+1

Given your custom HR app, the pattern is:

2.1. Decide the system of record

  • If your custom HR app already has employment start/end:

    • Treat that table (or sys_user custom fields) as system of record.

    • Push values into sn_employee_profile.employment_start_date / .employment_end_date.

2.2. Minimal technical options

Option A – Flow Designer (recommended, low-code)

  1. Add custom date fields to sys_user (if not already there):

    • u_employment_start_date

    • u_employment_end_date

  2. Create a Flow:

    • Trigger:

      • Table = sys_user

      • When = Created or Updated

      • Condition = changes to u_employment_start_date or u_employment_end_date.

    • Actions (pseudo):

      1. Lookup Record on sn_employee_profile where user = current.sys_id.

      2. If found, Update Record:

        • employment_start_date = current.u_employment_start_date

        • employment_end_date = current.u_employment_end_date

      3. If not found (edge cases), you can create a new Employee Profile record, but normally the definition/“Generate Employee Profiles” step should have created it.

Option C – One-time backfill

For existing users, run a Background Script / Fix Script that loops through sys_user with employment data and updates sn_employee_profile accordingly.

Best practice:
Keep employment dates authoritative in one place (your HR app / sys_user custom fields) and push them into Employee Profile. Do not maintain conflicting values in both tables.

Capacity generation for SPM in Next Experience uses the Employee Profile table and its employment dates as one of the drivers for capacity. ServiceNow+1


3. Populating Primary Attributes (group / role / skill)

In Resource Management (Next Experience), planning attributes (Group, Role, Skill, etc.) and primary attributes on Employee Profile are the core of attribute-based planning. ServiceNow+3ServiceNow+3ServiceNow+3

3.1. Configure planning attributes

  1. Go to All → Strategic Planning → Planning Attributes.

  2. Ensure you have at least the OOB resource-type attributes enabled:

    • Group

    • Role

    • Skill

  3. For each attribute:

    • Attribute type = Resource.

    • Attribute table = sn_employee_profile.

    • Attribute field = the corresponding field on Employee Profile (or a dot-walk from it, max one hop). Scribd+2ServiceNow+2

Note: If you need extra attributes (Location, Employee Type, etc.), add the field to sn_employee_profile or a referenced table and configure it as a planning attribute.

3.2. Make sure the resource metadata exists

Primary attributes are derived from:

  • Resource group memberships, roles, and skills attached to the user/resource.

  • Those are interpreted via the planning attribute configuration.

If a user has no group/role/skill data, the system cannot populate primary attributes automatically.

3.3. Standard ways to populate primary attributes

There are two supported mechanisms:

  1. Scheduled job – bulk update

    • Navigate to All → System Definition → Scheduled Jobs.

    • Search for “Populate primary attributes for all resources”.

    • Run or schedule this job.

    This job populates on sn_employee_profile:

    • primary_resource_group

    • primary_resource_role

    • primary_resource_skill

    …using the underlying group / role / skill mapping for each user. It works when the user has only one value for each attribute (one group, one role, one skill). ServiceNow+3ServiceNow+3ServiceNow+3

  2. Related link – per employee

    • Open an Employee Profile record (sn_employee_profile).

    • Use the related link “Populate primary resource attributes”.

    This performs the same logic but only for that record. ServiceNow+2ServiceNow+2

  3. Manual override for complex cases

    If a user belongs to multiple groups / roles / skills, the system cannot infer which is primary, so you must:

    • Open the Employee Profile.

    • Set Primary Resource Group, Primary Resource Role, Primary Resource Skill manually.

    This is explicitly called out in the capacity-planning and attribute-planning articles. ServiceNow+2ServiceNow+2


4. Suggested “end-to-end” setup for your scenario

Putting everything together for Next Experience Resource Management with a custom HR app:

  1. Plugins & apps

  2. Employee Profiles

    • Define Employee Definition (table = User, filter = “employees/resources”).

    • Click Generate Employee Profiles.

  3. Employment dates

    • Decide where start/end dates live (custom HR table or sys_user custom fields).

    • Build Flow Designer or Business Rules to copy these values into sn_employee_profile.employment_start_date / employment_end_date.

  4. Planning attributes

    • Configure planning attributes (Group, Role, Skill, plus any custom) against sn_employee_profile.

    • Ensure the underlying group / role / skill assignments exist for each resource.

  5. Primary attributes

    • Run Populate primary attributes for all resources job initially and on a schedule (daily is common).

    • Use “Populate primary resource attributes” or manual edits for edge cases (multiple groups/roles/skills).

  6. Capacity & Resource Management

    • After Employee Profiles and primary attributes are populated, enable Capacity Planning / Resource Management Workspace. Capacity generation then uses Employee Profile + planning attributes + schedules. ServiceNow+2ServiceNow+2


5. What you might want to look at next

Official docs / articles to review

Related questions you may want to ask next

  • How to design Employee Definitions when you have multiple companies / domains?

  • How to add a new planning attribute (for example “Employee Type”) and use it in Resource Management Workspace?

  • How to handle role or group changes (new hire, transfer) and keep Employee Profiles + primary attributes in sync automatically?


If this answer helped you, please like this comment.
And please mark this response as the accepted solution so it can help other users.

 
 
 

 

 

MaxMixali
Kilo Sage

Transform Maps (Best for Bulk Initial Load)

Best for: One-time migration or periodic bulk updates from external HR system

When to use:

  • Initial data population from sys_user to employee profile
  • Periodic imports from external HR system
  • Large volume updates (100+ records)

How it works:

  • Navigate to: System Import Sets > Create Transform Map
  • Source table: sys_user or staging table
  • Target table: sn_hr_core_profile (or your employee profile table)
  • Map fields:
    • sys_user.hire_date → sn_hr_core_profile.start_date
    • sys_user.u_termination_date → sn_hr_core_profile.end_date
    • sys_user.sys_id → sn_hr_core_profile.user (relationship field)

Best practice:

  • Always use coalesce field (typically user field pointing to sys_user)
  • This ensures updates rather than duplicates
  • Add data validation in transform scripts if needed

 

 

Populating Primary Attributes

Understanding Primary Attributes

In Employee Profile context, "primary attributes" typically include:

  • Primary assignment/job
  • Primary location
  • Primary department
  • Primary manager
  • Primary cost center

Data Sources and Mapping

From sys_user to Employee Profile:

sys_user Field Employee Profile Field Notes
locationprimary_locationDirect reference
departmentprimary_departmentDirect reference
managerprimary_managerDirect reference
cost_centerprimary_cost_centerMay need custom field
titleprimary_job_titleMay need mapping to job catalog
companyprimary_companyDirect reference

Challenge: Job/Assignment Structure

Important distinction:

sys_user has: Single role/title (flat structure)

Employee Profile expects: Proper assignment/job structure with:

  • Job profile (from job catalog)
  • Assignment record
  • Potentially multiple assignments with one marked as primary

Approaches for Primary Attributes

Approach 1: Direct Field Mapping (Simple)

Best for: Organizations with simple HR structures

Implementation:

  • Map sys_user fields directly to employee profile "primary" fields
  • No assignment/job complexity
  • Quick to implement

Steps:

  1. Identify which fields are "primary" in your employee profile table
  2. Create transform map or Business Rule
  3. Map directly: sys_user.location → employee_profile.primary_location

Limitation:

  • Doesn't support multiple assignments
  • May not align with full Employee Profile data model
  • Limited for organizations planning to expand HR functionality