HOLD Button for Table Order

Dont be afraid of it. I only said it so I could help you. If you get a good grasp of states you can do amazing things with Samba and you can avoid major headaches as well. States are really not that hard. Once you get it its like a light bulb in your head it will make so much sense.

You probably just made a simple common mistake with States that almost every person learning Samba Does. I did it myself early on.

Maybe this will help you. Think of it this way. Lets say you have Ticket State of ON. You tell Samba via a rule that when you close a ticket you want the state to be OFF. So now everytime you close a ticket the state will be OFF does not matter how you close your ticket it will always make its state OFF.

So lets say you add another State called BLINK and you want it to work when Payment is processed. You put it in Payment Processed. But wait you pay for ticket and the state is showing OFF instead of BLINK. Why is it not working like you wanted…

Well lets think about it: you originally told it when ticket closes you want state of OFF. Payment processed happens and then ticket closes… So your Payment Processed State of BLINK is actually working but it is imediately changing the state back to OFF because its told to do that when ticket closes. Ticket closes after Payment processed.

So as you can see when dealing with states you need to look at your entire flow and how you want it to work. The rules dictate that flow.

So lets look at the default State flow for orders. Look at your rules that deal with Update Ticket State and Update Order State. Learn their flow by studying when they happen. This will help you design something.

HINT: Look at Ticket Created rule, Ticket Closed Rule, Order Added Rule.etc

1 Like

Thanks for the explanation @kendash !
It’s really insightful, let me play around a little bit in training mode and i’ll let you know the result :smile:

Thanks for all the help!

Best,
Kelvin

a guide line to hold & close ticket
take order
press Hold Order Button (ticket will be closed and no orders printed to kitchen)
press Hold Order Button again to unhold
Take Order and close ticket (orders will be printed)





1 Like

Dear Madiha,

Thanks so much for your help.
However, i’ve tried your method and i encountered couple issues:

  1. Once the tickets are closed, the tables still in white. Is there any way to change the color of the table once its in a “Hold” state? So my employees can find the hold table easily.
  2. Once the tickets are closed, we have to void if the customer wants to change the item (Minor issues)
  3. When we “unhold” the ticket, and let say the customer didn’t change the item. The ticket cannot be closed

@kelvin Here is a quick tutorial on how to achieve what you want.

Create a Display Ticket action:

Create a Hold State:

Set your color to what you want, I set mine to Blue.

Create Two Automation Commands:

Hold Ticket command:

Unhold Ticket command:

Mapping for Hold Ticket command:

Mapping for Unhold Ticket command:

Clone the Default Cancel Orders action:

Change the name to Default Cancel Orders - Hold
Select Clear Selection box

Mapping for Default Cancel Orders - Hold command:

Create an Automation Command Executed rule for Hold Ticket:

Update Ticket Status and Update Order Status actions are default be sure and enter the parameters shown in the screenshot. Close Ticket action is default action.

Create an Automation Command Executed rule for Unhold Ticket:

Update Ticket Status and Update Order Status actions are default be sure and enter the parameters shown in the screenshot. Refresh Ticket action is the action we made at start of tutorial.

Update the default Ticket Closing Rule:

Add the following constraint to the rule do not edit anything else

Clone the Update New Order Entity Color rule and edit it as shown in the screenshot:

Rename it to Update New Order Entity Color - Hold

Clone the Default Cancel Orders Rule and edit it as shown in the screenshot:

Remove Cancel Orders action and add the two actions shown with the parameters as shown.

For Customer Tickets entity screen click on Entity List

For Display State put Status and for State Filter put Hold,New Orders


That’s it your done. There is something I should explain about the Cancel Orders button. Because there is no way to close a ticket and then truly cancel orders we have to use the custom route. The benefit of this is it will keep the tickets so you can track who has been canceling held orders but it will not affect your inventory, sales or anything else.

4 Likes

Screenshots of it in action:

2 Likes

WOW!
This is really helpful @kendash !!
Thank you very very much.

It’s going to be very useful in my snack shop and i’m sure it’s going to help lots of other people with similar case.
Thanks again!!!

Best,
Kelvin

2 Likes

which tag is used to print Hold—State

@madiha use {TICKET STATE:Status}

PS. I updated it to include color changes for Customer Tickets entity screen. The change is at bottom of tutorial.

Normally I would not have used Status but since this tutorial did not impact the natural default flow it truly just held it I felt using Status was appropriate vs creating a new state flow.

Dear @kendash

Thanks before for your tutorial.
I’ve tried it, and i followed your tutorial steps by steps.

But i encountered some issues:

a). The Hold button appear & works, the item status was changed to “hold”. But when i pressed the hold button, the table color didn’t change to blue… it’s orange like it was submitted but the status is still “hold”

b) When i opened that ticket again, i couldn’t see the Unhold button.
My guess the source of the problem is the states/status, because when i change the mappings from “Status=Hold” to *, The Unhold button appears, but of course it’s there all the time.

c) When i change the unhold mappings to *, i tried to use the unhold button… but it still didn’t works like yours
The order status changed from “Hold” to “New”. But i can’t close the ticket. (The close button become grey and can’t be pressed). The only way to close the ticket is to add an item, then cancel that item again. Then the close button can be pressed and the ticket is closed and the order became “submitted”

d) The Cancel button for “Hold” item works great, there’s no problem in that area.

e) On the last step of your tutorial, you changed the entity list’s display state and state filter. When i followed that steps, my all tables are gone… So, on the state filter i make it empty.

I’ve cheked my settings 3 times, and i’m pretty sure i followed your tutorial steps by steps exactly like the way it is

That was specifically ONLY for Customer Tickets screen not Tables.

This could be you either did not define the State correctly or you did not enter the constraint into the default Ticket Closing Rule

This means your state is not changing. I went back through my tutorial and I did not miss any steps. Double and tripple check it you have missed some things. Spelling and case sensitivity is crucial if I have a letter caps yours should be too…

PS. I would make a database tools file for this but it modifies some of the default rules so I think its better if you follow the tutorial. Remember it can be spelling, Case Sensitivity, missed action etc. Follow it exact.

:warning: Also be sure you have set default mapping for all RULES I did not show this because typically its just understood that rules need default mapping.

Bottom line is you missed a few things or you read it wrong. Carefully go over it again and compare it to yours every detail.

Dear @kendash

I have found what caused the issues regarding the state.

On the Hold ticket rule,i changed the status on “Update ticket status” to “Hold” and the current status to “New Orders”.
Everything now works. The table turn blue after i pressed the hold button, and the unhold button is now visible.

But, there’s still issue to close the ticket.
When i unhold the ticket, the order status changed from “Hold” to “New” but the close button can’t be pressed (it’s turned grey).
The only way to close the ticket is to add an item, then cancel that item again. Then the close button can be pressed and the ticket is closed and the order became “submitted”

Any ideas what caused this?

Try adding Status=Hold to your mappings for the close button

no you still have statez mixed up with unhold command. Its not changing ticket state to unpaid. Check it again you probably didn’t get the update ticket status action correct for the unhold command rule. Notice yoyr ticket state is still hold it should be unpaid. And don’t do what rickh said that will mess it up sorry Rickh :slight_smile:

2 Likes

Lol sorry my bad i didnt properly check the flow :slight_smile:

Now everything works perfectly! Thanks a lot @kendash

Regarding my post earlier, i just realized that the update ticket status messed up everything before. And i didn’t switch it out apparently, i didn’t pay attention to the details close enough

Notice that on your tutorial, the update ticket status was:
Current Status
Status

While on my PC was:
Status
Current Status

My bad didn’t realized it earlier… :smile:
THANKS again kendash for this tutorial, it’s very useful for me and i’m sure it’s very useful for others as well…

Cheers!

2 Likes

Something I have tried to stress is the importance of spending time just learning how SambaPOS works. I was able to implement that fairly quickly because I have a strong understanding of states and how to use them.

I highly recommend anyone using SambaPOS to spend some quality time studying and implementing various tutorials on a test system so you can support and implement things for your own business.

Truth is that was the first time I even thought about building something like that. I just came up with it in a few minutes and built it and tried it and it worked.

2 Likes

Hello,

I love your tutorial. :sunny:
I just wanted to ask how can I create a rule to do this setup of mine:

When I order a NEW product from the list from the menu, all the other HOLD products change their status, in NEW.

Because I don’t want to have the UNHOLD button, just the HOLD one. Can I modify the UNHOLD button to do exactly that ? When a new product is ordered, all the HOLD products should automatically change into NEW.
Thanks.

First implement whole tutorial. Study each step to understand what it exactly does.
Use Execute Automation Command action to trigger an automation button rule. You can execute it on Order Added rule and remove the button.

1 Like