Setting priority based on VIP flag

Alex Saager1
Tera Contributor

My organisation want to set priorities for users logging incidents based on VIP flags all from the service portal. 

This is our current form for creating incidents:

find_real_file.png

 

Now is it possible in the back end to say set a default priority to 2 for VIP users and have non VIP's as 3?

Any help for guidance on this would be appriciated.

Alex

1 ACCEPTED SOLUTION

Hi,

do you want to check the user selected in Open on behalf of this user is VIP or not?

if yes then you can do this

if(producer.variableName.vip == true){
	current.priority = 2;
}
else{
	current.priority = 3;
}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Vishnu Prasad K
Giga Guru

Hi Alex,

 

Yes it is pretty much possible. Create a BR that will run when before an incident is created. Check if the VIP checkbox of caller is checked to true and if yes set the value of priority to P2 and if not set the value as P3.

 

var vip = current.getValue(caller.vip);

if (vip == true){

current.setValue('priority' , 2);

}

else{

current.setValue('priority' , 3);

}

Abhijit4
Mega Sage

Hi Alex,

You can use solution provided by Vishnu. However, most of the organizations have multiple external tools creating incident in SNOW through integration, if that is the case with you then please add gs.isInteractive() condition in BR.

Let me know if you need help further.

Please mark this as Correct or Helpful based on the impact.

Thanks and Regards,
Abhijit
Community Rising Star 2022

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I assume your above form is a record producer

in that case yes you can use record producer script itself

But basically Priority is calculated OOB based on matrix and it depends on Impact + Urgency

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

That's correct, yes its a record producer.

I'm not familiar with scripting in the platform so is there somewhere I can find what I need to add to the record producer script?

I assume based on what your saying its not as easy as saying:

If user is VIP set priority to 2 else set to 3 (but in scripting language)