Skip to main content
All CollectionsService Management
Creating cases with Mail Rules
Creating cases with Mail Rules

Information on Mail Rules and how to set them up

R
Written by Raymond Carrel
Updated over 10 months ago

The Mail Rules feature is an optional add-on for Mail Triage. It allows for the automatic creation of cases from incoming emails. It is particularly useful for business that handle high volumes of incoming mail.


Benefits of the Mail Rules feature

  • Profile-Based Email Routing: Automatically direct incoming emails to the right team or individual based on predefined profiles.

  • Advanced Email Parsing: Handle complex email scenarios. The feature identifies key elements in email subjects, bodies, and even attachments, without the need for intricate coding.

  • Customizable Email Rules: Gain control over how emails are categorised and handled in your system.

  • Enhanced Case and Asset Matching: Automatically categorise cases and match assets, ensuring that queries and issues are addressed by the right department or individual.

  • User-Friendly Interface: The setup experience requires no advanced technical skills, and replaces the need for manual scripts to be written.


Email filtering and matching

Emails can be filtered on the following elements:

  • Mailbox

  • "From" address

  • "To" address

  • Email subject text

  • Email body text

Filtered emails will then be matched to a customer record via one of the following elements:

  • Customer contact details

  • Customer asset details


Configuring mail rules

Mail rules are configured from Settings - Mail Rules.

Here you can view and edit any existing rules.

You can also create a New Mail Routing Rule or view the Mail Rules Log. The latter option acts as a history of mail routing operations.


Creating a new mail rule

This section details the creation of a new mail rule.

Click on the New Mail Routing Rule button in the Mail Rules area of Settings. The New Mail Routing Rule screen is shown below. Depending on selections you make, more options will become available.

General fields

These fields are common to all rules:

Email Rule Name

Enter a name for this mail rule.

Email Rule Type

There are three options here, covering the three operations that a mail rule can perform.

  • Ignore Email

    • An email that meets the conditions set will be exempt from any rules that run subsequently.

  • Create Case

    • Likely the most common rule. An email that meets the conditions set will result in the creation of a new case.

  • Close Case

    • An email that meets the conditions set will result in the closure of an existing case. Generally speaking, the case reference will be provided in the email in order to identify the case to be closed.

Sequence in Lists

All rules are given a sequence number. An incoming email will be evaluated against each rule in order, until it satisfies the requirements of one of them. Entering a sequence number lets you determine the order in which rules will be checked.

Token

Select a token that will be used to perform the case creation. The associated user account will show in audit history.


Rule Creation - Matching

The fields in the Matching section apply to all mail rules, though none of the fields are mandatory.

If an email matches all of the selections made, it will qualify for case creation, as long as a customer match can be made in the subsequent section.

Mailbox

If you have multiple mailboxes connected to The Layer, these will appear in the drop-down. You can filter here if you want a mail rule to only apply to specific ones.

From

This field lets you filter on the originating address for the email. By default, this can be a partial address. For example, you could enter @businessname.com to pick up emails from a specific customer or automated service.

The Exact Match checkbox lets you check for exact address matches instead.

To

This field lets you filter on the address to which the email was sent - for example, this could be a support inbox address.

Email Subject

This fields lets you specify a string that must appear in the subject for the mail rule to be actioned. This can be a partial match e.g. "error", "help".

Email Body

This fields lets you specify a string that must appear in the body for the mail rule to be actioned. This can also be a partial match.

Email Header

This fields lets you specify a string that must appear in the email header for the mail rule to be actioned. This can also be a partial match.


Rule Creation - Case Details (Case Creation)

For Case Create type rules, you must set a Case Category and Case Sub-Category for the case that will be created.


Rule Creation - Case Details (Case Closure)

The following settings are required in order to identify the case that will be closed.

Case Match Type

Currently, only Field is supported. This must be selected.

Core Field to Match

Subject

With this option, a string can be supplied within the email, and matched to existing case subjects in The Layer.

Body

With this option, a string can be supplied within the email, and matched to existing case descriptions in The Layer.

Case Reference

With this option, a case reference will be supplied within the email subject and matched to existing case references in The Layer. Any open cases found will be closed.

Start Tag / End Tag

Tags let you identify the string from the email that will be used to identify the case to be closed. See this section for more details.


Rule Creation - Customer Matching

For a case to be created from an email, we must be able to identify which customer the case should be raised against.

This can be done by matching email content to either customer contact data or asset data.

For example, we might match the sender's address to a customer contact. Alternatively, we might take an asset serial number from the email subject and match this to a customer asset.

For each mail rule you must populate either the Asset Matching or Contact Matching section.


Rule Creation - Asset Matching

The following fields are available for asset matching:

Asset Match Type

Here you will choose whether you'd like to match to an asset core Field or Custom Field.

Table Type

Here you must choose between which set of data you wish to match against - Customer Products or Customer Services.

Core / Custom Field to Match

Here you will choose the asset field that you want to match against.

Asset Match Source

This field lets you determine whether you'd like to pull the match string from the email Subject or Mail Body.

Start Tag / End Tag

Tags let you identify the string from the email that will be used to identify the case to be closed. See the next section for more details.

Assign sender of incoming email as case contact

By default, new cases will be assigned to the first Primary contact found on a customer record. However, this checkbox lets you send the email sender as the case contact.


Rule Creation - Start / End Tags

Depending on the expected format of your incoming emails, you may wish to set Start and End Tags.

These are used to indicate where the match string appears in the email. For example:

Here you can see three separate examples of potential start and end tags in green, with the match string contained within.

If your mail rule is designed to handle emails that come in a predictable and consistent format, such as status reports coming from an external service, you may be able to identify suitable start and end tags, similar to these examples.

"End of line" as end tag

If you set a start tag but do not enter an end tag, the mail rule will use the end of the identified line as the end tag.

For example:

  • Outage for device: ABC-123

In this case, the end of the line will be used as the end tag.


Rule Creation - Contact Matching

The following fields are available if you are matching by customer contact:

Contact Match Type

Here you will choose whether you'd like to match to a contact core Field or Custom Field.

Core / Custom Field to Match

Here you will choose the contact field that you want to match against - Person Email, Person Mobile, Person Work Telephone, or Person Full Name.

Contact Match Source

This field lets you determine which component of the email will be used as the match string - the Subject, or the From address.

If you select Subject, you can set Start and End Tags to indicate where the match string will come from.


"Case Create" rules - additional info

When a case creation rule is executed:

  • The email subject will become the case subject.

  • The email body text will become the case description.

Contact assignment

If you have enabled contact matching, the case contact will be the one that was used for matching.

If the mail rule instead used asset matching, the contact assignment logic is as follows:

  • If you enabled the Assign sender of incoming email as case contact option, the email sender will be assigned as the contact

  • Otherwise, the case contact will be the first Primary contact found against the record.

Primary status can be enabled against a contact from the Contacts tab.

Asset attachment

When a case has been created via asset matching, the asset will be attached to the case.

Attached assets can be seen on the Affected Assets tab of a case.


Mail Rules Log

The Mail Rules Log lets you see which mail rules are being checked, and also which are being run successfully.

Possible messages:

  • Case closed successfully.

    • An email met the conditions of a case close rule and was matched to a customer

  • Case created successfully.

    • An email met the conditions of a case creation rule and was matched to a customer

  • This mail is not qualified for routing.

    • An email did not meet the general matching conditions of any rule

  • No matching items found for the mail rule.

    • An email met the general match conditions of a rule, but no customer could be matched

To access the Mail Rules Log, click on the button in the left-side panel of the Mail Routing Rules config.


FAQs

Can I create a mail rule that does not assign the case to a specific customer?

Cases in The Layer are always linked to a customer record. For this reason, you cannot create a case with a mail rule if it does not pertain to a specific customer.

We suggest using the Mail Triage app to handle incoming email queries that may not pertain to a specific customer.

Did this answer your question?