diff --git a/Server-Side Components/Server Side/Email Bounce Alert System/Email_Bounce_Alert_System.js b/Server-Side Components/Server Side/Email Bounce Alert System/Email_Bounce_Alert_System.js index ba1622cc20..6be8345703 100644 --- a/Server-Side Components/Server Side/Email Bounce Alert System/Email_Bounce_Alert_System.js +++ b/Server-Side Components/Server Side/Email Bounce Alert System/Email_Bounce_Alert_System.js @@ -27,6 +27,14 @@ // --- Step 2: Convert the email body into plain text --- var body = current.body.toString().replaceAll('"', ''); + (function execute(inputs, outputs) { + var inc = new GlideRecord('incident'); + if (inc.get(inputs.incident_sys_id) && inc.priority == 1) { + gs.eventQueue('incident.high_priority', inc, inc.caller_id, 'High priority incident detected'); + } +})(inputs, outputs); + + // --- Step 3: Extract email addresses from the content --- var extractedEmails = extractEmails(body); diff --git a/auto_assign_category.js b/auto_assign_category.js new file mode 100644 index 0000000000..a7c8881b12 --- /dev/null +++ b/auto_assign_category.js @@ -0,0 +1,17 @@ +// Auto-assign incident to groups based on category +(function execute(inputs, outputs) { + var inc = new GlideRecord('incident'); + if (inc.get(inputs.incident_sys_id)) { + switch(inc.category) { + case 'Network': + inc.assignment_group = 'Network Support'; + break; + case 'Software': + inc.assignment_group = 'Software Support'; + break; + default: + inc.assignment_group = 'Helpdesk'; + } + inc.update(); + } +})(inputs, outputs);