Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Requirements

  • many-to-one assignment (one assignment group can have many email addresses)
  • should not have to edit code to add/update/delete queue mail aliases
  • should ignore Cc: address list

Proposal

  • create a related table under Assignment Groups for Mail Aliases
  • modify the Create Incident inbound action script to use the new table to match To: address to Assignment Group

Steps

  • 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 -- expose headers and text in description (just for PoC)
    // current.description = email.headers + email.body_text;
    
    // bw -- find assignmentassigment 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;
    }
    


...the table can be permissioned as appropriate (probably fine to restrict it to admin). Might be nice to restrict the u_email field to be unique, but that's just icing since it's enforceable manually by any reasonable admin.

Configuring aliases in the running system

The mail alias binding to groups happens at the Group level in Administration controls. Click a group, and then bottom of the dialogue page contains a tab called "Group Email Alias".

To configure a new alias for the first time, somebody needs to open a Service Request to YSS Client Accounts and make a request to bounce the mail to servicenow@bulldogs.yale.edu

When YSS completes their work, and the alias is configured for the appropriate SN group, the email intake will auto-assign to the appropriate group.

Incident Draft