MAILPREFERENCE

Describes mailing preference settings for constituents.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
MAILTYPECODE tinyint Default = 0 Defines the kind of mailings to which these preferences are applied.
RECEIPTTYPECODE tinyint Default = 2 Defines the recipt type.
SENDMAIL bit Default = 1 If true, send this kind of mailing. If false, don't.
DELIVERYMETHODCODE tinyint Default = 0 Defines the kind of mail the constituent prefers.
USESEASONALADDRESS bit Default = 0 If true, use an applicable seasonal address.
COMMENTS nvarchar(500) Default = '' Additional comments for this preference set.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
USEPRIMARYADDRESS bit Default = 0 If true, use the constituent's current primary address.
USEPRIMARYEMAIL bit Default = 0 If true, use the constituent's current primary email address.
RECEIPTTYPE nvarchar(13) (Computed) yes CASE [RECEIPTTYPECODE] WHEN 0 THEN N'Per payment' WHEN 1 THEN N'Consolidated' WHEN 2 THEN N'No preference' END Provides a translation for the 'RECEIPTTYPECODE' field.
DELIVERYMETHOD nvarchar(5) (Computed) yes CASE [DELIVERYMETHODCODE] WHEN 0 THEN N'Mail' WHEN 1 THEN N'Email' END Provides a translation for the 'DELIVERYMETHODCODE' field.
MAILTYPE nvarchar(29) (Computed) yes CASE [MAILTYPECODE] WHEN 0 THEN N'Revenue Acknowledgements' WHEN 1 THEN N'Appeals' WHEN 2 THEN N'Events' WHEN 3 THEN N'General Correspondence' WHEN 4 THEN N'Reminders' WHEN 5 THEN N'Receipts' WHEN 6 THEN N'Planned Gift Acknowledgements' WHEN 7 THEN N'Tribute Acknowledgements' WHEN 8 THEN N'Stewardship' END Provides a translation for the 'MAILTYPECODE' field.
DONOTSENDOTHERCHANNEL bit Default = 0 If true, exclude from mailings in which preferred delivery method is not available.
HASINHERITEDCONSENT bit Default = 0
SOURCEFILEPATH nvarchar(260) Default = ''
PRIVACYPOLICYFILEPATH nvarchar(260) Default = ''
SUPPORTINGINFORMATION nvarchar(max) Default = ''
CONSENTSTATEMENT nvarchar(max) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
CONSTITUENTID uniqueidentifier CONSTITUENT.LOCALID The constituent that this preference set applies to.
ACKNOWLEDGEMENTID uniqueidentifier yes ACKNOWLEDGEMENTPROCESS.ID The ID of the specific acknowledgement communication, if one was chosen.
CORRESPONDENCEID uniqueidentifier yes CORRESPONDENCEPROCESS.ID The ID of the specific correspondence communication, if one was chosen.
PLEDGEREMINDERID uniqueidentifier yes PLEDGEREMINDERPROCESS.ID The ID of the specific pledge reminder communication, if one was chosen.
BUSINESSUNITCODEID uniqueidentifier yes BUSINESSUNITCODE.ID Defines the business unit to which these preferences are applied (only apply for Appeal).
CATEGORYCODEID uniqueidentifier yes APPEALCATEGORYCODE.LOCALID Defines the category to which these preferences are applied (only apply for Appeals).
SITEID uniqueidentifier yes SITE.ID Defines the site to which these preferences are applied (only apply for Appeals or Events).
CORRESPONDENCECODEID uniqueidentifier yes CORRESPONDENCECODE.ID Defines the correspondence code to which these preferences are applied (only apply for General Correspondence).
ADDRESSID uniqueidentifier yes ADDRESS.LOCALID The address to use for this preference set.
EMAILADDRESSID uniqueidentifier yes EMAILADDRESS.ID The email address to use for this preference set.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
EVENTCATEGORYCODEID uniqueidentifier yes EVENTCATEGORYCODE.LOCALID Defines the category to which these preferences are applied (only apply for Events).
PURPOSEID uniqueidentifier yes DESIGNATIONLEVEL.ID Defines the fundraising purpose for which these preferences are applied (only apply for Stewardship).
CONSTITUENTSOLICITCODEID uniqueidentifier yes CONSTITUENTSOLICITCODE.LOCALID
SOURCECODEID uniqueidentifier yes DATAPROTECTIONEVIDENCESOURCECODE.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_MAILPREFERENCE_ADDRESSID ADDRESSID
IX_MAILPREFERENCE_CONSTITUENTID CONSTITUENTID
IX_MAILPREFERENCE_DATEADDED DATEADDED yes
IX_MAILPREFERENCE_DATECHANGED DATECHANGED
IX_MAILPREFERENCE_ID ID
PK_MAILPREFERENCE ID yes yes

Triggers

Trigger Name Description
TR_MAILPREFERENCE_INSERTUPDATE_EMAILVALID
TR_MAILPREFERENCE_AUDIT_ETLDELETEDID
TR_MAILPREFERENCE_INSERTUPDATE_ADDRESSVALID
TR_MAILPREFERENCE_AUDIT_UPDATE
TR_MAILPREFERENCE_AUDIT_DELETE

Referenced by

Referenced by Field
MAILPREFERENCEGROUPCONTACT MAILPREFERENCEID
MAILPREFERENCEORGCONTACTTYPE MAILPREFERENCEID