...
- create/populate table 'u_group_mail_aliases':
- u_email (string)
- u_group (reference to sys_user_group)
- update the Create Incident inbound action with something like this:
Code Block // bw -- find assignmentexpose headers and text in description (just for PoC) // current.description = email.headers + email.body_text; // bw -- find assigment group by doing a lookup in u_group_mail_aliases // first match wins! // loop through email.direct var addresses = email.direct.split(","); for (var i=0; i < addresses.length; i++) { var alias = new GlideRecord('u_group_mail_aliases'); alias.addQuery('u_email', '=', addresses[i]); alias.query(); current.description += "checked for " + addresses[i] + '\n'; current.description += "row count is " + alias.getRowCount() + '\n'; if (alias.getRowCount() > 0) { break; } } // if there was an alias match, use it to assign group if (alias.getRowCount() > 0) { // first alias.next();match wins! current.description += "matched on " + alias.u_group + '\n'alias.next(); current.assignment_group = alias.u_group; }
...