Shivan's Tutorial 2 - Order Courses & Order Grouping

In this tutorial, you will be able to accomplish order grouping using the new Update Ticket Grouping feature found in the latest SambaPOS V5 Version 5.2.12.

For this to work, please ensure you have SambaPOS V5 Version 5.2.12 or higher installed.
For Versions below 5.2.12 the course change will work but you may not be able to see the grouping the same way as shown in the end result at bottom of screen.
This tutorial is intended to show you how to setup default order courses, and group them based on the course e.g. Starters,Mains, Desserts etc…. Then be able to change the course on the fly _e.g. Have a “Mains” show under Entreé, or Have an Entreé item under Mains.

It is intended for restaurants that would like to apply and print courses to the kitchen, and change item courses on the fly while the grouping feature allows better highlighting of the order groups.

A customer wishes to order a Mains as an Entree.
A customer wishes to have an Entree as a main or with a Main course.
You would be able to select the item, press Change Course and select a different course.
This will in return move the item into the course you have selected and when the order is sent to kitchen, the kitchen knows to cook and prepare an Entreé to be sent with a Main, or have a Main as an Entreé

:bulb: Click on arrows to expand tutorial section

Seeing it In Action

Seeing It In Action

Step 1: Creating Product Tags

Step 1 Create Product Tag

  • Go to Manage>Settings>Program Setting>General Settings

  • In Product Tag Caption Type :Course

  • Press Save

Step 2: Creating Automation Command Buttons

Step 2 Create The Auto Command Button

Go to Automation>Automation Commands & click Add Automation Command

  • Name:Change Course
  • Button Header:Change\rCourse
  • Values:Add Entree, Mains, Dessert
    (You can change these names to whatever you wish to call your courses)
    Mapping Click Mapping & make it look like it shows below.

  • Set Visibility to Order Line
  • Click Save
Step 3: Creating Actions

Step 3 Create 2 actions

Action 1: Update Course Group State
Go to Automation>Actions & Click Add Action

  • Action Name: UC_Update Course Group State Action
  • Action Type: Update Ticket Grouping
  • Parameters:
    Order State : [:Order State]

Action 2: Update Course Group State
Go to Automation>Actions & Click Add Action

  • Action Name: UC_Update State
  • Action Type: Update Order State
    -* State Name:[:State Name]
    -* Group Order:[:Group Order]
    -* Current State:[:Current State]
    -* State: [:State]
    -* State Order: [:State Order]
    -* State Value: [:State Value]
Step 4: Creating Rules

Step 4 Create 2 Rules

Rule 1: Update Course
Go to Automation>Rules & Click Add Rule

Rule Name:UC_Update Course
Event Name: Order Added to Ticket
Click Add Custom Constraint
Type: {ITEM TAG:Course} == Is Not Null == Leave Blank
Click Select Actions

  • Select UC_Update State & UC_Update Course Group State Action

  • Press OK

  • In Action UC_Update State
    -* Under State Name, Type: Course
    -* Under State, Type: {ITEM TAG:Course}

  • In Action UC_Update Course Group State Action
    -* Under Order State, Type: Course

  • Click Save

Rule 2: Change Course State
Go to Automation>Rules & Click Add Rule

Rule Name: UC_Change Course State
Event Name: Automation Command Executed
Click Add Custom Constraint
Type: Automation Command Name == Equals == Change Course
Click Select Actions

Select UC_Update State Action
Press OK

  • In Action UC_Update State
    -* Under State Name, Type: Course
    -* Under State, Type: [:CommandValue]
    Press Save
Step 5: Updating Printer Templates

Step 5 Update Kitchen Orders Template

Go to Printing>Printer Templates
Select Kitchen Orders Template & Click Edit Printer Template
Add the following section in your template

[ORDERS GROUP|ORDER STATE:Course:Entree,Mains,Desserts]
<C11>** {GROUP KEY}  **

So it should look like this

Press Save

Step 6: Setting up Courses for Products

Step 6 Apply Course by typing course in Product Tag Editor

Go to Products>Product Tag Editor

For each of your products, in the “Course” tab type the default course name just like shown in the screenshot below.

Press Save

Finished Result

The Result?

You should be able to your products been grouped as shown and when printed to kitchen, kitchen should be able to see something like the screenshot below

I hope you guys found this tutorial easy to follow and useful.

If you have any comments or suggestions regarding my tutorial please let me know, I always am looking at ways to improve.


I do have a quick question though. Besides the above, I also actually created the STATE under States

I wasn’t sure whether it was necessary to add the actual state before applying the rules, that’s why I didn’t add it in the tutorial.
When I set this up, I added the state then added the rules, actions and buttons.

If someone can give me some advise whether it’s required or not, so I can add this step into the tutorial also.

You don’t need to create a State if you won’t use special display formatting for the state. Also when needed it can be created later so I don’t think it is essential for the tutorial.


Thanks for confirming that. I wasnt 100% sure but at least im confident now.

1 Like

It’s a good thing to understand that the abillity to define them is just for visual formatting.


Thanks for the tutorial @Shivan will try :grinning:

1 Like


You can change the group sorting in your kitchen template.
For example

[ORDERS GROUP|ORDER STATE:Course:Entree,Mains,Desserts]

Will show Entree first, then Mains, then Dessert.

If you change it like this

[ORDERS GROUP|ORDER STATE:Course:Mains, Entree,Desserts]

It will print all items in Mains group at the top first, then Entree, then Desserts.


Great tutorial, well presented and works a treat :smile:

1 Like

How do we sort the Grouping on the Payment Screen?

Currently, the items are grouped on the payment screen with the States in alphabetical order



To group items in payment screen. You need to do the following.

Go to Automation>Actions and edit "Display Payment Screen

Once there type – [:Grouping Order State] under "Grouping Order State.
Click Save.


Then go to Automation>Rules and find the rule Settle Rule and click Edit rule

In the Actions Section where you find Display Payment Screen action, find the Grouping Order State and type the name of your state. In my case it would be called “Course” like below.

Your Item should now be group on the payment screen like below.

You will notice 2 items at the top dont have a group name…
This is because under Product Tag “Course” I did not specify a default group name for those items.
Hope this helps :slight_smile:

Well I demonstrated payment screen grouping by course name but as I’ve stated for payment screen grouping orders in course name is not useful a lot. Grouping here allows us to tap group headers and print tickets based on the selection. So group names here might be seat number or maybe customer name. On this screen we’re sorting items and groups in alphabetical order for ease of finding items.

@somilmittal I’ll be glad if you can explain why you need to implement custom sorting on payment screen groups. I wondered how you want to use it.

Dear Emre,

Greetings! Here is a screenshot of one of my tickets in the Payment Screen Display

As you can see, the Grouping is in alphabetical order, whereas, in this case, I would have liked to show the order as: Starters, Main Course, Desserts, Wine & Beverages



Ohh apologies. I get what you mean now. Hmm

Hi @somilmittal. I wanted to know if you want to apply grouping by course on payment screen because you need to handle payments by course (eg. customer wants only starters) or you’re just testing it? I sorted them alphabetically and I don’t want to implement custom group sorting there if nobody will use it.

If customers won’t pay by course, grouping by course on payment screen makes finding items unnecessarily harder. For example if customer only wants to pay for pizza and tiramisu operator needs to scan all items by eye. In this case having ungrouped items sorted alphabetically will be much easier to use.

However if you want to track seat numbers or customer name grouping on payment screen by seat number will be really useful. You can split payments by seat number for example. In this case having group names sorted alphabetically will work fine.

Its totally fine emre, I was just trying out this new feature. I do not really need sorting on this screen.

1 Like

Great! Please keep testing it and let me know if you find a specific use case that having custom group sorting (or some other feature) on payment screen will be useful.


I have gotten the ticket printed in the kitchen working well but a question for the kitchen display template…

How do I get the kitchen display to show the headings like in the printed ticket format?

This is the text for the kitchen display template:



<size 12>[=’~~~ {GROUP KEY}’.substr(0,40)]


[=(’{QUANTITY}’>1 ? (’{QUANTITY}’+’ ‘).substr(0,2) : ’ ‘)] {PRODUCT NAME}
[=’{PORTION}’==’’ ? ‘’ : ’ <color #FF55FF33><size 16>{PORTION}’]

I could be wrong, but I’m pretty certain if you put

[ORDERS GROUP|ORDER STATE:Course:Entree,Mains,Desserts]
<C11>** {GROUP KEY}  **

In your template, it should show you the headings much like the ticket template.

In Your case something like below should work.

<C11>** {GROUP KEY}  **

Or if you are using product tags then

[ORDERS GROUP|PRODUCT TAG:<tag name>:<sort order definition>]
<C11>** {GROUP KEY}  **

So sorry for the DQ

How to set the order display to show orders group by Course?

What have I missed?

It should look like this …

but I have got only this…
Version 5.2.14


What version of SambaPOS are you using?

Show your rules and actions