Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We've been asked to support "100% redeem codes" by the end of Q3; "coupons" ("redeem codes" tied to discounts less than 100%) will likely need to be supported in the future. In light of this, we want to get an idea of how we'll support different types of discounting. Oscar ships with support for what it calls "vouchers," which are handled by the Voucher app. It's most likely the application we'll want to extend to model what we currently refer to as "redeem codes" and "coupons."

...

Oscar uses conditions to determine if a basket is eligible for a benefit. Oscar comes with three pre-defined conditions, but also includes a base Condition class which we can extend in order to create and register custom conditions. Conditions show up in the Oscar dashboard where they are linked to a range object, a subset of the product catalog to which the condition applies. The first of Oscar's built-in conditions is count-based, requiring the customer to purchase `count` products in order to qualify. The second is coverage-based, requiring the customer to purchase `count` distinct products in order to qualify. The third is value-based, requiring the customer to spend `value` on products in order to qualify.

An offer’s availability can be controlled by several settings which can be used in combination. These include date ranges, a maximum number of global, user, and basket-based "applications" (i.e., uses of the offer), and a maximum global discount (i.e., total amount of benefit given; for example, $10,000).

Oscar divides the benefits tied to offers into two categories: those benefits which apply to baskets, and those benefits which apply to shipping. Since we sell digital products, we most likely won't need to concern ourselves with shipping benefits (unless we start selling swag, like t-shirts). Basket benefits include fixed discounts (e.g., $5 off), percentage discounts (e.g., 5% off), fixed prices (e.g., $5 flat), and "multibuys" (i.e., get the cheapest product which meets the specified condition for free).

Data Model

Assuming we've defined a product catalog, it looks like we should be able to model "redeem codes" and "coupons" using Oscar's Voucher and Offers apps. The offer backing a "100% redeem code" for single enrollment products could be constructed using 1) a count-based condition with a value of 1, bound to a range of eligible enrollment products, and 2) a percentage discount benefit with a value of 100. Likewise for single enrollment "coupons"; the offer backing one could be constructed using 1) a count-based condition with a value of 1, bound to a range of eligible enrollment products, and 2) a percentage discount benefit with a value between 0 and 100. Vouchers would then be used to link baskets to these offers.

For Further Consideration

...

Second, should vouchers be considered products in their own right? For example, I may want to purchase an activation code for Diana a friend which she can use to take a paid course for free.

...