This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:preparing_sambapos_to_sell_coffee_coupons [2013/09/15 19:09] admin [Handling Payment to update Order states] |
en:preparing_sambapos_to_sell_coffee_coupons [2013/09/15 21:37] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Preparing SambaPOS to Sell Coffee Coupons ====== | ====== Preparing SambaPOS to Sell Coffee Coupons ====== | ||
- | {{:en:promotions:Coupons1.jpg?150 |}} | ||
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. | 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. | ||
Line 126: | Line 125: | ||
As the order state changes from ''Coupon Ordered'' to ''Coupon Paid'' we’ll create the Coupon Entity. To be able to handle it we’ll create a rule for ''Order State Updated'' event. | As the order state changes from ''Coupon Ordered'' to ''Coupon Paid'' we’ll create the Coupon Entity. To be able to handle it we’ll create a rule for ''Order State Updated'' event. | ||
- | {{:en:promotions:coupons13.jpg?700|}} | + | {{:en:promotions:coupons14.jpg?700|}} |
I’ve created two constraints to determine ordered Coupon is paid. If constraints are true it executes ''Create Coupon'' action to create a coupon entity. After creating that it executes second action to update coupon’s menu item name. As you have noticed I’m reading ''Menu Item Name'' from Order State by using ''{ORDER STATE:X}'' tag. You’ll remember we are using same tag in printer templates to print order states. | I’ve created two constraints to determine ordered Coupon is paid. If constraints are true it executes ''Create Coupon'' action to create a coupon entity. After creating that it executes second action to update coupon’s menu item name. As you have noticed I’m reading ''Menu Item Name'' from Order State by using ''{ORDER STATE:X}'' tag. You’ll remember we are using same tag in printer templates to print order states. | ||
Line 132: | Line 131: | ||
To test this rule sell another Coffee Coupon and check if a Coupon Entity created or not. | To test this rule sell another Coffee Coupon and check if a Coupon Entity created or not. | ||
- | {{:en:promotions:coupons14.jpg?700|}} | + | {{:en:promotions:coupons15.jpg?700|}} |
This is what SambaPOS generated for me. Coupon Number, Redeemed value and Menu Item Name all correctly updated. Expiration date is empty so this coupon never expires. We’ll handle expiration topic on further documentation. | This is what SambaPOS generated for me. Coupon Number, Redeemed value and Menu Item Name all correctly updated. Expiration date is empty so this coupon never expires. We’ll handle expiration topic on further documentation. | ||
+ | * Back to [[Promotion Coupons Documentation]] | ||
+ | * Next Topic > [[Redeeming Coupons]] | ||