跨会话响应商品匹配
缺省情况下,跨会话响应跟踪与处理代码或商品代码进行匹配。crossSessionResponse 服务使用 SQL 命令将处理代码、商品代码或定制代码从会话数据匹配到 Campaign 联系和响应历史记录表。您可以编辑这些 SQL 命令以匹配您定制的任何跟踪代码、商品代码或定制代码。
按处理代码匹配
用于按处理代码进行匹配的 SQL 必须返回此受众级别的 XSessResponse 表中的所有列以及一个名为 OfferIDMatch 的列。OfferIDMatch 列中的值必须是与 XSessResponse 记录中的处理代码对应的 offerId
以下是与处理代码匹配的缺省生成的 SQL 命令样本。Interact 生成 SQL 以对受众级别使用正确表名称。如果 Interact > services > crossSessionResponse > OverridePerAudience > AudienceLevel > TrackingCodes > byTreatmentCode > SQL 属性设置为使用系统生成的 SQL,那么将使用此 SQL。
select   distinct treatment.offerId as OFFERIDMATCH, 
tx.*,
dch.RTSelectionMethod
from UACI_XSessResponse tx
Left Outer Join UA_Treatment treatment ON tx.trackingCode=treatment.treatmentCode
Left Outer Join UA_DtlContactHist dch ON tx.CustomerID = dch.CustomerID
Left Outer Join UA_ContactHistory ch ON tx.CustomerID = ch.CustomerID
AND treatment.cellID = ch.cellID
AND treatment.packageID=ch.packageID
where tx.mark=1
and tx.trackingCodeType=1
UACI_XsessResponseUA_DtlContactHistCustomerIDUA_ContactHistoryInteract 中的设置来定义。 例如,UACI_XsessResponseInteract > profile > Audience Levels > [AudienceLevelName] > crossSessionResponseTable 配置属性来定义。
如果您已定制了您的联系和响应历史记录表,那么可能需要修订此 SQL 以处理您的表。 您将在 Interact > services > crossSessionResponse > OverridePerAudience > (AudienceLevel) > TrackingCodes > byTreatmentCode > OverrideSQL 属性中定义 SQL 覆盖。 如果您提供某些覆盖 SQL,那么必须将 SQL 属性更改为覆盖 SQL
按商品代码匹配
用于按商品代码进行匹配的 SQL 必须此受众级别的 XSessResponse 表中的所有列以及一个名为 TreatmentCodeMatch 的列。TreatmentCodeMatch 列中的值是与 XSessResponse 记录中的商品标识(和商品代码)一起的处理代码。
以下是与商品代码匹配的缺省生成的 SQL 命令样本。Interact 生成 SQL 以对受众级别使用正确表名称。如果 Interact > services > crossSessionResponse > OverridePerAudience > AudienceLevel > TrackingCodes > byOfferCode > SQL 属性设置为使用系统生成的 SQL,那么将使用此 SQL。
select   treatment.treatmentCode as TREATMENTCODEMATCH, 
tx.*,
dch.RTSelectionMethod
from UACI_XSessResponse tx
Left Outer Join UA_DtlContactHist dch ON tx.CustomerID=dch.CustomerID
Left Outer Join UA_Treatment treatment ON tx.offerId = treatment.offerId
Left Outer Join
(
select max(dch.contactDateTime) as maxDate,
treatment.offerId,
dch.CustomerID
from UA_DtlContactHist dch, UA_Treatment treatment, UACI_XSessResponse tx
where tx.CustomerID=dch.CustomerID
and tx.offerID = treatment.offerId
and dch.treatmentInstId = treatment.treatmentInstId
group by dch.CustomerID, treatment.offerId
) dch_by_max_date ON tx.CustomerID=dch_by_max_date.CustomerID
and tx.offerId = dch_by_max_date.offerId
where tx.mark = 1
and dch.contactDateTime = dch_by_max_date.maxDate
and dch.treatmentInstId = treatment.treatmentInstId
and tx.trackingCodeType=2
union
select treatment.treatmentCode as TREATMENTCODEMATCH,
tx.*,
0
from UACI_XSessResponse tx
Left Outer Join UA_ContactHistory ch ON tx.CustomerID =ch.CustomerID
Left Outer Join UA_Treatment treatment ON tx.offerId = treatment.offerId
Left Outer Join
(
select max(ch.contactDateTime) as maxDate,
treatment.offerId, ch.CustomerID
from UA_ContactHistory ch, UA_Treatment treatment, UACI_XSessResponse tx
where tx.CustomerID =ch.CustomerID
and tx.offerID = treatment.offerId
and treatment.cellID = ch.cellID
and treatment.packageID=ch.packageID
group by ch.CustomerID, treatment.offerId
) ch_by_max_date ON tx.CustomerID =ch_by_max_date.CustomerID
and tx.offerId = ch_by_max_date.offerId
and treatment.cellID = ch.cellID
and treatment.packageID=ch.packageID
where tx.mark = 1
and ch.contactDateTime = ch_by_max_date.maxDate
and treatment.cellID = ch.cellID
and treatment.packageID=ch.packageID
and tx.offerID = treatment.offerId
and tx.trackingCodeType=2
UACI_XsessResponseUA_DtlContactHistCustomerIDUA_ContactHistoryInteract 中的设置来定义。 例如,UACI_XsessResponseInteract > profile > Audience Levels > [AudienceLevelName] > crossSessionResponseTable 配置属性来定义。
如果您已定制了您的联系和响应历史记录表,那么可能需要修订此 SQL 以处理您的表。 您将在 Interact > services > crossSessionResponse > OverridePerAudience > (AudienceLevel) > TrackingCodes > byOfferCode > OverrideSQL 属性中定义 SQL 覆盖。 如果您提供某些覆盖 SQL,那么必须将 SQL 属性更改为覆盖 SQL
按备用代码匹配
您可以定义 SQL 命令以按照您选择的某些备用代码进行匹配。例如,您可以具有单独于商品或处理代码的促销代码或产品代码。
您必须在 Interact 运行时环境表中的 UACI_TrackingType 表中定义此备用代码。
您必须在 Interact > services > crossSessionResponse > OverridePerAudience > (AudienceLevel) > TrackingCodes > byAlternateCode > OverrideSQL 属性中提供 SQL 或存储过程,并且此 SQL 或存储过程必须返回此受众级别的 XSessResponse 表中的所有列以及 TreatmentCodeMatchOfferIDMatch 列。您可以选择返回 offerCode 以代替 OfferIDMatch(格式为 offerCode1offerCode2offerCodeN(对于第 N 个部分商品代码))。TreatmentCodeMatch 列和 OfferIDMatch 列(或商品代码列)中的值必须对应于 XSessResponse 记录中的 TrackingCode
例如,以下 SQL 伪代码与 XSessResponse 表中的 AlternateCode 列匹配。
Select m.TreatmentCode as TreatmentCodeMatch, m.OfferID as OfferIDMatch, tx.*
From MyLookup m, UACI_XSessResponse tx
Where m.customerId = tx.customerId
And m.alternateCode = tx.trackingCode
And tx.mark=1
And tx.trackingCodeType = <x>
其中 <x>UACI_TrackingType 表中定义的跟踪代码。