ATLAS FormBuilder - How FormBuilder Selects Which Email Address to Use for a User
An explanation of the internal process that FormBuilder goes through when determining which email to use for a user.
One of FormBuilder's most important features is its ability to compose and send custom email messages. These messages can be sent out to an explicit email address, but can also be sent out to broader user types using text merge fields. As text merge fields are only defined when each individual form response is being run, FormBuilder must go through a special process at runtime to determine which email address to use for each email-related text merge field.
Outline of Process
If an email-related text merge field is encountered, or FormBuilder needs to otherwise search for the email address of a user at runtime, the application runs through the following series of steps:
- To begin, FormBuilder checks if the user in question is a University of Illinois campus user, or a FormBuilder user (account is associated directly with FormBuilder, rather than login being performed through external university system).
- If the user is a FormBuilder user, the email address associated with the FormBuilder account is chosen. [Process ends]
- If the user is a University of Illinois campus user:
- FormBuilder grabs the UIN of the user. Campus users in FormBuilder are always in the form of a UIN or a NetID and campus name. If the user is already in the form of a UIN, it is used and this step completes, otherwise a UIN is searched for using the NetID and campus of the user.
- The AITS webservice known as "DirectoryData" is asked for university directory information on the selected UIN.
- FormBuilder looks at the list of email addresses that were returned by DirectoryData and examines their "emailCode" value, which is used to determine the email address's type. The list of email addresses is filtered down to only those with the emailCode of "UI."
- The filtered list is searched based on the "preferredInd" property of the email addresses. This property, which can have a value of either "Y" (for Yes) or "N" (for No), signifies whether an email address is a preferred email address for the user in question.
The first time FormBuilder finds a "preferredInd" value of "Y," that email address is chosen, and the process ends. If no "Y" values are found, the process moves to the next step. - The list of email addresses is further filtered by the "statusInd" property of the addresses. This is a property that determines the active status of an email address, and has a value of either "A" (for Active) or "I" (for Inactive).
FormBuilder filters the list down to include only email addresses with a "statusInd" value of "A" - From this newly-filtered list, the first email address found is chosen. [Process ends]
- FormBuilder grabs the UIN of the user. Campus users in FormBuilder are always in the form of a UIN or a NetID and campus name. If the user is already in the form of a UIN, it is used and this step completes, otherwise a UIN is searched for using the NetID and campus of the user.
- If the user is a FormBuilder user, the email address associated with the FormBuilder account is chosen. [Process ends]
- Note: FormBuilder may not return an email address for a user if they are a deactivated University of Illinois campus user, with no associated email address. FormBuilder will not return any email addresses for a campus user that are not marked with an "emailCode" of "UI."
For more tutorials and helpful tips on ATLAS FormBuilder, visit FormBuilder - Homepage.