How People Records are Created from E-Mail

IQ processes incoming e-mail messages by determining whether they're formatted or unformatted. Once it has done this, it normalizes the case of text in the fields and then validates and formats the address field information based on settings selected in your IQ System Configuration. Once the name and address are normalized and verified, IQ checks to see if a record for this correspondent exists and then adds a new or updates an existing People record and generates and attaches correspondence to that record.

With E-Mail routing rules, you can identify keywords or field values whose appearance in an e-mail message determines the disposition of the incoming e-mail.

Formatted E-Mail

Formatted e-mail messages are those coming from Web sites such as Write Your Rep and the Senate Web site. Constituents sending messages from those sites enter name, address, and other information in fields on the site's correspondence page. IQ identifies this formatted, or "tagged," information and places it into appropriate People and Mail record fields.

If a formatted e-mail message contains a prefix or suffix that does not match a code in the Prefix of Suffix translation table, it will not be placed into the People record. In addition, you can select the option to ignore the Prefix when IMA searches your People database for a possible match.

If a formatted e-mail message contains an issue code or message (the correspondent selected one or more codes at the Web site or typed a message), e-mail correspondence rules can tell IQ to create a Mail record, which can contain the issue code(s). The Mail record also contains the message. If the issue code has a staff member associated with it, that staff member’s name is entered in the Assigned To field of the Mail record. This creates a pending mail for that staff member. If a formatted e-mail message contains more than one issue, IQ uses the staff member associated with the first issue (sorted alphabetically by translation).

If a formatted e-mail contains the <AFFL_DEL> tag, IMA will remove the Affiliation Code from every People record which contains the same e-mail address. This ensures that when the <AFFL_DEL> tag is used to remove the e-newsletter affiliation code, it removes it from every People record with the same e-mail address so that person doesn't continue to receive e-newsletters.

If an incoming formatted e-mail contains the <BIRTHDATE> tag, IMA will add the birthdate to a new or an existing matching People record. If the existing People record contains a birthdate that is different from the birthdate in the incoming e-mail, IMA will create a new People record.

Unformatted E-Mail

Unformatted e-mail messages are those that do not come from one of the Web sites mentioned previously, but are sent by the correspondent directly to the office-holder’s public e-mail address. Through E-Mail parameters, your office can choose to send all unformatted e-mail messages to either the Exception Set or to the database. If you send unformatted messages to the database and also set E-Mail parameters to search for the name and address block, IQ checks messages for identifiable name and address information and then parses that information into People name and address fields. Once the information is placed in fields, it is verified and formatted by Address Checker.

Name and Address Identification

To locate a name and address block within the body of an unformatted e-mail message, IQ searches for a block of eight lines or less (eight lines are the maximum number allowable in a standard U.S. address). When IQ locates this block, it checks the last line for city, state, and ZIP Code information. If a comma is located in the last line, and the last three words (from right to left) match the pattern , ## ##### or , ## #####-####, and if the second from the last word is located in the state translation file, IQ identifies this as the last line of a valid address block. If there is no comma in the last line and it contains more than one word, IQ recognizes it as the last line of a valid address block using the above criteria and will insert a comma between the located state and identified ZIP Code. IQ ignores the strings USA, United States, and United States of America if they appear in the last line.

If IQ locates a valid address block, the first line is parsed as the name line, and the last line is parsed as the city-state-zip line. The remaining lines are parsed into address fields.

If there is no blank line between the address block and the message text, the message is routed to the Exception set.

Name Line Parsing

IQ locates a prefix by checking the name line against the prefix translation file. When it finds a match, it places it in the Prefix field. IQ then checks for the occurrence of the word and or the symbol & in the second-to-last position on the name line. If it finds either followed by Family, Friends, or Company, it saves the string as an appellation. If none of these three words follow the and or &, the string is disregarded.

IQ next checks for commas in the name line, and if it finds one it checks the words to the right of the comma against the Suffix and Title translation files. If a match is found, it places the words in the Suffix or Title field; if a match is not found, it places the words in the Appellation field.

IQ parses the remaining name line words as follows: it places the last word in the Last Name field, the first word in the First field, and any words between in the Middle field.

Address Parsing

IQ follows certain rules for separating the components of an address into People fields. It checks the second line of a valid address block is checked against the Title translation file. If there's a match, IQ places that line into the record’s Title field. If there's not a match, IQ assigns the second line to an address field, the Organization field, or the Title field, as shown in the following table. The components are assigned to data fields according to the number of lines in the block, as the table shows.

No. of Lines

Line Number and Data Field Assignment

           

1

2

3

4

5

6

7

8

3

Name

Adr1

CSZ

 

 

 

 

 

4

Name

Adr1

Adr2

CSZ

 

 

 

 

5

Name

Org1

Adr1

Adr2

CSZ

 

 

 

6

Name

Title

Org1

Adr1

Adr2

CSZ

 

 

7

Name

Title

Org1

Org2

Adr1

Adr2

CSZ

 

8

Name

Title

Org1

Org2

Adr1

Adr2

Adr3

CSZ

IQ applies case normalization to words in address fields. If all data in a field is in uppercase or lowercase, IQ uppercases the first initial of each word, with the following exceptions: of, in, on, to, and, the. If one of the exceptions is the first or last word in a field, IQ uppercases it.

City-State-Zip Parsing

IQ takes the last line of the address block and places anything to the left of the comma in the City field. The remaining words are placed in the State, Zip, and Zip extension fields as appropriate.

People Records

When determining whether to attach a Mail record to an existing People record or add a new People record, IQ searches the database for a record in which the name, address, and e-mail address information match that in the incoming e-mail. Note: If the incoming e-mail contains an organization and no name, then the organization will be used in place of name to locate an existing People record.

A Mail record is added to an existing People record in the following scenarios:

Note: IQ uses the nickname code file to determine if a first name matches an existing People record. So for example, if an incoming email contains Tom Smith, IQ will search your People database for Tom Smith, Tommy Smith and Thomas Smith.

 

A new People record is created, and a Mail record is added to it in these scenarios:

When a new People record is created, the System Configuration Settings for "Use Alternate ZIP+4 to Congressional District Lookup Table", "Use City from CSZ Code Table" and "Use Congressional District from CSZ Code Table" are respected. If "Use Alternate ZIP+4 to Congressional District Lookup Table" is selected, then IQ will use the Congressional District from the ZIPTOCD table. If, however, the Use CSZ Code Table settings are selected, then IQ will use the City-State-Zip translation file to determine what is entered in the new People record. When these three settings are not selected, IQ uses information from Address Checker.

For unformatted e-mail messages, IQ uses the e-mail address of the sender to check for a People record match. For formatted e-mail messages, IQ uses the e-mail address that the correspondent enters in the e-mail address field on the Web form.

Mail Records

IQ creates a Mail record for every e-mail message that's processed. An In Method of E-Mail is assigned, and the e-mail message date is placed in the Date In field. Issue codes associated with the e-mail are placed in the Issues field if they match a code in your Issue Code file. Non-matching issue codes are placed in the Comments field. The subject of the incoming e-mail is displayed just above the Comments field. A link to the incoming e-mail message appears on the Search Results page for the Mail record.

The Mail record is assigned an Out Method of E-Mail or U.S. Mail to indicate whether the message will be answered with an e-mail response or with a printed letter. The outgoing method that appears in this field depends on the outgoing method assigned to the rule that created the Mail record. The salutation is assigned to the mail record based on the default salutation for your IQ system. If there is a staff member associated with the issue, the staff name is entered in the Assigned To field. If there are multiple issue codes with associated staff members, the staff associated with the first code (codes are entered alphabetically by translation) is used. If the first code has no staff associated with it, the staff member assigned to the rule by which this outgoing was created is used.

Issues that have been archived are treated differently than those that are active. Depending on the sending Web site, IQ receives either the issue code or the translation. The Senate Web site has a standard list of issues that cannot be modified by individual Senate offices. These issues are sent to IQ in the form of a translation rather than a code. If a Senate office chooses not to use a particular issue that’s available on the Senate Web site, it archives the corresponding IQ issue code. When IQ receives a translation, it checks to see if the translation’s code is active or archived. If it’s active, the code is entered in the Issues field, and if there’s an associated staff, it’s entered in the Assigned To field. If the code is archived, the translation is entered in the Comments field, and the default staff is entered in the Assigned To field. This lets the staff person review e-mail with archived codes and determine if or how to respond.

The Write Your Rep site does not offer a standard list of issues. However, House offices can create a custom form containing issue codes that Write Your Rep correspondents can select when they’re sending correspondence. If a House office chooses to archive an IQ issue code, they can also remove it from their Write Your Rep form. In that way, constituents can select and send only active codes.