Purchasing discount coupons

Print

Introduction

This tutorial is for advanced users and it is considered as part 2 of the Family Plan Membership tutorial.

The use case is once again the concept of a family plan membership that gives the purchaser the option to give similar privilages to a predefined number of individuals (family members).

The approach this time is to create unique discount coupons that can be applied to get a 100% discount (this means free) when purchasing a specific CBSubs plan.

So a possible workflow is to automatically generate a coupon code that can be used X times (where X the number of family members that can be added.

Use Case Description

We will be presenting two variations of this use case:

  1. We will create a CBSubs GPL Merchandise plan that when purchased will generate (using an SQL action on the merchandise plan) a unique coupon code that can give a 100% discount when used to purchase a specific CBSubs GPL subscription plan (e.g., Single member subscription). The coupon can only be used once be a single user and can be used by up to 5 users. The actual code and its stats (number of maximum usages, times used, user id's that have already used it) will be displayed on the purchasers profile using a CB Query field.

  2. The coupon generation SQL action plan will be incorporated in the Family Member plan subscription purchase. In this variation the coupon generated will have a validity that starts with the purchase of the CBSubs GPL Family Plan subscription and ends when the subscription ends. This way the coupon code must be used before the Family Plan expires. The CB Query field will be adjusted to also show the validity dates.

 

Merchandise plan for coupon purchasing

The first use case variation calls for creating a merchandise plan that when purchased executes an SQL action to create a new CBSubs GPL Promotion in the form of a 100% discount coupon code that can be used 5 times (once by 5 different users) when purchasing a specific CBSubs plan (e.g., Single User plan). Assuming that the undiscounted price of the to be discounted (Single User plan) plan is 100 USD, we can set the purchase price of the 5-uses coupon code at 300 USD. So purchasing this way results in a substancial savings compared to purchasing 5 subscriptions individually (300 USD instead of 500 USD).

A merchandise plan can be purchased again and again by the same user. Each time the plan is purchased a unique coupon code will be generated and displayed in the purchasers profile with the configuration of a CB query field.

The CBSubs Merchandise plan has the following characteristics:

The SQL Query action that generates the coupon code has the following characteristics:

The CB Query field (Professional member add-on that needs to be installed and published) that will find all relevant coupon codes generated by a specific user has the following characteristics:

 

Screenshots for Merchandise plan use case

In addition to the detailed configuration information provided earlier, here are a series of screenshots of the various configuration areas.

CBSubs Merchandise Plan Presentation tab

CBSubs Merchandise Plan Presentation tab.

CBSubs Merchandise Plan Pricing tab

CBSubs Merchandise Plan Pricing tab.

CBSubs Merchandise Plan SQL action

CBSubs Merchandise Plan SQL action.

 

CBSubs Promotions area

CBSubs Promotions area.

CB Query field configuration settings

CB Query field configuration settings.

CB Query field profile display

CB Query field profile display.

 

Coupon Generation for Family Plan Subscription

The second use case variation calls for generating an appropriate discount coupon by executing an SQL action when a new Family Plan subscription is activated (or when a renewal takes place). The CBSubs GPL Promotion will again be in the form of a 100% discount coupon code that can be used 5 times (once by 5 different users) when purchasing a specific CBSubs plan (e.g., Single User plan).

The SQL action script used previously will be adjusted in order to:

 The SQL action script now looks like (see start_date and stop_date assignments):

Summary

This tutorial presents two use case variations that can help you automate coupon purchasing for CBSubs subscribers.

This tutorial is based on CBSubs 3.0.0. Please note that database structures are not part of CBSubs specifications and that subsequent CBSubs versions can have different database schemes. When direct accessing databases, it is recommended to have a staging site where upgrades are tested before being applied to live sites.