How do agents handle the creation of new users in ServiceNow?

kristenmkar
Mega Sage

When Service Desk agents are taking inquiries from callers, there may be a situation where the caller does not yet exist. When using the Service Operations Workspace, the caller field pulls from the User table (sys_user).  Our Service Desk agents utilize the itil role.  What is the correct procedure for creating a new caller if they do not exist in User OOTB? 

 

And that being said - we have internal and external customers - is SOW appropriate to use? Or should we utilize CSM? Or is there an elevated role that the agent could use to create a user? 

 

Thank you! 

5 REPLIES 5

Brian Lancaster
Tera Sage

You could use the user_admin role to create users. Since you have external users you should be paying for CSM licensing anyway so you might as well use that as well.

So from an agent standpoint, even with the proper role, should a UI action be created to create users in SOW? Right now I don't see anything out of the box. Or just stick try to utilize CSM?

Looks like if you are not using CSM you would need to utilize a UI Action to create new users as when you click on the magnifying glass next to call there is no new button. What you really need is a way to know you customer base without having to manually create them. For internal users you could use a MID Server and LDAP integration. For external users if you have CSM there are integrations with CRM like Salesforce that will pull the users from CSM into ServiceNow.

Sumanth16
Kilo Patron

Hi @kristenmkar ,

 

Create UI Action with below script:

 

//create new user

 

var userGr = new GlideRecord('sys_user');
if (current.u_user_not_found == true) {//replace with your condition and field name
    userGr.newRecord();
    userGr.setValue('first_name', current.opened_for.first_name);
    userGr.setValue('last_name', current.opened_for.last_name);
    userGr.setValue('user_name', current.opened_for.email);
    userGr.setValue('u_employee_type', current.opened_for.u_employee_type);
    userGr.setValue('email', current.opened_for.email);
    userGr.setValue('title', current.opened_for.title);
    userGr.setValue('phone', current.opened_for.phone);
    userGr.setValue('u_syscom', current.opened_for.u_syscom);
    userGr.setValue('u_edipi', current.opened_for.u_edipi);
    userGr.setValue('u_ech_iii', current.opened_for.u_ech_iii);
    userGr.setValue('u_business_area', current.opened_for.u_business_area);
    userGr.setValue('u_org', current.opened_for.u_org);
    userGr.setValue('u_org_code', current.opened_for.u_org_code);
    userGr.setValue('u_org_code_title', current.opened_for.u_org_code_title);
    userGr.setValue('u_branch_of_service', current.opened_for.u_branch_of_service);
    userGr.setValue('u_command_location', current.opened_for.u_command_location);
    userGr.setValue('u_remote_user', current.opened_for.u_remote_user);
    userGr.setValue('location', current.opened_for.location);
    userGr.setValue('department', current.opened_for.department);
    var sysID = userGr.insert();  //store the sys_id
    current.opened_for = sysID; //assigning the newly created user record sys_id
    current.update(); //update the interaction record
} else {
    gs.addInfoMessage("You must check " + "'User Not Found' " + "to Create a New User or remove referenced user in Opened For field.");
}

If you find it helpful, please mark my answer as correct so that it can useful to others.

 

Thanks & Regards,
Sumanth Meda