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


Create the summary for the campaign element

To display summary text below the campaign element in the Activity Builder work area, create a new extension class for this summary. In the Activity Builder, business users can read the summary text to quickly understand how an element is being used in a Web or Dialog activity.


Before you begin

The summary class for a new campaign element is an extension class of the mktFlowElementSummary class. Review the following topic to ensure that you understand the class:

This is an example of the summary for a target as it would display to a business user in the Activity Builder work area; the summary is the text Level of support is: Gold:

Typically, summary text can be either static text or a combination of static and dynamic text. In the previous example, the text Level of support is: is static, whereas the text Gold changes dynamically, depending on whether the business user specifies, Gold, Silver, or Bronze in the properties of the target. You can review additional examples of summaries by looking at Web and Dialog activites in the Marketing tool.

Consider using the summary class of an existing, similar campaign element as a starting point for the new campaign element. The existing summary class files are stored here:

LOBTools/WebContent/WEB-INF/src/lzx/commerce/marketing/restricted/propertiesViews/activityBuilder/


Procedure

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

  2. Create a directory to store the new summary file. Use a directory structure similar to the following example:

    LOBTools/WebContent/WEB-INF/src/lzx/your_company_name/marketing/propertiesViews/activityBuilder/

  3. Create an OpenLaszlo class file with this syntax: campaign_element_nameSummary.lzx, for example, CustomLevelOfSupportSummary.lzx.

  4. Define the new summary class. Here is the code that produces the summary class in the previous example:

    <class name="extCustomLevelOfSupportSummary" extends="mktFlowElementSummary">    
    <mktFlowSummaryParam name="support" propertyName="supportLevel"/>    
    <method name="updateSummary" args="e">  1 
           
    <![CDATA[
            var summary="";         if((this.resolvedParams["support"] !=null) && (this.resolvedParams["support"] !="")) {
            summary="Level of support is: " + this.resolvedParams["support"]);         }
            this.setSummaryText(summary);  2 
            ]]>    
    </method>
    </class>
    

    The following describes the lines with black numbered callouts:

    •  1  The updateSummary method sets the summary text for the campaign element.

    •  2  The updateSummary method must call the setSummaryText method with the summary text.

  5. Register this new summary class in the MarketingExtensionsLibrary.lzx file.

    The file is stored at this path:

    LOBTools/WebContent/WEB-INF/src/lzx/commerce/marketing/

    The line of code that references the new summary class should look like the following example:

    <include href="../../your_company_name/marketing/propertiesViews/activityBuilder/campaign_element_nameSummary.lzx"/>


Previous topic: Create the properties view for the campaign element


Next topic: Add the campaign element to the element palette in the Activity Builder


+

Search Tips   |   Advanced Search