Show Message action...A helpful little tool for Debugging

:warning: It is not recommended to try this on a production (one used for everyday business) database. Use this on a practice machine/database or in Training Mode.

:warning: This will not break anything, but it can lead to annoying pop-ups.

When trying to come up with a new process or flow for your business it can be a little frustrating when things don’t go the way you planned and you want to see what is happening behind the screen. SambaPOS has a little tool that will help you test and/or see values that are being processed for a rule or action. That tool is the Show Message action.

Let’s start this tutorial by making a Show Message action:

Manage->Automation->Actions ->Add Action

Action Name: Show Message
Action Type: Show Message
Parameters: [:Message to display]

Save Action.

7KMV4NcUSj

Now lets make a button so we can do some testing:
Manage->Automation->Automation Commands->Add Automation Command

Name: Test
Category: (blank)
Button Header: Test
All other settings: (leave as default)
Mappings: * Admin * * * * Ticket
* Admin * * * * Order Line

Save Automation Command.

–Note– We are mapping to Admin so that non-Admin users do not see the button.

Now lets put the 2 new items we created together in a Rule.
Manage->Automation->Rules->Add Rule

Rule Name: Test
Event Name: Automation Command Executed
Add Custom Constraint: Automation Command Name Equals Test
Select Actions: Show Message
After adding the action
Message to display: 1st Message!

Save rule.

Now go to your POS screen. There should be a new button on the left of your screen with the word “Test” on it. When you press it a pop-up should appear with 1st Message!

oKKuKZINbh

If you want you can add an item to the ticket, highlight the item and you should see the Test button on Order Line screen. Pressing the button will show the same message. Cancel all items from the ticket and close the ticket.

Let’s head back to the Test rule and change the Message to display field.

Almost all of the Printer Templates fields will work in the Message to display field
Manage->Printing->Printer Templates->Add Printer Template

In the Message to display field lets put {TICKET STATE:Status}
93oDOtJo7I

Save the rule. And lets go back to the POS screen. Now press “Test” button.

…Hmmm, that is weird. Try pressing it again. Nothing happening, whats going on!!!
Lets add an item to the ticket.
Now press the “Test” button. NOW it works! It should show “New Orders”
89DiJPeZIK|466x277, 75%T
What is going on, you ask? When we pressed the Test button, without any orders, the Ticket did not have any State. No State meant no information to display. When we added an order, the ticket now had a state of “New Orders” and that was printer template tag we used to display that information.

There is a way to force the Show Message action to always display when we want it to. Cancel all orders on the ticket and close the ticket. Head back to the Test rule. Now lets put a label in front of the {TICKET STATE:Status}. Lets put the word Status: . It should look like this: Status: {TICKET STATE:Status}
Q3hxCG6Sif
By putting a label in the Message to display field the Show Message action has something to show, regardless if the Printer Template Tag has information or not.

Now go back to the POS screen. Now when you press the Test button with an empty ticket. Now you will see a popup with just the word “Status:” on it.
OkDQtfCj9K
You can add an item to the ticket and press the Test button. Now it should read “Status: New Orders”.

The Show Message action is not limited to just an Automation Command button. It can also be added to any set of actions in any rule.

Let go back to all the rules list. In the list of rules, you should have an rule named New Order Adding Rule. Open the rule up, after clicking on Select Actions link, search for Show Message. Add that action but keep the dialog open. We want to add another Show Message action. To do that, we need to right click in the left box. A dialog will appear with the option “Display All Values”. Select that option and all the actions from the right will appear in the left box.
SMIxIsMbg2
Select the Show Message action and add another one to the right. Click on 1 of the Show Messages from the right and drag it to the top.
LsnDaKrHbO
Click OK on the dialog.

In the first Show Message action, in the Message to display field put Quantity: {QUANTITY}
In the last Show Message action, Message to display field put Name: {NAME}
SQ0e6wuAwL

Now go back to your POS screen. Add an item to the ticket. You will now be shown 2 popup dialogs every time you add an item to the ticket. One with the quantity that was added and another with the menu name that was added.

Let’s say that during your developing a new configuration you have a part working properly, but don’t want to the pop-ups to show any more. But you still might need them later. We can constrain them out of the rule so they will not fire. There are many ways to do this, the easiest I have found is to put 1==2 in the constraint field. Let’s try that in the above New Oder Adding Rule. Open the rule up and put 1==2 in both of the Show Message actions Constraints field.
8dWpAXdH1b
Now if you add an item to the ticket, the pop-ups no long appear. When you know everything is working correctly, you can remove the Show Message actions from your rules.

The Show Message action is not limited to Printer Templates. It can be use many other things, such as (but not limited to):

  • Checking Syntax’s equations/formulas
  • Checking Constraints
  • Command Values
  • Checking the manipulation of values
  • Reading information
  • Checking if a Rule is firing.
  • and the list goes on and on.

All though the Show Message does not solve problems, it’s a tool to find out what does work and what does not work.

Searching the forum will help you find information that you need to display in the Show Message action.

2 Likes

Stunning… have seen this work before but never had the details to implement it myself.

Wonder if it could be made so that it Auto popped after a menu item was selected.

Often we want to prompt the server once an item is selected and a popup would be great if it automatically appeared.

There are other systems that have this feature and it’s very powerful.

but for learning/Debugging this is a great help… thanks

Order added event is triggered when you add an order.

I see I forgot to mention debugging in my post. I edited the title to make it easier to search in the future.

I’m not sure why a pop-up would be necessary after each item. I would think that would lead to pop-up blindness, where the worker would hit a button without thought.

The big brother/sister to Show Message is the Ask Question action. That has allot more parameters and can also have a cancel button, which would stop the rest of the actions from firing.

2 Likes

This is something we already use when developing some scenarios, and the Ask Question action has much more parameters for this.

2 Likes

thanks… it should only pop if there is data against that product that has been set

You wouldn’t pop it against each product

So on a previous system we had it set to prompt the server to let the customer know that this item takes x amount of time to cook or that this item is usually served with xxx

just prompts to help staff keep the customer informed.

we also use modifiers to force the asking of questions, i.e. sauces, sides etc… we also set them as mandatory fields and should the customer not want sauce or side we also have options for NO Sauce, or NO Sides, so we know that the server asked the question.

Both the auto info popup (for extra product info) and the mandatory modifiers are very powerful upselling tools… meaning we have happier customers and increased sales.

We already have a Info/Allergy screen that servers use to inform the customer of ingredients and possible allergy info but have this on a button once they select an item as its not always needed but it is very helpful when you are taking orders at the table.

1 Like

Ahhh, that makes more sense! Something could be put into place using Product Tags.

My intention for this tutorial was to help new users figure out & understand how Samba works.

3 Likes

Thank you very much, great help for those of us who started. The tutorial is appreciated. Greetings.

1 Like