How to Automatically set the Priority and Urgency = High for VIP Group Incidents

TStark
Kilo Sage

I would like to create a script to include in an Inbound Action that will set the Priority and Urgency to High if the incident is created by a user/member of the VIP Group.

Thanks in advance,
AJ

1 ACCEPTED SOLUTION

Harish Vaibhare
Kilo Guru

Hi,

write before insert business rule on incident table.

conditon: 

find_real_file.png

Write below code :

find_real_file.png

code: 

(function executeRule(current, previous /*null when async*/ ) {

// Add your code here

var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", current.caller_id);
gr.addQuery("vip", true);
gr.query();

if (gr.next()) {

current.impact = "1";
current.urgency = "1";
current.priority = "1";

}

})(current, previous);

 

Kindly mark helpful and correct if it works.

Thanks.

View solution in original post

7 REPLIES 7

Harish Vaibhare
Kilo Guru

Hi,

write before insert business rule on incident table.

conditon: 

find_real_file.png

Write below code :

find_real_file.png

code: 

(function executeRule(current, previous /*null when async*/ ) {

// Add your code here

var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", current.caller_id);
gr.addQuery("vip", true);
gr.query();

if (gr.next()) {

current.impact = "1";
current.urgency = "1";
current.priority = "1";

}

})(current, previous);

 

Kindly mark helpful and correct if it works.

Thanks.

Yes, I created a group (VIP), which includes all VIP members.

Thanks,
AJ

TStark
Kilo Sage

Thanks Harish,

Per your suggestion, using Business Rules is the best option because it addresses all different Contact Types as opposed to Inbound Actions which only addresses Contact Type of Email.


Thanks,
AJ