BATCHINTERACTION

Stores interaction batch information

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
SEQUENCE int Default = 0
OBJECTIVE nvarchar(100) Default = ''
EXPECTEDDATE date
ACTUALDATE date yes
STATUSCODE tinyint Default = 1 1=Pending, 2=Completed, 4=Canceled, 5=Declined
COMMENT nvarchar(max) Default = ''
BATCHINTERACTIONLOOKUPID nvarchar(100) Default = ''
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.
EXPECTEDSTARTTIME UDT_HOURMINUTE Default = '' Expected starting time of the interaction.
EXPECTEDENDTIME UDT_HOURMINUTE Default = '' Expected ending time of the interaction.
ACTUALSTARTTIME UDT_HOURMINUTE Default = '' Actual starting time of the interaction.
ACTUALENDTIME UDT_HOURMINUTE Default = '' Actual ending time of the interaction.
STATUS nvarchar(9) (Computed) yes CASE [STATUSCODE] WHEN 1 THEN N'Pending' WHEN 2 THEN N'Completed' WHEN 4 THEN N'Canceled' WHEN 5 THEN N'Declined' END Provides a translation for the 'STATUSCODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
BATCHID uniqueidentifier BATCH.ID FK to BATCH
INTERACTIONID uniqueidentifier yes INTERACTION.ID FK to INTERACTION
CONSTITUENTID uniqueidentifier CONSTITUENT.LOCALID FK to CONSTITUENT
INTERACTIONTYPECODEID uniqueidentifier INTERACTIONTYPECODE.ID FK to INTERACTIONTYPECODE
FUNDRAISERID uniqueidentifier yes CONSTITUENT.LOCALID FK to CONSTITUENT
EVENTID uniqueidentifier yes EVENT.ID FK to EVENT
INTERACTIONCATEGORYID uniqueidentifier yes INTERACTIONCATEGORY.ID FK to INTERACTIONCATEGORY
INTERACTIONSUBCATEGORYID uniqueidentifier yes INTERACTIONSUBCATEGORY.ID FK to INTERACTIONSUBCATEGORY
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
TIMEZONEENTRYID uniqueidentifier yes TIMEZONEENTRY.ID Time zone of meeting time.

Indexes

Index Name Fields Unique Primary Clustered
IX_BATCHINTERACTION_CONSTITUENTID CONSTITUENTID
IX_BATCHINTERACTION_DATEADDED DATEADDED yes
IX_BATCHINTERACTION_DATECHANGED DATECHANGED
IX_BATCHINTERACTION_FUNDRAISERID FUNDRAISERID
PK_BATCHINTERACTION ID yes yes

Triggers

Trigger Name Description
TR_BATCHINTERACTION_AUDIT_UPDATE
TR_BATCHINTERACTION_AUDIT_DELETE

Referenced by

Referenced by Field
BATCHINTERACTIONBATCHSYSTEMMESSAGES BATCHINTERACTIONID
BATCHINTERACTIONBATCHUSERMESSAGE ID
BATCHINTERACTIONPARTICIPANTS BATCHINTERACTIONID
BATCHINTERACTIONSITES BATCHINTERACTIONID