Changing the behavior of an existing campaign element by customizing its template
Certain
details about how
a trigger, target, or action works are defined in the campaign element
template definition for the trigger, target, or action. To change
any details in the existing campaign element template definition,
create a customized campaign element template definition with the
same name and any changed parameters. Then register your customized
campaign element template in the DMELETEMPLATE table. As a result,
the marketing services will use your customized template instead of
the default template.
Before you begin
To understand the purpose and contents of a campaign element template definition, read Campaign element template definitions.
About this task
Marketing
Managers at your site want to use the Online Behavior target to record
customers' searching behavior. To detect the search term a customer
has used, the Online Behavior target checks the value of the URL parameter searchTerm on
a search results page. Your site does not use the URL parameter searchTerm;
instead, it uses s. Therefore, to make this target
work for your site, you must register a custom campaign element template
definition for the Online Behavior target in the DMELETEMPLATE table.
Your custom template will have the same template name as the default,
but you must change this line of code within the behavior rule XML
fragment to specify the URL parameter s instead
of searchTerm:
<Variable name="searchTerm" value="MARKETING_searchTermList" type="NVP"/>
Procedure
- For the trigger, target or action you want to change, determine the name of its campaign element template. See List of shipped campaign element templates and task commands.
- Access the development database.
- To extract
the existing campaign element template definition
from the DMELETEMPLATE table so that you can create a custom template,
run a SQL command. Use the following example SQL command, but replace
name_of_template
with the campaign element template name you want to extract:select * from dmeletemplate where name = 'name_of_template';
- Make the required changes to the code for the campaign element template.
- Write a SQL command to register
your custom campaign element
template definition in the DMELETEMPLATE table as a new row. For the
example described earlier in this topic, the SQL command might look
like this (information about the black numbered call-outs follows
the sample command):
insert into dmeletemplate (dmeletemplate_id, storeent_id, dmelementtype_id, name, implxml, behaviorxml, relatedxml) 1 values (1205, 0, (select dmelementtype_id from dmeletemplate where dmeletemplate_id = 205), 2 (select name from dmeletemplate where dmeletemplate_id = 205), (select implxml from dmeletemplate where dmeletemplate_id = 205), '<BehaviorRule command="AjaxCatalogSearchView,CatalogSearchResultView" action="record" maxSize="MARKETING_numberOfTimes" relativeDays="MARKETING_daysOperator" comparison="MARKETING_comparison" caseSensitive="false"> 3 <Variable name="s" value="MARKETING_searchTermList" type="NVP"/> <Variable name="MARKETING_beforeAfterOnDate" value="MARKETING_date1" type="CURRENTDATE"/> <Variable name="MARKETING_beforeDate" value="MARKETING_date2" type="CURRENTDATE"/> </BehaviorRule>', (select relatedxml from dmeletemplate where dmeletemplate_id = 205) );
- 1: You have
two options for the
storeent_id
value:- If
you want the custom campaign element template to override the
default template for all stores, then insert
0
for thestoreent_id
, as shown in this example. - If
you want the custom campaign element template to override the
default template for only a specific store, then insert the
storeent_id
value for the specific store instead of0
. This is the value located in the STOREENT_ID column of the STOREENT database table.
- If
you want the custom campaign element template to override the
default template for all stores, then insert
- 2: Do not rename the custom campaign element template; keep the same name used for the default template.
- 3: This line represents the changed
URL parameter. The value for
name
is changed tos
instead ofsearchTerm
.
- 1: You have
two options for the