Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Discounts on Shipping Methods

ravikanth | October 25, 2008

Out of box, commerce server provides six types of discounts. This will satisfy majority of business requirements to provide flexible discounts to their customers but in today’s dynamic world these discounts are not enough. What if the business wants to give shipping discounts based on shipping method selected. Many developers feels that this requirement cannot be achievable but here are the two workarounds to achieve this requirement.

  1. Using profile Targeting
  2. Using Custom Pipeline.

Using Profile Targeting:

This approach is similar to current approach but small changes.

  • Extend profile system to capture order shipping method. The value will be set/updated during checkout process.
  • Create different order level discounts for every shipping method. I.e., in the target expression we will target it on shipping method. Consider following table.
Shipping Method Minimum Order Amount Priority Amount Off
ByGround

20

4

10%

ByGround

100

3

15%

ByGround

200

2

50%

ByGround

300

1

100%

Here we will create four discounts and target to “By Ground” shipping method.

 

 

In this case commerce server decides which discount to apply to the basket. The administrator can set the priority to discounts so that when two are more discounts are eligible CS can apply top priority discount.

Advantages:

  • Easy to implement.
  • Business users can create new discounts using marketing manager.
  • Can do user targeting (applied only to users of California).

Disadvantages:

  • Mistakes in priorities may leads to problems.
  • If there are more rules, its end up creating multiple discounts (leads to confusion).

Using Custom Pipeline

In this approach, we are implementing shipping discounts based on business rules. We will create a small utility by which the users can capture all rules data. For example,

Shipping Method Minimum Order Amount Priority Amount Off
ByGround

20

4

10%

ByGround

100

3

15%

ByGround

200

2

50%

ByGround

300

1

100%

The application allows users to extract this data into XML

<Discounts>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 20 </MinimumOrder>
          <Priority>4</ Priority>
          <AmountOff>10</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 50 </MinimumOrder>
          <Priority>3</ Priority>
          <AmountOff>15</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 200 </MinimumOrder>
          <Priority>50</ Priority>
          <AmountOff>50</ AmountOff>
     </Discount>
     <Discount>
          <ShippingMethod>By Ground </ShippingMethod>
          <MinimumOrder> 300 </MinimumOrder>
          <Priority>1</ Priority>
          <AmountOff>100</ AmountOff>
     </Discount>
</Discounts>

We will create a custom pipeline component which will take this value as input. This input can be provided by administrator through pipeline component editor as shown below.

 

This component will append business rule data to the dictionary so that the data can be available to rest of the components.

“Commerce.ShippingMethodRouter” will load corresponding shipping calculator based on shipping method. In current scenario, it will call shipping calculator component which interacts with third party web services to calculate shipping cost. Since we have business rules available to shipping cost calculator, it’s easy to get what discount we can provide. We will deduct cost from the actual shipping cost before assigning it back to dictionary.

Note: We can also implement this by using BizTalk rule engine instead of XML.

Advantages:

  • Can implement many rules?
  • No need to create different promotions.

Disadvantages:

  • Every time the business user has to reach to admin to amend latest changes.
  • We cannot implement user targeting (this discount is applicable to only California shipments)
Comments
No Comments »
Categories
commerce server 2007
Tags
marketing system, Shipping Methods
Comments rss Comments rss
Trackback Trackback

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool
  • Marketing Web service Exception: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
  • Download Commerce Server 2009 Help Document
  • Commerce Server 2009 work with SharePoint 2010?
  • Failed to set value for profile property ‘email_address’.
  • ArgumentException: An item with the same key has already been added.
  • Please note that one or more items were removed from your order because the product is no longer sold.
  • How to Avoid Duplicate Orders Numbers in Commerce Server
  • Error: Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault

Archives

  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category CategoryConfiguration commerce server commerce server 2007 commerce server manager Commerce Server SP2 discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .