Creating 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 topic to ensure that you understand the properties view widgets available for use in Management Center:

About this task

The properties view widgets have already been defined for use in the Management Center. When creating a new customer segment attribute, you must specify which of these widgets you need, and then arrange and customize them as required.

Procedure

  1. Review the available widgets for Management Center properties views and plan the user interface for your customer segment attribute.
  2. Open HCL Commerce Developer and switch to the Enterprise Explorer view.
  3. Create a directory to store your new properties view file.
    Use a directory structure similar to the following example:
    • LOBTools/WebContent/WEB-INF/src/xml/your_company_name/marketing/propertiesViews/customerSegment/
  4. Create the new properties view file. Name the file using this syntax: attribute_namePropertiesView.xml, for example, LoyaltyPointsPropertiesView.xml.
  5. In the properties view file, define the new properties view as a property group.
    For example, add this element as a child of the document root Definitions element:
    <PropertyGroup
       definitionName = "LoyaltyPointsProperties"
       displayGrouping = "true"
       collapsable = "false">
       <PropertyCombobox propertyName = "template" objectPath = "TopAndList/LoyaltyPoints"
          promptText = "Loyalty points"/>
       <PropertyGroup name = "notBetween" collapsable = "false">
          <EnablementOrCondition conditionId = "notBetween">
             <EnablementCondition
                conditionId = "lessThan"
                objectPath = "TopAndList/LoyaltyPoints"
                propertyName = "template"
                enablementValue = "lessThan"/>
             <EnablementCondition
                 conditionId = "greaterThan"
                 objectPath = "TopAndList/LoyaltyPoints"
                 propertyName = "template"
                 enablementValue = "greaterThan"/>
          </EnablementOrCondition>
          <PropertyStepper
             objectPath = "TopAndList/LoyaltyPoints/LoyaltyPointsList/LoyaltyPointsCondition"
             propertyName = "conditionValue"
             required = "true"
             promptText = "Number of loyalty points"
             minimumValue = "0"/>
       </PropertyGroup>
       <PropertyGroup name = "between" collapsable = "false">
          <EnablementCondition
             conditionId = "between"
             objectPath = "TopAndList/LoyaltyPoints"
             propertyName = "template"
             enablementValue = "between"/>
          <PropertyStepper
             objectPath = "TopAndList/LoyaltyPoints/LoyaltyPointsList/LoyaltyPointsCondition[conditionOperator=&gt;=]"
             propertyName = "conditionValue"
             required = "true"
             promptText = "Minimum number of points"
             minimumValue = "0"/>
          <PropertyStepper
             objectPath = "TopAndList/LoyaltyPoints/LoyaltyPointsList/LoyaltyPointsCondition[conditionOperator=<=]"
             propertyName = "conditionValue"
             required = "true"
             promptText = "Maximum number of points"
             minimumValue = "0"/>
        </PropertyGroup>
    </PropertyGroup>
  6. Save and close the file.
  7. Define the new properties view file wherever it is used.
  8. In the existing customer segment properties view, add the properties view for the new customer segment to the appropriate tab.
    1. Open the LOBTools/WebContent/WEB-INF/src/xml/commerce/marketing/propertiesViews/CustomerSegmentPropertiesView.xml file in an editor.

      The CustomerSegmentPropertiesView.xml 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 property group definition for the customer segment attributes that display on the tab. The order of the property groups in this file determines the order of the customer segment attributes in the user interface.

    2. Add a PropertyGroup element for your new customer segment attribute under the appropriate tab.
      For example, to instantiate the new loyalty points property group in the Miscellaneous tab, add the PropertyGroup element shown in bold font:
      
      <PropertyTabPane name="miscTab" text="${marketingResources.csMiscellaneousTab}">
      	<PropertyPane>
      		<PropertyGroup collapsable="false" displayGrouping="true" name="miscGroup">
      			<PropertyGroup baseDefinition="cmc/marketing/LastVisitDateProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/JobFunctionProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/InterestsProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/CompanyNameProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/CurrencyProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/LanguageProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/ComMethodProperties"/>
      			<PropertyGroup baseDefinition="cmc/marketing/LoyaltyPointsProperties"/>
      		</PropertyGroup>
      	</PropertyPane>
      </PropertyTabPane>
    3. Save and close the file.