From 1f49bf7e1dcbf46757606838ea24430e0021dbcf Mon Sep 17 00:00:00 2001 From: Varshitha Date: Wed, 22 Oct 2025 23:19:04 +0530 Subject: [PATCH] Create auto_assign_category.js Add auto-assign incident by category script --- auto_assign_category.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 auto_assign_category.js 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);