Tracking min amount for VIP tables

Some night clubs have a minimum spending amount for VIP tables. In this tutorial I’ll show you how to implement this.

On this sample VIP 1 table have have minimum spending amount. Until it reaches to $20 it adds servicing amount to ticket to adjust ticket total to $20. When it passes $20 it removes servicing. All tables may have different spending amounts.

###Entity Setup

First of all I’ll start with setting up a Custom Field for tables.

I created VIP tables and set min spending amount from Batch Entity editor.

###Calculation Setup

For servicing calculation I’ll create a new Account Type and Account.

I’ll create a new Account Transaction Type and selected newly created accounts.

I’ll need a calculation type to add VIP Servicing amount to ticket.

As I’ll calculate servicing amount automatically I selected Calculation Method as Fixed amount and left the Amount as 0.

###Actions

Now when I add an order to the ticket I want SambaPOS to check min spending amount and add related servicing amount if ticket amount is below min spending amount.

I want to store min spending amount of table as a ticket tag. So I’ll create an action to update ticket’s Min Spending tag.

I’ll create another action to add Servicing Calculation to the ticket. I’ll Calculate Amount from rule so I setup Amount as a variable by typing it as [:Amount].

I need an execute automation command action so when ticket total changes I can trigger re-calculation of Servicing amount.

#Rules

Now we click on VIP 1 table button we want SambaPOS to read Min Amount from table and write it to ticket. We’ll use Ticket Entity Changed rule for that.

This rule will work when a “Recalculation” is needed. I created two actions. One of them will work if Amount is greater than Zero and the other one works if Amount is less than or equal to zero. When calculation amount is less than or equal to zero it means min spending requirement is met so we can remove servicing amount.

Finally we need to trigger recalculation. I used “Ticket Total Changed” rule for that. It checks if min spending amount is set and triggers recalculation.

This is not handled in this tutorial but if you want to handle “recalculations when ticket moves to an another table” you can update ticket tag and trigger recalculation on “Ticket entity changed” rule.

8 Likes