User Tools

Site Tools


en:redeeming_coupons

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:redeeming_coupons [2013/09/15 21:24]
admin [Canceling and Submitting Promotion Orders]
en:redeeming_coupons [2013/09/16 04:47] (current)
Line 107: Line 107:
 To be able to understand an order line is cancelled before submitted to kitchen we’ll handle ''​Order Cancelled''​ event. To be able to understand an order line is cancelled before submitted to kitchen we’ll handle ''​Order Cancelled''​ event.
  
-{{:​en:​promotions:​coupons27.jpg?700|}}+{{:​en:​promotions:​coupons28.jpg?700|}}
  
 We’ll check if a coupon number attached to order that is being cancelled. We can use ''​{ORDER STATE:​Coupon Number}''​ tag to read assigned Coupon Number to the order. If it is not null we can update Redeem Status of the Coupon to No. So we can use that coupon again later. ​ We’ll check if a coupon number attached to order that is being cancelled. We can use ''​{ORDER STATE:​Coupon Number}''​ tag to read assigned Coupon Number to the order. If it is not null we can update Redeem Status of the Coupon to No. So we can use that coupon again later. ​
Line 113: Line 113:
 Now we’ll Change Redeem Status of Coupon to Yes when order submitted. We’ll create another rule for ''​Order State Updated''​ event. ​ Now we’ll Change Redeem Status of Coupon to Yes when order submitted. We’ll create another rule for ''​Order State Updated''​ event. ​
  
-{{:​en:​promotions:​coupons28.jpg?700|}}+{{:​en:​promotions:​coupons29.jpg?700|}}
  
 Like we did on previous rule we’ll check if there is a coupon number attached to the order and new state of the order is ''​Submitted''​. If so we’ll update Coupon as Redeemed by changing Redeemed field value to ''​Yes''​ and this coupon can’t be used again. Like we did on previous rule we’ll check if there is a coupon number attached to the order and new state of the order is ''​Submitted''​. If so we’ll update Coupon as Redeemed by changing Redeemed field value to ''​Yes''​ and this coupon can’t be used again.
Line 121: Line 121:
 Our Coupon Management Infrastructure is almost ready. You’ll notice SambaPOS generates no response when Coupon is already redeemed or scanned. On last step we’ll generate messages to inform operator. ​ Our Coupon Management Infrastructure is almost ready. You’ll notice SambaPOS generates no response when Coupon is already redeemed or scanned. On last step we’ll generate messages to inform operator. ​
  
 +===== Creating Operator Feedbacks =====
 +
 +We’ll show a message to let operator understand why coupon code is not working. Let's create a “Show Message” action. ​
 +
 +{{:​en:​promotions:​coupons30.jpg?​700|}}
 +
 +When we call this action it displays a modal message to user. We’ll set message text from rule so we’ll configure Message parameter as a variable. [:Message] syntax creates a new value named as message. ​
 +
 +Now we’ll create another rule to check Coupon Status and display a message if it is already scanned. We’ll use “Ticket Entity Changed” rule for this. 
 +
 +{{:​en:​promotions:​coupons31.jpg?​700|}}
 +
 +When Loaded coupon Redeem Status is ''​In Ticket''​ we’ll display a message. Before displaying the message we’ll also remove coupon from ticket header. ​
 +
 +We need another rule to test if Coupon is already Redeemed. I’ll clone this rule and change related values.
 +
 +{{:​en:​promotions:​coupons32.jpg?​700|}}
 +
 +On Custom Constraints section we’re checking if selected entity is a Coupon and if yes we’re checking it’s status. If it is ''​Yes''​ we’ll display a message to warn user. 
 +
 +Now test it to see how it works. Since our previous coupon is already redeemed change it’s Redeemed value to No or create another one by selling a coupon. ​
 +
 +You can test these cases:
 +  - When we double scan a coupon code in a ticket we should see “Coupon already scanned” message.
 +  - When we submit a coupon and scan it again it should display “Coupon already redeemed” message.
 +
 +{{:​en:​promotions:​coupons33.jpg?​700|}}
 +
 +Our Coupon Management System is ready. Now we can sell and give free items with coupons. ​
 +
 +  * Back to [[Promotion Coupons Documentation]]
 +  * Next Topic > [[Printing Coupons]]
en/redeeming_coupons.1379265880.txt.gz · Last modified: 2013/09/16 01:24 (external edit)