Andy Xu's weblog: Commerce Server, .net and more

Coupon (Promotion code) functionality provided by Commerce Server 2002 Feature Pack 1

Coupons in Commerce Server history (or the lack of it)

One major piece added in Commerce Server 2002 FP1 is Coupon/Promotion Code functionality in marketing system. Before FP1, you can only use so-called "automatically applied discount", meaning as long as shopper's basket contains item(s) or order meeting the discount condition and can be taken price off the awarded item(s), the discount will (automatically) be applied.

In real world, online business usually requires another level of validation of the discounts -- a "secret" code which needs to be input correctly to allow the discount to be applied. Like I said, before FP1, Commerce Server doesn't provide out-of-box solution. Quite often we've seen developers extend the campaign system one way or the other to implement coupon function. Most popular way seems to take advantages of targeting context to set the user input coupon code and use bizdesk to create discount eligibility requirement to specific coupon residing in the targeting context. The drawback of this solution: when the coupon code is per user base, (meaning different shopper knows different code and more than one code are valid for same discount.) It is a headache, or maybe even impossible thing to manage using eliglibility requirement.

Three coupon types

To help you to choose the correct coupon function in FP1, I need to introduce the three type of coupons first.

Public coupon, the scenario is, basically, the coupon is known in public. In another word, all shoppers coming to the site share the same code to get the discount. The number of coupon code is 1.

Private coupon, the scenaio is that the online business generates many coupon codes and sends them to targeted users respectively. The target users, knowing their codes, can forward the codes to their friends and their friends can use their codes as well. So from the marketing system point of view, many coupon codes point to same discount but using each code doesn't require an identity check in runtime.

Restricted coupon, similar to private coupon, different codes are sent to different targeted users but only the targeted users themselves can use their respective codes. That is, when coupons are generated, each of them is associated with a targeted identity and in runtime, an identity check will happen and only the associated identity can use the code to get the discount.

Coupon creation

From the new winform Discount Manager, you can create all three types of coupons. Creating public coupon is easy -- just need to specify the one and only, all well-known code. However, creating private and/or restricted coupon requires go through a new coupon generation service (COM+ component). The service itself is created and configured during Feature Pack 1 installation. Make sure the identity you configure to run coupon generation service have enough permission in your marketing database -- It requires at least being granted mktg_promoCodeGenerator_role (and in order to protect your system, please don't grant other unnecessary database roles).

Why using a generation service, you may ask. Well, the most significant reason is that enables an asynchornized implementation so if you want to create a large number of coupons, for example, one million codes (and yes, we do test one million codes generation. so feel free to do it.), you can start configure the generation from UI and click the button and the UI control is right back to you so you can do other discount management work while the backend is generating coupons at the same time. Also, this approach helps to make sure the data integrity (no duplicate codes generated), scalability and fault-tolerant ability (fail-over even a SQL server reboot during code generation).

Coupon usage limit

When you generate coupon using Discount Manager, you can control the number of times a code can be used by setting the usage limit. So setting the usage limit to 1000 means the specific code can be used for up to 1000 times and setting it to 0 means the unlimited usage. Pretty straightforward.

However, please note the usage limit has a different impact on public coupons compared with other coupons. Since a public coupon can have only one code, so the usage limit is for everyone using this coupon. For example, a public coupon "ABC123" has a usage limit as 1000, everybody comes to the site can use it and no matter who uses it, the avaiable usage count will keep decreasing. Private and restricted coupons, on the other hand, have many codes and each code has that usage limit specified. Another example, a site has 1 million registered user, we can create a restricted coupon, which has 1 million different codes, each code is sent to a different user and usage limit is 1000. So shopper A logs in and can use his code up to 1000 times and it won't affect number of coupon shopper B can use (since B has a differnt code).

So here you go, a new out-of-box solution for coupon code. Hope you can choose the correct type of coupon to fit your business need and add more flexibility in your merchandizing system. And we welcome your comments/feedback, espeically any unaddressed business needs.

Published Tuesday, June 22, 2004 12:37 AM by yuxiangxu
Anonymous comments are disabled

This Blog

Syndication

Tags

No tags have been created or used yet.

News

    These postings are provided "AS IS" with no warranties, and confer no rights.
    Use of included script and code samples are subject to the terms specified here.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker