Develop > Presentation layer > Customize marketing > Marketing customization: Management Center > Customizing triggers, targets, and actions > Campaign element template definitions


Implementation definition: for targets and actions

The implementation definition is an XML fragment in a campaign element template definition. All targets and actions must have an implementation definition.

The purpose of the implementation definition XML segment for a target or action is to:

  1. Specify the unique name of the campaign element template for the target or action.

  2. Specify the task command associated with the target or action. See Campaign element task commands.

  3. Specify the campaign element template parameters to pass to the task command. See Campaign element template parameters.

    • For a target, the parameters define the criteria for the target. For example, a target can require a customer to belong to the Preferred Customer customer segment. If the customer matches the criteria for the target, the task command will return true.

    • For an action, the parameters define what to do, for example, send the customer an e-mail or display content in an e-Marketing Spot.


Where implementation definitions are stored

Table: DMELETEMPLATE

Column: IMPLXML


Format of implementation definitions

Implementation definitions use the following format:

<FlowElementImplementation type="UNIQUE_NAME">    
<Implementation invocationType="TaskCommand">        
<Class name="TASK_COMMAND_CLASS_NAME">                
<Argument name="paramName1" value="MARKETING_paramName1"/>                
<Argument name="paramName2" value="paramValue2"/>        
</Class>    
</Implementation>
</FlowElementImplementation>


Parameters in implementation definitions

Each parameter that an implementation definition can contain, as shown in the previous format example, is described here:

type

This is the unique name of the campaign element template for this target or action.

invocationType

This value is always TaskCommand.

For the <Class> element: Each target and action has an associated task command. This must be a class that implements the MarketingCampaignElementTaskCmd interface.

name

This is the name of the campaign element task command class for this campaign element. If you are creating a new target or action, then whatever name you specify here must match the name of the custom task command you create to support the new campaign element. Here is an example:

com.your_company_name.marketing.commands.elements.CustomLevelOfSupportTargetTaskCmd

For the <Argument> element: The implementation definition XML can have zero or more of these campaign element template parameters. When a customer reaches a target or action element in a marketing activity, the marketing services pass the parameters to the campaign element task command. The task command retrieves the parameters using the getElementParameters method and then uses the parameters to evaluate the target or perform the action.

name

This is the name of the parameter that must be passed to the task command for processing so that the target or action can do its work.

value

This is the value of the parameter. If the parameter value is coming from the user interface, then the value must be in the format MARKETING_paramName. If the parameter value is coming from somewhere other than the user interface, then the value does not need the MARKETING_ prefix.


Examples

Here are some examples of XML fragments for implementation definitions:

For an action that displays a category recommendation in an e-Marketing Spot on a store page:

<FlowElementImplementation type="Category">    
<Implementation invocationType="TaskCommand">        
<Class name="com.ibm.commerce.marketing.commands.elements.DisplayCategoryActionTaskCmd">            
<Argument name="categoryIdList" value="MARKETING_categoryIdList"/>        
</Class>    
</Implementation>
</FlowElementImplementation> 

For a target that checks whether a customer is in a customer segment:

<FlowElementImplementation type="Customer Segment">    
<Implementation invocationType="TaskCommand">        
<Class name="com.ibm.commerce.marketing.commands.elements.CustomerSegmentTargetTaskCmd">            
<Argument name="segmentIdList" value="MARKETING_segmentIdList"/>            
<Argument name="anyOrAll" value="MARKETING_anyOrAll"/>            
<Argument name="containsOperator" value="MARKETING_containsOperator"/>        
</Class>    
</Implementation>
</FlowElementImplementation>


Related concepts

Campaign element template definitions

Implementation definition: for triggers

Behavior rule definition

Related rule definition

Campaign element template parameters


+

Search Tips   |   Advanced Search