top of page

Talk to a Solutions Architect — Get a 1-Page Build Plan

How Machine Learning Classifies and Routes Business Correspondence

Writer: Staff Desk
Staff Desk
57 minutes ago
5 min read
Eyeglasses on a laptop reflect a dark coding workspace with colorful code and app windows on screen.

 

Invoices, contracts and general project information are likely to come through to a team's inbox at close intervals.


While these all come through as email, they require different people and processes to deal with them and potentially be filed in different locations.


Time spent manually triaging these emails detracts from the time available to address the content of each message. By applying machine learning to classify the subject of emails, this first step can be automated, and an action taken to route the message to the appropriate person or destination.

What you’ll learn:

● How machine learning recognises email topics

● Turning an email category into a route

● How to bulk save emails without losing context

● Why automatic classification makes mistakes

● Testing the workflow before rolling it out

● Wrapping it up


How machine learning recognises email topics

Rules can be applied to email in the inbox to take automatic action. For example, route all emails from a given sender to a specific folder, or forward to another user if the subject contains certain keywords.

However, if that sender or keyword is changed, these rules won't pick it up and the email will require manual intervention.


By applying ML to the text of emails, it can identify these variations and predict the subject of the message, using a set of pre-labelled examples to learn from. It may consider a number of elements of the email depending on how it's configured and the permissions applied.


Classifiers can be configured to return a single or multiple predicted subject(s), which may be appropriate depending on the message content and downstream process.

In Microsoft's June 2025 analysis of Microsoft 365 activity, the average worker received 117 emails daily. Even at that volume, a classifier only predicts the topic of each message; a separate workflow decides what happens next.


Turning an email category into a route

Having determined the subject of the email, routing rules can direct the message to the appropriate person or record location. For example, invoices can go to finance, new contracts to legal and project updates to their project records.


The key here is to distinguish between the email being classified and then being routed. The ML can perform one or both of these tasks, but it isn't a requirement that it does both.

As part of this route, you may want to save emails to SharePoint for onward storage, using the email's predicted subject to guide the user to the relevant location. This would then be a separate action to classifying and routing the email, but could be included within the same workflow.


In addition to routing the email based on its predicted subject, further checks may be applied to determine access to the email, whether it requires sign-off to action the route and how to proceed if the confidence of the prediction falls below a certain level.

Business rules should decide what happens to each email type, including whether the message needs to be stored. For example, a 'Contract' may need to be routed for review and sign-off, or it may simply be for information and therefore require filing with relevant records. It's also good practice to track the route of an email to allow for corrections if required.

How to bulk save emails without losing context

Alongside managing the volume of new emails received, there may be a desire to file existing emails with related records. Before doing so, you should determine the appropriate grouping for the emails to be saved, rather than simply the email recipient. You'll also want to ensure that the relevant metadata is captured and remains searchable, depending on the format and configuration used to store the email.


If you want to retain email chains, consider whether individual emails, the thread or a combination of both will meet the business requirements. The metadata can be stored as additional columns in a SharePoint list or library, or within the content type definition, allowing emails to be organised and found using these details, without having to navigate through many nested folders.


As an example, if a team has a backlog of emails from a supplier that need to be filed against projects, they can be classified to separate out 'Purchase orders for approval' from general project correspondence. The output of the classifier can then be reviewed by the user to confirm, after which the emails can be filed to the appropriate libraries.

Once this is complete, samples of emails should be reviewed to confirm the classification was as expected, and the resulting files checked for completeness and appropriate access permissions. Completing the migration in bulk does not guarantee that the emails have been classified accurately.


Why automatic classification makes mistakes

The quality of the predictions made by the ML will be influenced by the input data it has learnt from, which may have inconsistencies or be ambiguous in their labels.

Users may tag the same type of email with different subjects, resulting in a broad classification or multiple subjects that could cause confusion for the ML to learn from.

If an email thread is required to understand the message or if the content of interest is in an attachment, this may not be identifiable by the classifier unless specifically catered for.

Finally, a mis-classification can occur even when the ML returns a high-confidence prediction.

Depending on the impact of the mis-classification, this could be minor to significant. You should therefore include provisions to review emails where the prediction falls below a confidence threshold, or where the classification warrants sign-off by a member of staff. Access controls should also be applied to ensure that the email isn't viewable by those without permission, irrespective of the subject.


Note that the route of the email and where it is filed may also inform the retention period to be applied to the file, so should be considered in the business process.


Testing the workflow before rolling it out

Rather than attempting to classify and route all incoming emails, begin with one or a small number of subjects and apply to a specific team inbox to trial the process.


The following is a suggested approach:

1. Define a series of subjects to classify, ensuring they are well-understood and can be succinctly explained with a residual category for all others

2. Assemble a set of example emails to train the classifier against, ensuring they have been correctly labelled by subject

3. Evaluate the classifier's performance on a set of emails not used for training, to include a range of subjects, wording and edge-cases

4. Assess that the email is correctly outed or filed, including retaining its metadata and access controls


While you may be able to measure an overall percentage of correctly classified emails, focus on the instances that will create further workload or risk and assess if this is acceptable. For example, an urgent contract email may be missed by the classifier and require further manual intervention to locate, versus mis-classifying 'Payment received' as 'Invoice'.

Users should also be able to correct an email's predicted category if mis-classified and record the reason, which can feed back into improving the training examples, routing rules or both. Those corrections will improve predictions only if the model is retrained using the updated examples.


Once satisfied with the initial process, it can then be applied to further email types and teams and expanded to classify more subjects, provided that the root cause of any mis-classifications can be remediated.


Wrapping it up

Applying ML to classify the subject of emails can be beneficial, but requires a clear process to be defined for how the email is then to be routed, filed or both, with metadata retained to enable searchability and appropriate access controls applied.


Take time to define your subjects, ensure the process is piloted and monitored, and involve the end-users to review and correct the output of the classifier where necessary.

 

 
 
 

Comments


bottom of page