Need Scheduled import for sys_user table with external HR app data

rajibosss11
Tera Contributor

When an HR person marks an employee as terminated in the HR app, it should be reflected in the ServiceNow User table via a scheduled daily import.

I have created Schedule Import ,Data source , transform MAP

 

I have added the Active field and marked users as Inactive based on the imported data. Please review the script and procedure to ensure everything is correct. If any changes are needed, kindly suggest where the script or steps should be updated.

 

please share any example for this 

1 ACCEPTED SOLUTION

Periyasamy P
Tera Guru

As per field map.jpg, column "sys_import_state"  is not part of your staging table "imp_user". Please use right column in your field map.

View solution in original post

5 REPLIES 5

jlaps
Kilo Sage

I would not directly change the inactive field on sys_user based on HR report ingestion. Instead, I would create a new date (datetime maybe) field on sys_user for "HR Set Termination Date". Then have a scheduled job that runs after the HR report that checks against that date, and then does the account inactivation (or offboard request, etc).

 

This way you have a record of when HR said a user was termed, can check the audit log for history on the date field if HR changes it on you (rescinded terminations for example), and can explain why or why not a user was marked inactive. As noted above, you have no code or screenshots to review.