Steps:
1. Create Screen-Segments with ,
<screen-segment display-name-resource="closenessQualifierTitle" ></screen-segment>,
2. Add display-once=true to screen-segments, because it should be mandatory for all the templates.
<screen-segment display-name-resource="closenessQualifierTitle"
display-once="true"></screen-segment>,
3. Have one or more line elements for Closeness Qualifier information.
<line>
<label id="amountToSpend"
display-name="Amount to spend:"/>
<textInput id="textId${inc}" placeholder-name="myAmount"/>
</line>
Finally it looks like:
<screen-segment display-name-resource="closenessQualifierTitle"
display-once="true">
<line>
<label id="amountToSpend"
display-name="Amount to spend:"/>
<textInput id="textId${inc}" placeholder-name="myAmount"/>
</line>
</screen-segment>
3. Create a Promotion (Upsell) in ACC/BCC (eg: When spending limit crosses $2000, Then that customer is eligible for free shipping ).
4. Create item-properties section which will including PMDL Rule,
Note: There should be only one <item-properties> for each and every screen segment.
<item-properties>
<property name="closenessQualifiers">
<item-properties>
<property name="pmdlRule">
<![CDATA[
<pricing-model>
<qualifier>
<comparator name="greater-than-or-equals">
<value>order.priceInfo.amount</value>
<constant>
<data-type>java.lang.Double</data-type>
<string-value> ${myAmount} </string-value>
</constant>
</comparator>
</qualifier>
</pricing-model>
]]>
</property>
</item-properties>
</property>
</item-properties
5. Comparator name "greater-than-or-equals" will give you a exact result when spending limit crosses $2000 it allowing the new promotions to be display in the application.
6. Note : When we are creating PMDL rule then we should have
<property name="closenessQualifiers"> under item-property tag.
7. Spend around $2000 and see the application, Now you could see the free shipping available on your application (Note: you must create shipping flags for displaying free shipping messages)
8. That's it.
No comments:
Post a Comment