Rule Wizard

The Rule Wizard lets you select connectors, conditions, fields, relators, and values to create rules for handling incoming e-mail correspondence and sending automated responses.

To create a rule definition, select an item in each of the fields as described in the following sections. Click the Add button to save your selections to the Rule Definition field.

Connectors

Connectors indicate how to group select sentences in the rule definition. IMA checks an e-mail against each sentence and determines whether or not the information in the e-mail meets the criteria in that sentence. If criteria from all sentences in the definition are met based on the connector, the action is executed.

There are two connectors available in the Rule Wizard:  And and Or. When you use one of these between select sentences, it connects those sentences to make a group.

And Connector

When you use the And connector, IMA checks the e-mail once for information that meets the criteria in both the first and second select sentences. For example, if your sentence reads FLD:CITY = "Alexandria" and FLD:STATE = "VA", the e-mail message must have both the city name Alexandria and the state VA in order for the action to take place.

Or Connector

When you use the Or connector, IMA checks the e-mail once for information that meets the criteria in either the first sentence or the second sentence. For example, if your sentence reads FLD:City = "Alexandria" or FLD:State = "VA, the e-mail message would have to contain only Alexandria or VA in order for the action to take place.

Condition Type

The selections in the Condition Type field let you select the type of rule you're creating—using field settings, functions, or subrules. When you select Field Setting or Function, 40 fields are available in the Fields area for creating your definition. When you select Sub-rule, a listing of existing subrules is available for you to select one.

Fields

Forty fields are available for inclusion in the rule definition. These include name, address, and communications fields as well as fields that contain other information in the e-mail message such as subject, message text, message body and internet headers. Non-address and non-communications fields that are available for use in rule-building include Registered User, Request Response, Staff, Jurisdiction, and Message Type. These require specific entries for their values.

Relator

The information contained in each field is that field's value. When you create a sentence, you tell IMA what value to look for, and whether the e-mail should include or not include information with that value. The relator defines the relationship between the value you type into the Value field and the actual value that the e-mail contains. There are nine relators available in the Rule Wizard: Equal, In, Begins With, Ends With, Contains, Greater Than, Greater or Equal, Less Than, Less or Equal. Select the Not check box to add "not" to the relator: not equal, does not begin with, does not contain, is not less than or equal to, and so forth.

Equal – Use the Equal relator when the value contained in the e-mail message is to be exactly the same as the value you specify in the definition. For example, to find messages with an affiliation code of VET, you'd enter FLD:AFFL = "vet".

If you want to find e-mail messages with one of several values, you could enter FLD:AFFL = "vet" or FLD:AFFL = "sr" or FLD:AFFL = "aarp", or you could use the In relator to get the same results.

If you want to find e-mail messages with all of several values, you would need to structure your definition as follows: FLD:AFFL ="vet" and FLD:AFFL = "sr" and FLD:AFFL = "aarp". This would require you to type the and relator between the values. This definition would select only those e-mail messages that had all three affiliations codes for the rule execution. This selection is not inclusive. An e-mail message with these three affiliations, plus a fourth, would still evaluate to TRUE.

In – Use the In relator when an e-mail message can include any of several values. For example, with FLD:AFFL in "VET", "SR", "AARP", an e-mail message with any one of these three affiliation codes would be selected for the rule execution. When you use this relator, enter each value on a separate line in the Value field. The values appear in quotes, separated by commas, in the definition. Select the Not check box for any of several values not in the e-mail message. In the previous example, e-mail messages without any of the three affiliation codes would be selected for the rule execution. If a message had just one of these codes, it would evaluate to FALSE.

Begins With – Use the Begins With relator when the value in the e-mail message begins with a character or string of characters. When you use the Begins With relator, a % symbol is automatically appended to the value in the definition. Select the Not check box for a value that not begin with the character(s) in the definition.

Ends With – Use the Ends With relator when the value in the e-mail message ends with a character or string of characters. When you use the Ends With relator, a % symbol is automatically placed at the beginning of the value in the definition. Select the Not check box for a value that not end with the character(s) in the definition.

Contains – Use the Contains relator when the value in the e-mail message contains a character or string of characters. When you use the Contains relator, a % symbol is automatically placed at the beginning and end of the value in the definition. Select the Not check box for a value that not contain the character(s) in the definition.

Greater Than – Use the Greater Than relator when the value in the e-mail message is to be greater than the value in the definition. Select the Not check box for a value not equal to the one in the definition. Select the Not check box for a value not greater than the one in the definition.

Greater or Equal – Use the Greater or Equal relator when the value in the e-mail message is to be greater than or equal to the value in the definition. Select the Not check box for a value not greater than or equal to the one in the definition.

Less Than – Use the Less Than relator when the value in the e-mail message is to be less than the value in the definition. Select the Not check box for a value not less than the one in the definition.

Less or Equal – Use the Less or Equal relator when the value in the e-mail message is to be less than or equal to the value in the definition. Select the Not check box for a value not less than or equal to the one in the definition.

Value

Use this field to specify the value that the rule should look for in the e-mail. In general, you should type it in the form in which it appears in the e-mail. However, if the information is going to be checked against a translation file (for example, prefix, affiliation code, issue code), you must enter the value as it will be translated when placed in the database. For example, use Mr., not MR. or 1, when looking for prefix information. When looking for affiliation or issue code information, use the ID and not the translation (for example, SR, not Senior Citizen; AG, not Agriculture).

The following fields require specific entries in the Value field:

Registered User:  Y (Yes) or N (No). A Registered User is a correspondent who exists in your IQ People Database with at least a matching e-mail address. You can use this field to override the jurisdiction designation when, for example, you want to respond to registered users regardless of whether or not they live within your jurisdiction. Note: If the incoming email contains a prefix, last name and/or address line 1, that will be used in addition to the email address to locate an existing people record. If IQ does not find a match based on name, email address and street address, then IQ will search based on just name and email address. If a match is still not found, then IQ will create a new people record. IQ will perform an email address only search when the incoming email does not contain a last name.

Request Response: (Response Requested or No Response Necessary). If a Response Requested field is available for the correspondents to select, IQ places Response Requested or No Response Necessary in the Incoming Comments field, depending on the Yes or No indication. You would need two rules, one to create a closed mail record: FLD:RSP = "No Response Necessary"; and one to create a pending mail record: FLD:RSP = "Response Requested".

Staff: Internal User ID (i.e. 105). The Staff is the user associated with an Issue Code which can be included in a formatted email in the <ISSUE> tag. The required value for the Staff field, is the Internal User ID (i.e. 105) of the user (i.e Jane Smith). The Internal User ID is located in the IQ User record.

Jurisdiction:  IN (In-Jurisdiction), OUT (Out-of-Jurisdiction) or UND (Undetermined). Based on the identification of your jurisdiction in the General section of the E-Mail System Configuration settings, you can create a rule that executes based on whether or not the correspondent's address is within your jurisdiction. For example, you could send out-of-jurisdiction e-mails to the Exception Handler with this rule:  FLD:JURISDICTION = "OUT". Or you could send unformatted e-mails without an address block to the Exception Handler with this rule:  FLD:JURISDICTION = "UND".

Message Type:  RAW (Raw/Unformatted), SCC (Senate), CUS (Custom), DM (Digital Mail), or WYR (Write Your Rep).

Functions

Functions let you create rules that validate field information based on value length and whether or not the value is numeric. To add a function to your rule definition, select a Condition Type of Function in the IMA Rule Wizard. Three functions appear in the Function field: IsNumeric, IsNotNumeric, and Length. These functions are particularly useful when you want to catch messages based on a numeric field such as ZIP Code. For example, to find ZIP Codes in a range from 03302 to 03309 and eliminate those that would normally sort within that range if they were not designated as numeric—33021, 33022, 33089, etc.—use the IsNumeric function as in the following example:

Len[FLD:ZIP] = "5" and IsNumeric[FLD:ZIP] and FLD:ZIP >= "03302" and FLD:ZIP <= "03309"