首页 > 代码库 > ×unica×audience level
×unica×audience level
Task 1: Create the required database tables for each new audience level
create physical database tables in the Campaign system database to support each new audience level(s) you create. The required tables for each audience level are:
A contact history table
A detailed contact history table
A response history table
A segment membership table
To see the available SQL statements, look in the /Campaign/ddl directory for the script that creates system tables for your database management system.
field name should be the same
modified the sql from ddl
CREATE TABLE UA_ACC_DtlContactHist (
ACCT_ID bigint NOT NULL,
TreatmentInstID bigint NOT NULL,
ContactStatusID bigint,
ContactDateTime timestamp,
UpdateDateTime timestamp,
UserDefinedFields char(18),
DateID bigint NOT NULL,
TimeID bigint NOT NULL,
ValueBefore decimal(19,2),
UsageBefore decimal(19,2)
);
CREATE INDEX cDtlContHist_IX1 ON UA_ACC_DtlContactHist
(
ACCT_ID ,
TreatmentInstID
);
CREATE TABLE UA_ACC_ContactHistory (
ACCT_ID bigint NOT NULL,
CellID bigint NOT NULL,
PackageID bigint NOT NULL,
ContactDateTime timestamp,
UpdateDateTime timestamp,
ContactStatusID bigint,
DateID bigint,
TimeID bigint,
UserDefinedFields char(18),
ValueBefore decimal(19,2),
UsageBefore decimal(19,2),
CONSTRAINT cContactHist_PK
PRIMARY KEY (ACCT_ID, CellID, PackageID)
);
CREATE INDEX cContactHist_IX1 ON UA_ACC_ContactHistory
(
CellID
);
CREATE INDEX cContactHist_IX2 ON UA_ACC_ContactHistory
(
PackageID ,
CellID
);
CREATE TABLE UA_ACC_ResponseHistory (
ACCT_ID bigint NOT NULL,
TreatmentInstID bigint NOT NULL,
ResponsePackID bigint NOT NULL,
ResponseDateTime timestamp NOT NULL,
WithinDateRangeFlg int,
OrigContactedFlg int,
BestAttrib int,
FractionalAttrib float,
DirectResponse int,
CustomAttrib float,
ResponseTypeID bigint,
DateID bigint,
TimeID bigint,
UserDefinedFields char(18),
ValueAfter decimal(19,2),
UsageAfter decimal(19,2),
ResponseRevenue decimal(19,2),
SalesCost decimal(19,2),
ResponseChannel varchar(16),
CONSTRAINT cRespHistory_PK
PRIMARY KEY (ACCT_ID, TreatmentInstID,
ResponsePackID)
);
CREATE TABLE UA_ACC_SegMembership (
SegmentID bigint NOT NULL,
ACCT_ID bigint NOT NULL
);
CREATE INDEX cSegMembship_IX1 ON UA_ACC_SegMembership
(
SegmentID
);
save these sql in to a sql file and upload to campaign server
login as db2inst run sql command below
db2 -tvf ac_acc_level_tables_db2.sql
Task 2: Create the new audience levels in Campaign
Enter a unique Audience Level Name, which should reflect the group of identifiers at that audience level.
Audience level names have no specific character restrictions.
Notice that fields name should be the same as user table
Task 3: Map the IBM Campaign system tables to the database tables
After creating the physical database tables for each new audience level and the audience levels in Campaign, you must map the IBMCampaign system tables to these database tables.
the screen shot after history table mapped
the audience level is setting up
本文出自 “worknotes” 博客,谢绝转载!
×unica×audience level