MKTPACKAGE
Stores information pertaining to package records.
Primary Key
| Primary Key | Field Type |
|---|---|
| ID | uniqueidentifier |
Fields
| Field | Field Type | Null | Notes | Description |
|---|---|---|---|---|
| NAME | nvarchar(100) | Default = '' | The name of the package. | |
| DESCRIPTION | nvarchar(255) | Default = '' | The description of the package. | |
| UNITCOST | money | Default = 0 | The base cost of the package. | |
| CODE | nvarchar(10) | Default = '' | A unique code that identifies the package. | |
| 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. |
| CHANNELCODE | tinyint | Default = 0 | 0=Mail, 1=Email, 2=Phone, 3=Public media | |
| NETCOMMUNITYTEMPLATEID | int | Default = 0 | The ID of the Blackbaud Internet Solutions email message associated with this email package | |
| NETCOMMUNITYDATASOURCEID | int | Default = 0 | The ID of the Blackbaud Internet Solutions data source associated with this email package | |
| CHANNEL | nvarchar(12) (Computed) | yes | CASE [CHANNELCODE] WHEN 0 THEN N'Mail' WHEN 1 THEN N'Email' WHEN 2 THEN N'Phone' WHEN 3 THEN N'Public media' END | Provides a translation for the 'CHANNELCODE' field. |
| COSTDISTRIBUTIONMETHODCODE | tinyint | Default = 0 | The method to be used to apply the package's base cost to a marketing effort. | |
| DOCUMENTFILENAME | nvarchar(255) | Default = '' | Filename of the document associated with this package. | |
| DOCUMENTFILE | varbinary | yes | The document associated with this package. | |
| CHANNELSOURCECODE | nvarchar(10) | Default = '' | Code that defines the source code of the channel. | |
| ORGANIZATIONUNITCOST | money | Default = 0 | The amount of the unit cost in organization currency. | |
| ISSYSTEM | bit | Default = 0 | Flag used to hide packages meant for system use only. | |
| COSTDISTRIBUTIONMETHOD | nvarchar(37) (Computed) | yes | CASE [COSTDISTRIBUTIONMETHODCODE] WHEN 0 THEN N'Per piece' WHEN 1 THEN N'Per response' WHEN 2 THEN N'Per marketing effort' WHEN 4 THEN N'Per thousand' WHEN 3 THEN N'Not included in marketing effort cost' END | Provides a translation for the 'COSTDISTRIBUTIONMETHODCODE' field. |
Foreign Keys
| Foreign Key | Field Type | Null | Notes | Description |
|---|---|---|---|---|
| ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| SITEID | uniqueidentifier | yes | SITE.ID | The site to which this package belongs. |
| PACKAGECATEGORYCODEID | uniqueidentifier | yes | MKTPACKAGECATEGORYCODE.ID | FK to MKTPACKAGECATEGORYCODE |
| LETTERCODEID | uniqueidentifier | yes | LETTERCODE.LOCALID | The letter associated with this mail package. |
| CREATIVEID | uniqueidentifier | yes | MKTCREATIVE.ID | The creative associated with this public media package. |
| EXPORTDEFINITIONID | uniqueidentifier | yes | EXPORTDEFINITION.ID | The export definition associated with this package, if one is not already associated with its content. |
| PARTDEFINITIONVALUESID | uniqueidentifier | yes | MKTSOURCECODEPARTDEFINITIONVALUES.ID | FK to MKTSOURCECODEPARTDEFINITIONVALUES |
| CHANNELPARTDEFINITIONVALUESID | uniqueidentifier | yes | MKTSOURCECODEPARTDEFINITIONVALUES.ID | FK to MKTSOURCECODEPARTDEFINITIONVALUES |
| BASECURRENCYID | uniqueidentifier | yes | CURRENCY.ID | The base currency associated with this package. |
| CURRENCYEXCHANGERATEID | uniqueidentifier | yes | CURRENCYEXCHANGERATE.ID | The exchange rate used to convert from amount to organization amount. |
Indexes
| Index Name | Fields | Unique | Primary | Clustered |
|---|---|---|---|---|
| IX_MKTPACKAGE_BASECURRENCYID | BASECURRENCYID | |||
| IX_MKTPACKAGE_CHANNELPARTDEFINITIONVALUESID | CHANNELPARTDEFINITIONVALUESID | |||
| IX_MKTPACKAGE_CODE | CODE | |||
| IX_MKTPACKAGE_CREATIVEID | CREATIVEID | |||
| IX_MKTPACKAGE_CURRENCYEXCHANGERATEID | CURRENCYEXCHANGERATEID | |||
| IX_MKTPACKAGE_DATEADDED | DATEADDED | yes | ||
| IX_MKTPACKAGE_DATECHANGED | DATECHANGED | |||
| IX_MKTPACKAGE_EXPORTDEFINITIONID | EXPORTDEFINITIONID | |||
| IX_MKTPACKAGE_ID | ID | |||
| IX_MKTPACKAGE_LETTERCODEID | LETTERCODEID | |||
| IX_MKTPACKAGE_NETCOMMUNITYDATASOURCEID | NETCOMMUNITYDATASOURCEID | |||
| IX_MKTPACKAGE_PARTDEFINITIONVALUESID | PARTDEFINITIONVALUESID | |||
| IX_MKTPACKAGE_SITEID | SITEID | |||
| PK_MKTPACKAGE | ID | yes | yes | |
| UC_MKTPACKAGE_NAME | NAME | yes |
Triggers
| Trigger Name | Description |
|---|---|
| TR_MKTPACKAGE_AUDIT_UPDATE | |
| TR_MKTPACKAGE_AUDIT_DELETE | |
| TR_MKTPACKAGE_IU_ORGANIZATIONUNITCOST |