Creatio development guide
PDF
This documentation is valid for Creatio version 7.16.0. We recommend using the newest version of Creatio documentation.

Junk case custom filtering

Glossary Item Box

Introduction

Creatio users can filter unwanted cases by creating a list of email addresses and domains for automatic spam detection. Incoming cases from these domains or addresses are either not registered at all or have the “Canceled” status (the default status value is set in the [Junk Case Default Status] system setting).

Junk filter enables email header analysis based on certain flags, e.g. Auto-Submitted. Emails with those flags are either not registered or register with the pre-defined initial status, set in system settings.

To analyze email addresses and domains, simply add the required value to the [Blacklist of email addresses and domains for case registration] lookup. The emails will be marked as blacklisted during the analysis when you populate the lookup with values (their type is set automatically).

The algorithm of adding a new email filtering property

Email analysis is done through the [Email header properties management] lookup. Follow these steps to add a new analysis property:

  1. Add a new class that implements the IHeaderPropertyHandler interface. This interface contains a single Check() method that returns a value of bool type. Check the property value and return the result during the Check() method implementation. If the method returns true, the system creates the case using the standard mechanism, if false, the system treats the email as blacklisted.
  2. Add an [Email header properties management] lookup value. Specify the property name used for analysis in the Name column. Specify the class name (added in the previous paragraph) in the handler column.

Adding a new email filtering property

Case description

Add a new No-reply property for case analysis. If the property is found in the email header and its value is anything other than “No”, treat the case as blacklisted.

Case implementation algorithm

1. Add a new class that implements the IHeaderPropertyHandler interface.

Add a “Source code” schema in a custom package (e.g. Custom). In this schema, define a class that implements the IHeaderPropertyHandler interface, e.g.:

namespace Terrasoft.Configuration
{
    using System;
    public class NoreplyHandler: IHeaderPropertyHandler
    {
        public bool Check(object value) {
            return string.Equals(value.ToString(), "No", StringComparison.OrdinalIgnoreCase);
        }
    }
}

Save and publish the new schema.

The IHeaderPropertyHandler interface is defined in the JunkFilter package, so it must be added to the custom package dependency.

2. Adding a lookup value

Add the No-reply property to the [Email header properties management] lookup. Select the NoreplyHandler class (created in the previous paragraph) as the handler class (handler property).

After receiving an email with a No-reply header flag and a value that is anything other than “No”, the following options are possible:

  • the case is not created if the [Create Cases From Junk Emails] system setting value is false;
  • the case is created with the [Junk Case Default Status] system setting status if the [Create Cases From Junk Emails] system setting value is true.

© Creatio 2002-2020.

Did you find this information useful?

How can we improve it?