MKTSEGMENTATIONPACKAGE

Stores information pertaining to a marketing effort's packages.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
UNITCOST money Default = 0 The cost of the package. Only used after the marketing effort has been activated.
CODE nvarchar(10) Default = '' Source code component for this 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.
COSTDISTRIBUTIONMETHODCODE tinyint Default = 0 The method to be used to apply the package's base cost to the marketing effort. Only used after the marketing effort has been activated.
CHANNELSOURCECODE nvarchar(10) Default = '' Code that defines the source code of the channel.
INSERTCOSTPERPIECE money Default = 0 The total per piece cost of all of the inserts associated with this package. Only used after the mailing has been activated.
INSERTCOSTPERRESPONSE money Default = 0 The total per response cost of all of the inserts associated with this package. Only used after the mailing has been activated.
INSERTCOSTPEREFFORT money Default = 0 The total per effort cost of all of the inserts associated with this package. Only used after the mailing has been activated.
ORGANIZATIONUNITCOST money Default = 0 The organization unit cost.
ORGANIZATIONINSERTCOSTPERPIECE money Default = 0 The organization insert cost per piece.
ORGANIZATIONINSERTCOSTPERRESPONSE money Default = 0 The organization insert cost per response.
ORGANIZATIONINSERTCOSTPEREFFORT money Default = 0 The organization insert cost per effort.
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 3 THEN N'Not included in marketing effort cost' WHEN 4 THEN N'Per thousand' END Provides a translation for the 'COSTDISTRIBUTIONMETHODCODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
SEGMENTATIONID uniqueidentifier MKTSEGMENTATION.ID The marketing effort the package belongs to.
PACKAGEID uniqueidentifier MKTPACKAGE.ID The package that is used in the marketing effort.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
PARTDEFINITIONVALUESID uniqueidentifier yes MKTSOURCECODEPARTDEFINITIONVALUES.ID FK to MKTSOURCECODEPARTDEFINITIONVALUES
CHANNELPARTDEFINITIONVALUESID uniqueidentifier yes MKTSOURCECODEPARTDEFINITIONVALUES.ID FK to MKTSOURCECODEPARTDEFINITIONVALUES
ORGANIZATIONCURRENCYEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from the amounts to organization amount.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this marketing effort package.

Indexes

Index Name Fields Unique Primary Clustered
IX_MKTSEGMENTATIONPACKAGE_BASECURRENCYID BASECURRENCYID
IX_MKTSEGMENTATIONPACKAGE_CHANNELPARTDEFINITIONVALUESID CHANNELPARTDEFINITIONVALUESID
IX_MKTSEGMENTATIONPACKAGE_DATEADDED DATEADDED yes
IX_MKTSEGMENTATIONPACKAGE_DATECHANGED DATECHANGED
IX_MKTSEGMENTATIONPACKAGE_ORGANIZATIONCURRENCYEXCHANGERATEID ORGANIZATIONCURRENCYEXCHANGERATEID
IX_MKTSEGMENTATIONPACKAGE_PACKAGEID PACKAGEID
IX_MKTSEGMENTATIONPACKAGE_PARTDEFINITIONVALUESID PARTDEFINITIONVALUESID
PK_MKTSEGMENTATIONPACKAGE ID yes yes
UIX_MKTSEGMENTATIONPACKAGE_SEGMENTATIONID_PACKAGEID SEGMENTATIONID, PACKAGEID yes

Triggers

Trigger Name Description
TR_MKTSEGMENTATIONPACKAGE_IU_ORGANIZATIONAMOUNTS
TR_MKTSEGMENTATIONPACKAGE_AUDIT_UPDATE
TR_MKTSEGMENTATIONPACKAGE_AUDIT_DELETE