Develop > Presentation layer > Customize marketing > Marketing customization: Management Center > Customizing customer segments > Add a new customer segment attribute to Management Center


Create the properties view for the customer segment attribute

Declare the user interface widgets to capture the business user input for the new attribute. The properties view for a new customer segment attribute consists of one or more widgets. You can add the new widgets to any tab on the existing properties view for customer segments in the Marketing tool.


Before you begin

Review the following topics to ensure that you understand the properties view widgets available for use in Management Center and the wcfPropertyGroup class that extend:

The properties view for a new customer segment attribute is an extension class of the wcfPropertyGroup class. The properties view widgets have already been defined for use in the Management Center. When creating a new customer segment attribute, specify which of these widgets you need, and then arrange and customize them as required. At a minimum, a wcfPropertyCombobox widget is required, bound to the template property of the object defined for this customer segment attribute.


Procedure

  1. Review the available widgets for Management Center properties views and plan the user interface for the customer segment attribute.

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

  3. Create a directory to store the new properties view file. Use a directory structure similar to the following example:

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

  4. Create an OpenLaszlo class file with this syntax: attribute_namePropertiesView.lzx, for example, LoyaltyPointsPropertiesView.lzx.

  5. Define the new properties view as an extension class of wcfPropertyGroup. Here is an example:

    <class
        name = "LoyaltyPointsProperties"
        extends = "wcfPropertyGroup"
        displayGrouping = "true"
        collapsable = "false">    
    <wcfPropertyCombobox propertyName = "template" objectPath = "TopAndList/LoyaltyPoints" promptText = "Loyalty points"/>    
    <wcfPropertyGroup name = "notBetween" collapsable = "false">        
    <wcfEnablementOrCondition conditionId = "notBetween">            
    <wcfEnablementCondition
                    conditionId = "lessThan"
                    objectPath = "TopAndList/LoyaltyPoints"
                    propertyName = "template"
                    enablementValue = "lessThan"/>            
    <wcfEnablementCondition
                    conditionId = "greaterThan"
                    objectPath = "TopAndList/LoyaltyPoints"
                    propertyName = "template"
                    enablementValue = "greaterThan"/>        
    </wcfEnablementOrCondition>        
    <wcfPropertyStepper
                objectPath = "TopAndList/LoyaltyPoints/LoyaltyPointsList/LoyaltyPointsCondition"
                propertyName = "conditionValue"
                required = "true"
                promptText = "Number of loyalty points"
                minimumValue = "0"/>    
    </wcfPropertyGroup>    
    <wcfPropertyGroup name = "between" collapsable = "false">        
    <wcfEnablementCondition
                conditionId = "between"
                objectPath = "TopAndList/LoyaltyPoints"
                propertyName = "template"
                enablementValue = "between"/>        
    <wcfPropertyStepper
                objectPath = "TopAndList/LoyaltyPoints/LoyaltyPointsList/LoyaltyPointsCondition[conditionOperator=&gt;=]"
                propertyName = "conditionValue"
                required = "true"
                promptText = "Minimum number of points"
                minimumValue = "0"/>        
    <wcfPropertyStepper
                objectPath = "TopAndList/LoyaltyPoints/LoyaltyPointsList/LoyaltyPointsCondition[conditionOperator=&lt;=]"
                propertyName = "conditionValue"
                required = "true"
                promptText = "Maximum number of points"
                minimumValue = "0"/>    
    </wcfPropertyGroup>
    </class>
    

  6. Save and close the file.

  7. Add a reference to the new properties view file 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 properties view file should look like the following example:

    <include href="../../your_company_name/marketing/propertiesViews/customerSegment/attribute_namePropertiesView.lzx"/>

  8. Save and close the file.

  9. Add the properties view for the new customer segment attribute to the appropriate tab in the existing customer segment properties view.

    The CustomerSegmentPropertiesView.lzx file defines all the tabs in the customer segment properties view, such as the Demographics tab and the Address tab. For each tab, this file specifies the instance of the properties class for the customer segment attributes that display on the tab. The order of the properties class instances in this file determines the order of the customer segment attributes in the user interface.

    1. Open the following file in an editor:

      LOBTools/WebContent/WEB-INF/src/lzx/commerce/marketing/propertiesViews/CustomerSegmentPropertiesView.lzx

    2. Add an instance of the properties class for your new customer segment attribute under the appropriate tab.

      For example, to instantiate the new loyalty points properties class (<LoyaltyPointsProperties/>) in the Miscellaneous tab, add the line of code shown in bold font:

      <wcfPropertyTabPane    name="miscTab" text="${mktMarketingResources.csMiscellaneousTab.string}">                
        
      <wcfPropertyPane>      
      <wcfPropertyGroup name="miscGroup" collapsable="false" displayGrouping="true" >            
      <mktLastVisitDateProperties/>          <LoyaltyPointsProperties/>
              
      <mktJobFunctionProperties/>         
      <mktInterestsProperties/>         
      <mktCompanyNameProperties/>         
      <mktCurrencyProperties/>         
      <mktLanguageProperties/>         
      <mktComMethodProperties/>      
      </wcfPropertyGroup>   
      </wcfPropertyPane>
      </wcfPropertyTabPane>
      

    3. Save and close the file.


+

Search Tips   |   Advanced Search