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
About this task
Procedure
- Review the available widgets for Management Center properties views and plan the user interface for your customer segment attribute.
- Open HCL Commerce Developer and switch to the Enterprise Explorer view.
- 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/
-
Create the new properties view file. Name the file using this syntax:
attribute_namePropertiesView.xml
, for example, LoyaltyPointsPropertiesView.xml. -
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=>=]" 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>
- Save and close the file.
- Define the new properties view file wherever it is used.
-
In the existing customer segment properties view, add the properties view for the new customer
segment to the appropriate tab.
- 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.
- 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>
- Save and close the file.
- Open the
LOBTools/WebContent/WEB-INF/src/xml/commerce/marketing/propertiesViews/CustomerSegmentPropertiesView.xml
file in an editor.