# Happy Hour, VIP Discounts with Portions and 7 Price Levels

**URL:** <https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934>\
**Category:** V5 Question\
**Created:** [May 24, 2016, 1:35pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934 "2016-05-24T13:35:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [May 24, 2016, 1:35pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/1 "2016-05-24T13:35:56Z")

</div>

Continuing the discussion from [Happy Hour prices with portions](https://forum.sambapos.com/t/happy-hour-prices-with-portions/10753):

So @QMcKay I thought I would save you some time since you are hard at work in your Inventory Import Module.

I have dropped a GIF below that shows the following:

**1.** Happy Hour Discounts per your Tutorial - Unchanged except I use % of {PRICE}  
**2.** 3 VIP Discounts per your Tutorial - Unchanged except I use % of {PRICE}  
**3.** 7 Price Definition [Including a $ Value for Portion Happy Hour]

The GIF demonstrates swapping in and out of VIP (Customer) to simple Happy Hour as per your tutorial BUT also maintains Portion Pricing. It further demonstrations all this happening with 7 Price Definitions which is crucial if you wish to maintain Portion Discounts.

Oh I should mention you can change Price Levels on the fly and still maintain Portion Discount Pricing as well as VIP and HH…

No SQL involved!

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/1/e1c16c2d00c1a50b29e0a78fb11017863b487406.gif)

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [May 24, 2016, 1:41pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/2 "2016-05-24T13:41:37Z")

</div>

@emre kindly linked me this tutorial which I used to implement the 7 Price Levels Automation Command button shown in RED.

> [@Conditionally Updating Order Prices](https://forum.sambapos.com/t/conditionally-updating-order-prices/8017):
>
> In this tutorial I’ll show you how to automate updating order prices conditionally. We’ll have 3 prices. Breakfast price, Dinner price and ToGo price. Breakfast or Dinner price will apply automatically depending on time of the day. Regardless time of the day ToGo price will activate when ticket marked as ToGo. ##Configuring Prices First we’ll define price definitions from Management \> Products \> Price Definitions screen. Breakfast price will appear as BB on ticket and bills. I’ll cr…

Once I implemented this Tutorial it was just a question of how to maintain VIP or HH with Portions and then throw Price Definitions at it! The process was just a little hard to think out but only required 1 key RULE using the following Key Action:

**UPDATE ORDER PRICES**

**[EDIT]**  
I probably will not use a Toggle for 7 Price Levels but actually assign 2-3 to Customers and use this Price Definition on Customer Selection. A Few others will be accessible from Automation Buttons in the Supervisor Menu.

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [May 24, 2016, 1:46pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/3 "2016-05-24T13:46:33Z")

</div>

@markjw you will need to use the PORDER PORTION CHANGED Event to manage your Discount Pricing on Portions. In simple terms it is really just calling the UPDATE ORDER PRICES Action.

So in summary I can have a $ based Discount on Portions BUT ALSO a % based discount on the Product Name that will cover all portions. Some Venues may just wish to save entering Portion Pricing Levels and Discount for every single Item Portion.

Emre, loving SambaPOS!

Sorry about the 3 posts but cannot include of relevant parties in 1 post…

PICS coming:  
Ok these 2 Rules does all the work! No new States, just using a Order Tag as per Emre’s Tutorial.

**Update Portion**

 ![](https://forum.sambapos.com/uploads/default/original/3X/9/3/93ba82740dc577a582cad9bdc3400a3853080157.JPG)

**Update Order Price**  
This is where the Intellect is - you will save hours trying to discover this Rule. Why share **BECAUSE blokes like JTRTech**  
have saved me hours (Cash Back) 😉

 ![](https://forum.sambapos.com/uploads/default/original/3X/a/2/a22906e73e709479e737321cc10c128148abca87.JPG)

Enjoy Paul 😁  
JUST EDITED for Typos.

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 20, 2016, 2:46pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/4 "2016-09-20T14:46:23Z")

</div>

I think I’ve done something wrong…

I also think this needs to be added into a tutorial to make it simpler to get right (i don’t mind doing this once I have it all working flawlessly)

Im guessing i have written something incorrectly within the constraints. But I’m working from that pic and via remote PC to get the till to work.

Let me get this right…

Food: Child Portion, Adult Portion and different prices for VIP members

If i select the adult portion when a VIP has been selected, this should reduce the price? At present that isnt whats happening.

When I’m there in a couple of days i’ll detail what I have put as the constraints as a reply, as I’m sure thats where I’ve gone wrong.

Matt

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 20, 2016, 2:47pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/5 "2016-09-20T14:47:22Z")

</div>

Remember to check for case sensitive matching and spelling errors.

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 12:33pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/6 "2016-09-26T12:33:55Z")

</div>

Ok so here goes on how I’m set up.

I don’t use HH, so these constraints haven’t been added

First off, I added Price Definitions:

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/2/02eddd5b8d9d8807bbf8583c30919e42f3d43ba1.png)

Then I Changed 1 price (to test) on the price list editor:

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/8/284245ce2f450891ab6caf65e36a99376b0b907a.png)

Created actions:

 ![](https://forum.sambapos.com/uploads/default/original/3X/3/c/3c78ae0148491b38951832558c6f56c1bce5030f.png)

Created an automation command:

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/b/2bb8c65031b904c1d6bc222203afe9e1ebde3ace.png)

Then Started with the Rules:

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/a/0ac93da1615f6ba59f5099a262adbc1197e43227.png)

_ **Rules** _

> Name: Order Portion Changed

> Event: Order Portion Changed

> Custom Constraint:

> Execute Rule if **MATCHES**

> {ORDER STATE:DiscountType} **EQUALS** VIP

> Actions:

> EXECUTE AUTOMATION COMMAND

> Constraint:  
> AMCname: **UPDATE PRICES**  
> AMCvalue:  
> delayseconds:

 ![](https://forum.sambapos.com/uploads/default/original/3X/a/d/adf117afa85510c9899406cec0fd79dd3e69ffd1.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/7/4/747eeeab362280673c42622c9f49a0b4b66fbfd0.png)

> Name: Update Order Prices

> Event Name: Automation Command Executed

> Execute Rule if **MATCHES**

> Automation Command Name **EQUALS** Update Prices

> ACTIONS

> _ **Update VIP Price:** _  
> Constraint: ‘{TICKET TAG:Price Level}’ == ‘’  
> Price Tag: Price

> _ **Update VIP Price:** _  
> Constraint: ‘{TICKET TAG:Price Level}’ != ‘’  
> Price Tag: {TICKET TAG:Price Level}

> _ **CD Update Order State DiscountType** _  
> Constraint: ‘{TICKET STATE:VIP}’ == ‘Active’ || [=TN(‘{ORDER TAG TOTAL:HH DISCOUNT}’)] \<0  
> DiscountType State: [:NextCommandValue]

> _ **CD Update Order State DiscountType** _  
> Constraint: ‘{TICKET STATE:VIP}’ == ‘Active’  
> DiscountType State: VIP

> _ **CD Update Order State DiscountType** _  
> Constraint: [=TN(‘{ORDER TAG TOTAL:HH Discount}’)] \<0  
> DiscountType State: HH

But still not working?

I’ve copied the above images, but with no actual text, I’m wondering if there is a space, comma, bracket or something wrong? as its hard to see with the image being relatively small…

Matt

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [September 26, 2016, 1:09pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/7 "2016-09-26T13:09:32Z")

</div>

If you never change the Portion, then nothing will happen. You might need to use a different Event like Order Added and/or Ticket State Updated to trigger your actions.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 26, 2016, 1:30pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/8 "2016-09-26T13:30:42Z")

</div>

Not sure if its relevant but think it might be connected but if you are having issues with update order and portions do [:Portion] on the action and then {PORTION} in the rule along with the price tag/etc.  
I have found sometimes updating order clears the portion back to normal hence the {PORTION} tag to keep the existing portion.

My entity based price list/tag is fairly simple…  
Entity selected rule selects all orders and sets price tag to {ENTITY DATA:Price List}.  
On order added I have another rule with does similar for new orders added.  
Very basic but does the job.

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:14pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/9 "2016-09-26T14:14:40Z")

</div>

If I log out then back in, that let the VIP work, but not the portion… so its triggering that… However, the discount for the price list editor isn’t working…

Cant help but think ive missed something completely here

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:22pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/10 "2016-09-26T14:22:20Z")

</div>

So do you mean like… {PORTION:VIP1} ?

Thanks for your time though, I have plenty of time to fine tune things now 😃

Matt

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 26, 2016, 2:24pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/11 "2016-09-26T14:24:12Z")

</div>

No, update the orders with the price tag and found I needed to add {PORTION} so that it kept the existing portion rather than clearing as blank field here seemed to overwrite back to normal, sure it was discussed and not sure if fixed or not, that was in .60

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:26pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/12 "2016-09-26T14:26:11Z")

</div>

Ok, did that and tested… fail.

When you have spare 5 mins, is there any chance you could double check my constraints? Like I said earlier, trying to copy from a small pic might mean I haven’t got it perfectly right?

Thanks a milli

Matt

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 26, 2016, 2:44pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/13 "2016-09-26T14:44:59Z")

</div>

I cant comment on the states stuff as dont have any of that on mine but using the portion tag solved the changing price tag on a very simple setup.  
Might not be the issue, looking back at the system I dont have it on v5, may have already been sorted… probably erelivent…

Bit distracted as a client managed to get themselves a nasty virus which is causing havoc for them…

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:46pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/14 "2016-09-26T14:46:48Z")

</div>

hmm, ok.

maybe @pauln will be able to help me accomplish the end result I need? 🙂

Thanks

Matt

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 26, 2016, 2:47pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/15 "2016-09-26T14:47:17Z")

</div>

Just claify what is the issue?

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:48pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/16 "2016-09-26T14:48:07Z")

</div>

The prices are not being changed at all, it doesn’t seem to draw the price from the price definitions

Matt

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 26, 2016, 2:48pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/17 "2016-09-26T14:48:59Z")

</div>

Ok,  
Whats meant to trigger the update?

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:50pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/18 "2016-09-26T14:50:06Z")

</div>

That’s what my brain was thinking, I’m not sure… As I’m still not apt with constraints, I just presumed they would work it? (the ones that in the OP above)

Matt

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 26, 2016, 2:50pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/19 "2016-09-26T14:50:53Z")

</div>

Your portion changed rule? But that starts automation command which contains setting the discount state which is a constraint on the portion changed rule?  
The portion changed rule wont fire because its looking for a state which is set by a result of that action?

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [September 26, 2016, 2:54pm UTC](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934/20 "2016-09-26T14:54:19Z")

</div>

um… I always feel very stupid when I need to reply to questions like this ☹ lol

Me personally, I cant see HOW me having VIP Level set as “1” is going to trigger the VIP1 price definitions, which basically… is all I want.

Matt

[Next page](https://forum.sambapos.com/t/happy-hour-vip-discounts-with-portions-and-7-price-levels/10934.md?page=2)
