User Tools

Site Tools


en:preparing_sambapos_to_sell_coffee_coupons

This is an old revision of the document!


Preparing SambaPOS to Sell Coffee Coupons

Promotion Coupon is an entity that we use to enter free items to tickets. This is a well formatted random number. We can print this number as a barcode or QR Tag. When this number is scanned on a SambaPOS terminal it will add related product into the ticket as a gift product. When redeemed we’ll update coupon status so it can’t be used multiple times.

After finishing this chapter you can create coupons and sell them through a ticket. For example you can sell 100 coffee coupons with a discounted price. That can be a company that wishes to give coffee coupons to their personnel.

On next chapter we’ll see how to record sales on a customer card and give free coupons for 6 coffee purchases.

Creating Coupon Entity

We’ll create new Entity Type for Coupons. When a new coupon created we’ll store it as a new entity. Primary field of coupon entity is Coupon Number. This number will be a 9 digit number. Eight digits are random generated numbers and ninth digit is check digit to validate number. It starts with CP prefix so we can understand entered random number is a Coupon Number. As a result Coupon Numbers becomes 11 digit numbers. For easy editing we’ll split this number with minus characters. On Primary Field Format C is a place holder for a single character. Define length and editing format as CCCCC-CCC-CCC. Read Primary Field Editing Formats document for more info.

We’ll create some custom fields for coupons.

We have three custom fields.

  1. Menu Item Name: This field used to assign Coupon to a Menu Item. So when redeemed the menu item typed there will be added as a gift. Instead of assigning coupons to a single menu item we created a field for more flexibility in case of we want to create coupons for other menu items.
  2. Redeemed: We’ll track status of coupon under this field. It have three values. New created Coupons will have “No” value. When we use coupon in a ticket it will be “In Ticket” and when ticket submitted value becomes “Yes”. When value is “Yes” it means this coupon used and can’t used again.
  3. Expiration Date: We can set an expiration date for coupons so it can’t be used after expiration date.

Adding Actions to Update Field Values

We’ll need actions to update Coupon custom fields. For example we have to change Redeemed value to “Yes” when coupon is used in a ticket. Let’s create a new action to update Coupon Menu Item Name.

Action Name will be Update Coupon Menu Item Name and Action Type will be Update Entity Data. We’ll set Entity Type Name as Coupons so this action updates Coupons. Field Name will be Menu Item Name since we store menu item names under this field. We’ll send Coupon Number and Menu Item Name values from calling rule for this reason we’ll configure these parameters as variables.

We need another action to update Coupon Redeem Status. Let's clone a new action from previous one.

Change action name to Update Coupon Status and Field Name as Redeemed. We’ll use this action when we create new coupons and when we need to disable them.

Creating Coffee Coupon Product

Until this step we created Coupon Entity Type, needed custom fields and two actions to update these custom fields. Now we’ll need a product called “Coffee Coupon” to sell Coffee Coupons.

  1. Create a new menu category called “Coupons”.
  2. Create “Coffee Coupon” product. Group Code is “Coupons” and Tag it as Coffee to relate it with Coffee Product. Enter desired price for the coupon and add it to Coupons Category.

You should have something like this.

You can add more coupon products under this category. Coffee price is $1.45 on my sample data so I’ve priced Coffee Coupon as $1.45 to match it to Coffee price.

en/preparing_sambapos_to_sell_coffee_coupons.1379253259.txt.gz · Last modified: 2013/09/15 21:54 (external edit)