User Tools

Site Tools


en:tracking_coffee_purchases_of_loyal_customers

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:tracking_coffee_purchases_of_loyal_customers [2013/09/16 01:05]
admin
en:tracking_coffee_purchases_of_loyal_customers [2013/09/16 06:01] (current)
Line 9: Line 9:
 We’ll start by adding needed custom fields for customer. We’ll start by adding needed custom fields for customer.
  
-<IMG>+{{:​en:​promotions:​coupons47.jpg?​700|}}
  
 I’ve added a Number field named as Coffee Promotion. I’ve also enabled ''​Hidden''​ setting to hide this field on Customer listings. I’ve added a Number field named as Coffee Promotion. I’ve also enabled ''​Hidden''​ setting to hide this field on Customer listings.
Line 17: Line 17:
 On next step we’ll add an action to update this field. We’ll use ''​Update Entity Data''​ action to change Coffee Promotion value. ​ On next step we’ll add an action to update this field. We’ll use ''​Update Entity Data''​ action to change Coffee Promotion value. ​
  
-<IMG>+{{:​en:​promotions:​coupons48.jpg?​700|}}
  
 When executed this action updates ''​Coffee Promotion''​ field value of the customer. While executing this action we’ll set customer name and promotion quantity so we defined them as variables. ​ When executed this action updates ''​Coffee Promotion''​ field value of the customer. While executing this action we’ll set customer name and promotion quantity so we defined them as variables. ​
Line 27: Line 27:
 We need to understand a promotion product added into the ticket. On this sample this product is coffee so we’ll mark coffee order lines as promotion. Let’s create an action to mark coffee orders as promotion. We need to understand a promotion product added into the ticket. On this sample this product is coffee so we’ll mark coffee order lines as promotion. Let’s create an action to mark coffee orders as promotion.
  
-<IMG>+{{:​en:​promotions:​coupons49.jpg?​700|}}
  
 We’ll use ''​Update Order State''​ action to change ''​Promotion State''​ of the order. When we add a new Coffee Order it’s order state should become ''​Promotion Ordered''​. When ticket paid we’ll update it to ''​Promotion Paid''​ and we’ll update Customer Data. Now we’ll create a rule to mark Coffee orders as promotion. We’ll use ''​Update Order State''​ action to change ''​Promotion State''​ of the order. When we add a new Coffee Order it’s order state should become ''​Promotion Ordered''​. When ticket paid we’ll update it to ''​Promotion Paid''​ and we’ll update Customer Data. Now we’ll create a rule to mark Coffee orders as promotion.
Line 33: Line 33:
 We’ll create a rule for ''​Order Added to Ticket''​ event. ​ We’ll create a rule for ''​Order Added to Ticket''​ event. ​
  
-<IMG>+{{:​en:​promotions:​coupons50.jpg?​700|}}
  
 I’ve created a constraint to understand if added product is Coffee or Not. If you want to enable promotion for multiple types of coffee you can add additional product names here by clicking ''​Add Custom Constraint''​ link.  I’ve created a constraint to understand if added product is Coffee or Not. If you want to enable promotion for multiple types of coffee you can add additional product names here by clicking ''​Add Custom Constraint''​ link. 
Line 43: Line 43:
 We’ll handle ''​Before Ticket Closing''​ event and if remaining amount of ticket is 0 we’ll update orders marked as ''​Promotion Ordered''​ to ''​Promotion Paid''​. We’ll handle ''​Before Ticket Closing''​ event and if remaining amount of ticket is 0 we’ll update orders marked as ''​Promotion Ordered''​ to ''​Promotion Paid''​.
  
-<IMG>+{{:​en:​promotions:​coupons51.jpg?​700|}}
  
 When we set ''​Current State''​ value it will change only orders that already have ''​Promotion Ordered''​ state. If we leave it empty it will change all order’s states to ''​Promotion Paid''​. This it not what we want for now but this feature might be handy in some cases. ​ When we set ''​Current State''​ value it will change only orders that already have ''​Promotion Ordered''​ state. If we leave it empty it will change all order’s states to ''​Promotion Paid''​. This it not what we want for now but this feature might be handy in some cases. ​
Line 57: Line 57:
 We’ll handle ''​Order State Updated''​ event to update customer promotion count. ​ We’ll handle ''​Order State Updated''​ event to update customer promotion count. ​
  
-<IMG>+{{:​en:​promotions:​coupons52.jpg?​700|}}
  
 We’ll check if a customer is assigned or not here. On ''​Update Customer Coffee Promotion Count''​ action we’ll set Quantity parameter with ''​{QUANTITY}''​ tag. + sign behind tag means we’ll increase the value. So if 4 coffee ordered parameter becomes +4 and it increases Promotion Count on customer card by 4. We’ll check if a customer is assigned or not here. On ''​Update Customer Coffee Promotion Count''​ action we’ll set Quantity parameter with ''​{QUANTITY}''​ tag. + sign behind tag means we’ll increase the value. So if 4 coffee ordered parameter becomes +4 and it increases Promotion Count on customer card by 4.
  
-Now we can test how it works. As we sell coffee to a customer her Coffee Promotion Count should increase. ​+We can test how it works. As we sell coffee to a customer her Coffee Promotion Count should increase. ​
  
-<IMG>+{{:​en:​promotions:​coupons53a.jpg?​700|}} 
 + 
 +{{:​en:​promotions:​coupons53b.jpg?​700|}} 
 + 
 +  * Back to [[Promotion Coupons Documentation]] 
 +  * Next Topic [[Giving Free Coffee]]
en/tracking_coffee_purchases_of_loyal_customers.1379279114.txt.gz · Last modified: 2013/09/16 05:05 (external edit)