Preprocessors for e-mail listeners
A preprocessor determines whether incoming e-mails messages are new requests for help or updates to existing service requests.
The preprocessor is a Java™ component of the e-mail listener that runs on the server when the
e-mail listener recognizes a new e-mail message. The preprocessor
parses the subject line of any incoming e-mail message to determine
whether the message is a new request for help or an update to an existing
service request. By default, a built-in preprocessor parses incoming
e-mail messages. The default preprocessor value is: psdi.common.emailstner.Preprocessor
. In the E-mail Listeners application, this value displays in the Preprocessor field on the Listener tab.
The preprocessor class extracts the string that is bounded by the object key delimiter characters, which identifies an existing service request. If a string is recognized, the preprocessor stores the string in the object key column in the e-mail listener staging table. If no string is recognized, the preprocessor leaves the object key column blank.
Customized preprocessors
The base preprocessor Java class implements a standard Java interface called the LSNRPreprocessor. Custom preprocessor implementations must include an implementation of the LSNRPreprocessor interface.
The preprocessor interface provided with the system includes the following public methods:
- Boolean isNewEmail (String del, String subject)
- String getObjectKey (String del, String subject)
In the custom Java class, you can implement both methods. Each method accepts two parameters: the delimiter string and the subject line string.
Method | Description | Base preprocessor implementation | Custom implementation |
---|---|---|---|
isNewEmail() | Returns a Boolean value indicating whether the e-mail is for a new or for an existing ticket | Checks whether the Object Key Delimiter string occurs exactly twice in the subject line string | Might provide different logic to determine the new or existing ticket |
getObjectKey() |
|
Extracts the substring between the first and last occurrences of the delimiter string in the subject line | Might provide different logic to determine the Ticket ID |