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);