Specifying widgets for the promotion type properties view
Declare the widgets and child list editors for business users to enter data about the new promotion type. By doing this, you create the user interface, called the properties view, for the custom promotion type. The input widgets you need to collect information from business users have already been defined for use in the existing promotion types. When creating a new promotion type, you must specify which of these widgets you need, and then arrange and customize them as required to support your promotion type.
Before you begin
About this task
When a business user is creating a promotion, only the property groups for that specific promotion type are displayed in the Promotions tool user interface.
Procedure
Example
For your custom promotion type, Customers who purchase two dining chairs (FULO-01) qualify to purchase a dining table (FULO-02) at the reduced price of $200, the code for the property group to declare the property editor widgets and child list editors looks like this:
<class name="proProductLevelPWPFixedCostDiscountProperties"
extends="wcfPropertyGroup" collapsable="false">
<wcfEnablementCondition conditionId="promotionType"
propertyName="promotionType" enablementValue="ProductLevelPWPFixedCostDiscount"/>
<wcfPropertyGroup name="purchaseConditionAndRewardGroup"
groupTitle="purchaseConditionAndRewardTitle">
<wcfPropertyChildListEditor objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Purchase"
objectTypes="Identifier_CatalogEntry,Identifier_InheritedCatalogEntry"
name="purchaseCatalogEntry" listClass="proProductElementTypeGrid" required="true"
promptText="Select_SKU_X" />
<wcfPropertyStepper objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Purchase"
propertyName="Quantity" required="true" promptText="Quantity_of_X" />
<wcfPropertyChildListEditor objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Reward"
objectTypes="Identifier_CatalogEntry" name="rewardCatalogEntry"
listClass="proProductElementTypeGrid" required="true" promptText="Select_SKU_Y" />
<wcfPropertyStepper objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Reward"
propertyName="Quantity" required="true" promptText="Quantity_of_Y" />
<wcfPropertyNumericText objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition"
propertyName="FixedCost" required="true" promptText="Discount_on_Y" />
</wcfPropertyGroup>
</class>
In this example, the code to create an instance of the
new property group in the properties view looks like this:
<class name="proPromotionManageTabPaneContent" extends="wcfPropertyPane">
.
.
.
<proProductLevelPWPFixedCostDiscountProperties/>
.
.
</class>
<PropertyGroup definitionName="proProductLevelPWPFixedCostDiscountProperties"
collapsable="false">
<EnablementCondition conditionId="promotionType" propertyName="promotionType"
enablementValue="ProductLevelPWPFixedCostDiscount"/>
<PropertyGroup name="purchaseConditionAndRewardGroup"
groupTitle="purchaseConditionAndRewardTitle">
<PropertyChildListEditor
objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Purchase"
objectTypes="Identifier_CatalogEntry,Identifier_InheritedCatalogEntry"
name="purchaseCatalogEntry" listDefinitionName="proProductElementTypeGrid"
required="true" promptText="Select_SKU_X" />
<PropertyStepper
objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Purchase"
propertyName="Quantity" required="true" promptText="Quantity_of_X" />
<PropertyChildListEditor
objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Reward"
objectTypes="Identifier_CatalogEntry" name="rewardCatalogEntry"
listClass="proProductElementTypeGrid" required="true"
promptText="Select_SKU_Y" />
<PropertyStepper
objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition/Reward"
propertyName="Quantity" required="true" promptText="Quantity_of_Y" />
<PropertyNumericText objectPath="ProductLevelPWPFixedCostDiscountPurchaseCondition"
propertyName="FixedCost" required="true" promptText="Discount_on_Y" />
</PropertyGroup>
</PropertyGroup>
In this example, the code to add the
new property group to the promotion properties view looks like this:<PropertyPane definitionName="proPromotionManageTabPaneContent">
.
.
.
<PropertyGroup baseDefinitionName="proProductLevelPWPFixedCostDiscountProperties"/>
.
.
</PropertyPane>