Develop > Presentation layer > Customize marketing > Marketing customization: Management Center > Customizing triggers, targets, and actions > Add a new trigger, target or action


Register controller command names to match in a behavior rule

If you are creating a new trigger, target, or action that specifies a controller command in its behavior rule, you must register the controller command in a custom version of the marketing component configuration file (wc-admin-component.xml). When you register the controller command, also specify the Web application paths to exclude when the controller command is run from that Web application. This ensures that the behavior rule will match only for applicable Web applications that use the controller commands.

If the campaign element template definition does not have a behavior rule that matches a controller command, you can skip this step.


Before you begin

To understand the properties that the wc-admin-component.xml file contains, see Marketing component configuration file (wc-admin-component.xml).


Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  2. Create a com.ibm.commerce.marketing-ext folder for the customized marketing component configuration file at the following path:

    WC_EAR\xml\config\com.ibm.commerce.marketing-ext\.

    If this folder already exists and it contains a customized version of the wc-admin-component.xml file, or if a customized version exists elsewhere, then open the customized version and skip to the next step; otherwise, complete these substeps:

    1. Navigate to the default marketing component configuration file at the following path:

      WC_EAR\xml\config\com.ibm.commerce.marketing\

    2. Copy the wc-admin-component.xml file to the new WC_EAR\xml\config\com.ibm.commerce.marketing-ext\ folder.

    3. Open the copied wc-admin-component.xml in an editor. This copy becomes the customized version of the wc-admin-component.xml file.

  3. Register the controller command specified in the behavior rule in the customized version of the wc-admin-component.xml file:

    1. In the file, locate the following line of code:

      <!-- BEHAVIOR RULE - PROCESS COMMAND ON EXIT -->
      

    2. Verify the command to match is not already registered in the file.

    3. To register the command, add two lines of code that use the following syntax:

      <_config:property name="processOnCommandExitcommand_name" value="full_interface_name"/>
      <_config:property name="processOnCommandExitWebappFiltercommand_name" value="webapp1,webapp2,webapp3"/>
      

      Where:

      • command_name is the name of the controller command specified in the behavior rule.

      • full_interface_name is the full interface name of the controller command.

      • webapp1,webapp2,webapp3 is a comma-separated list of Web applications in which this event should not be matched.

      For example, for a trigger that detects when a customer logs onto the store, the lines of code to register the LogonCmd controller command look like this:

      <_config:property name="processOnCommandExitLogonCmd" value="com.ibm.commerce.security.commands.LogonCmd"/>
      <_config:property name="processOnCommandExitWebappFilterLogonCmd" value="/webapp/wcs/tools/servlet,/webapp/wcs/orgadmin/servlet,/webapp/wcs/admin/servlet"/>
      

      In the previous example, the second line ensures that logon events will be ignored for any logon commands issued by the administrative tools.

  4. Within the <_config:configgrouping name="MarketingRuntime"> element, remove any properties that are not set differently from the default marketing component configuration file. The customized file must contain only the differences.

  5. Save and close the customized file.

  6. To make the changes in the file take effect in the development environment, restart the WebSphere Commerce server.


Previous topic: Create the campaign element template definition


Next topic: Create the campaign element task command


+

Search Tips   |   Advanced Search