# Simple Reservation Example

**URL:** <https://forum.sambapos.com/t/simple-reservation-example/284>\
**Category:** V4 Tutorial\
**Created:** [January 15, 2014, 1:47pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284 "2014-01-15T13:47:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [January 15, 2014, 1:47pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/1 "2014-01-15T13:47:36Z")

</div>

Hello. As 4.1.9 release we can mark tickets as pre-order to create draft tickets. I’ve created a sample to demonstrate this feature for creating a reservation system. I kept this sample as simple as I can.

I’ll keep posting tutorials for usage and implementation.

[Download Simple Reservation SQL CE database](http://sambapos.com/?wpfb_dl=4)

> **Database Tools Import file**

> [Reservations2.zip](https://forum.sambapos.com/uploads/default/original/3X/6/2/62896b0f442c8465fdcf99c00a4990196f543ccf.zip) (2.3 KB)

> **Warning** : Import this file on training mode to ensure it does not break your existing configuration. It replaces some default rules listed here

> - Ticket Closing Rule
> - Update Available Entity Color
> - Ticket Payment Check
> - Update Moved Entity Color

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [January 15, 2014, 3:09pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/2 "2014-01-15T15:09:20Z")

</div>

##How it works?

This video shows how sample database works. Don’t forget enabling subtitles.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [January 16, 2014, 4:26pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/3 "2014-01-16T16:26:46Z")

</div>

##Implementation

###1. Actions

####1.1 Mark ticket as pre-order action

We’ll start by creating two actions to enable, disable pre-order setting of a ticket.

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/9/0965a690c6e8b6f6ec78d0aecef8abcf0673dfbd.jpeg) 

“Mark ticket as pre-order” action is useful to change ticket to a pre-order ticket. We’ll use **Change Ticket Properties** action. We’ll set pre-order to **True**.

####1.2 Mark ticket as Non-preOrder action

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/2/e2740c367de26569ced74217827213b08f4fb60f.jpeg) 

This action disables pre-order setting for ticket and also changes ticket date to current date. We’ll execute this action when we convert a reservation ticket to a regular ticket.

####1.3 Update Entity Reservation state action

We’ll need another action to update Entity’s (Customer in this case) reservation state. So we can list customers who have active reservations.

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/9/09e04fc2d031717b69573b0dda6cfb65b0501e70.jpeg) 

####1.4 Refresh ticket action

Finally we need a simple action to refresh ticket’s display. We can use this action to refresh ticket screen after we make changes on ticket states or tags.

 ![](https://forum.sambapos.com/uploads/default/original/3X/9/4/94587f44d5a6775ce5d39be0ddc8ab3c4071427e.jpeg) 

###2. Automation Commands  
We need two automation commands for “Reservation” and “Check-in” buttons.

####2.1 Reservation Command

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

I’ve enabled confirmation setting so it will ask a confirmation when we execute this action. We’ll map this action as follows.

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/3/d379bb8ae361ef9ca35842d2dda2e1d25c38931a.jpeg) 

We’ll see Reservation button when ticket state is “New” or “New Orders” but we can click this button only when we start receiving orders so the Enabled States is “New Orders”

####2.2 Check-in Command

We’ll create another command for “Check-in” operation.

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/1/81679a542816e23486b7528daec725472469bad5.jpeg) 

I’ve also enabled confirmation setting for this command. Now let’s see how it mapped.

 ![](https://forum.sambapos.com/uploads/default/original/3X/4/8/48bc87710ccd8c21d42f4dda1c41835de715e20c.jpeg) 

It works only when ticket status is “Reservation”.

###3. Rules  
####3.1 Mark ticket as reservation rule

First of all we’ll tell SambaPOS how “Reservation” Button works.

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/f/0f85498445fc00b8df341f58d9b3f80a981e9aeb.jpeg) 

We need to pass parameters to “Update Ticket Status” and “Update Entity Reservation State” actions. This screen shot shows these parameters.

 ![](https://forum.sambapos.com/uploads/default/original/3X/9/2/9203ac0d46606d582a78f4432e64b9dd1262e4ae.jpeg) 

So when we click on “Reservation” Button.

1. It marks ticket as pre-order.
2. Changes ticket status to “Reservation”
3. Changes Entity’s Reservation state to “Has Reservation”. So we can create a new state record to display these entities in different colors.
4. Closes Ticket. Instead of closing ticket you can use “Refresh Ticket” action to keep ticket open.

####3.2 Check-in reservation ticket rule

We need another rule to handle “Check-in” button. We’ll use this button to convert a reservation ticket to a regular ticket.

 ![](https://forum.sambapos.com/uploads/default/original/3X/b/d/bdd689a3e6f604d6a34e04a068fa2fd6e22ae445.jpeg) 

See next screenshot for action parameters.

 ![](https://forum.sambapos.com/uploads/default/original/3X/4/1/41e83ae8b5c49bf72a5648c0d7936340735f138c.jpeg) 

When we click on “Check-in” button SambaPOS does:

1. Disables pre-order setting of ticket so this ticket works like a regular ticket.
2. It changes ticket’s status back to “New Orders”. Like we are creating a new ticket.
3. Changes Entity’s Reservation state to “Closed”. As you can remember we updated it to “Has Reservation” to list entities that has reservations.
4. In final step it refreshes ticket display. We’ll keep ticket open so we can assign ticket to a table or make other changes.

###4. Changes for existing rules  
####4.1 Ticket Payment Check rule

As you know “Ticket payment check” is useful to closing paid tickets. We can receive advance payments for reservation tickets but we want to keep that ticket open. So we’ll add a constraint to keep reservation tickets open.

 ![](https://forum.sambapos.com/uploads/default/original/3X/7/9/79c0289d5ac0971bc3369641ea6845abfa009d64.jpeg) 

This rule will work if ticket’s status is not “Reservation”.

####4.2 Ticket Closing rule

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/f/df9f0124dfb62793fe4df7efc0132f6f3c0e597b.jpeg) 

This rule sends orders to kitchen, changes ticket status to “UnPaid” and changes order states to “Sumbitted” to indicate these orders printed to kitchen. We also need to disable this rule for “Reservation” tickets since we need to send orders to kitchen after “Check-in”

This rule won’t work for reservation tickets. When we click on “Check-in” button it will change ticket’s status from “Reservation” to “New Orders” so this rule will start working.

###5. Reservation Entity Screen

We’ll create a new entity screen to display customers that have reservation. As you can remember we update Customer’s reservation state to “Has Reservation” so we can create a new entity screen to list these customers.

 ![](https://forum.sambapos.com/uploads/default/original/3X/c/e/ce07fb99ec73516f90d7e00148d9ba9f1f0476b2.jpeg) 

On “Entity List” screen we’ll configure which entities it should display.

 ![](https://forum.sambapos.com/uploads/default/original/3X/7/3/73caef234735ccf0ef1865a395ab75afb9eff817.jpeg) 

It should list “Customers” with “Has Reservation” state.

Finally we need to create a new state configuration to give a different color to “Has Reservation” state.

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/5/d5066830cacfafd00902d2cbbd7276bb2265e198.jpeg) 

On “Reservations” screen buttons will have Blue color.

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/0/e0aeea3fa80dd230430e91e7ae20c33a8d64709d.jpeg) 

In sample database and video this screen is a custom screen and it displays a Ticket Lister next to Entity Grid. If you want to enable this feature you can change screen type to custom and add a “Entity Grid” widget and a “Ticket Lister” Widget.

This is how Ticket Lister widget configured.

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/2/e21a45e106ca3d1c45a08ef71669e22737385a1f.jpeg) 

It lists tickets that have Reservation state and it displays Customer Name and Phone number.

##What’s Next?

This tutorial aims to feature pre-order tickets. On next tutorial I’ll show you how to handle reservation dates and “No-Show” feature to disable reservation tickets.

---

<div class="post-metadata">

**Author:** ![compwize](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@compwize](https://forum.sambapos.com/u/compwize)\
**Post date:** [May 2, 2014, 3:41pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/4 "2014-05-02T15:41:53Z")

</div>

Can you please upload an imported configuration of this setup. Thanks

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [May 3, 2014, 5:03pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/5 "2014-05-03T17:03:20Z")

</div>

Hello. I’ll prepare a more complete sample that also contains `No show` feature and prepare the export file after Monday. Thanks.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [May 8, 2014, 6:53am UTC](https://forum.sambapos.com/t/simple-reservation-example/284/6 "2014-05-08T06:53:09Z")

</div>

@compwize I’ve added export file on first post of this topic.

---

<div class="post-metadata">

**Author:** ![jamesm](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/9fc29f/32.png) [@jamesm](https://forum.sambapos.com/u/jamesm)\
**Post date:** [May 15, 2014, 3:54pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/7 "2014-05-15T15:54:42Z")

</div>

Is it possible to handle reservation dates yet ?

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [June 3, 2014, 11:28am UTC](https://forum.sambapos.com/t/simple-reservation-example/284/8 "2014-06-03T11:28:13Z")

</div>

Hi @emre i followed all the steps from “implementation” above but when i select a customer— place an order and click on reservation it ask for confirmation also but when i click on reservation entity screen its empty but the customer who made reservation can be viewed in customer ticket.

where did i go wrong?

i just want to reserve table not place an order. for this i try to follow this from “Add button Reserved”

@QMcKay Modify the Mapping for the Reserved Automation Command (button) so that it’s Enabled States is New only (or change it to \*), instead of New Orders as it is in the Tutorial, and you will be able to reserve the Table without placing an order.

this also not working?

---

<div class="post-metadata">

**Author:** ![windinghouse](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@windinghouse](https://forum.sambapos.com/u/windinghouse)\
**Post date:** [June 3, 2014, 12:18pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/9 "2014-06-03T12:18:49Z")

</div>

@madiha this may help? I use this method to change the entity colour to show the table as ‘occupied/reserved’

> [@Button to change entity state](http://forum.sambapos.com/t/button-to-change-entity-state/1416):
>
> HI - by now I should know by now how to do this - but something else that I am struggling with smile I want to create a button that changes the state of an entity ( table in this case) from available to Occupied This is for when a customer is seated but has not yet placed an order. All I need is to change the colour of the entity so that we can see from the screen that there is someone at that table. I don’t need to change the ticket state or anything else, just the colour of the entity. I …

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [June 5, 2014, 7:28am UTC](https://forum.sambapos.com/t/simple-reservation-example/284/10 "2014-06-05T07:28:43Z")

</div>

this is just to tell if table occupied but i want more than that. i want to reserve a table with customer name. so when customer comes in i can verify for the reservation. Just reserve the table no orders !!!

How will this happen!!!

any suggestions???

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [June 6, 2014, 8:08pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/11 "2014-06-06T20:08:12Z")

</div>

So you will never receive orders or deposits for reservations? Does noting “x table reserved for y” enough?

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [June 10, 2014, 11:12pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/12 "2014-06-10T23:12:52Z")

</div>

@emre ya i want to work on both scenairo x table reserve for y only and x table reserved for y with order.

i am also working on the reservations steps defined bove…but no luck its not working reservations not going in reservation screen

---

<div class="post-metadata">

**Author:** ![shmoulana](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/s/cdc98d/32.png) [@shmoulana](https://forum.sambapos.com/u/shmoulana)\
**Post date:** [June 28, 2014, 2:09am UTC](https://forum.sambapos.com/t/simple-reservation-example/284/14 "2014-06-28T02:09:30Z")

</div>

Hello @emre,

Can the same tutorial applicable to V3 as well ?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [June 28, 2014, 8:01am UTC](https://forum.sambapos.com/t/simple-reservation-example/284/15 "2014-06-28T08:01:31Z")

</div>

Sorry. It probably won’t work for V3.

---

<div class="post-metadata">

**Author:** ![DenizAltun](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@DenizAltun](https://forum.sambapos.com/u/DenizAltun)\
**Post date:** [August 20, 2014, 12:20am UTC](https://forum.sambapos.com/t/simple-reservation-example/284/16 "2014-08-20T00:20:32Z")

</div>

hi @emre, our restaurant has a website where we are able to take online reservations.

do you know if it is possible to integrate this online reservation into sambapos?

so every time a reservation is received online, it will be displayed on sambapos?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [August 20, 2014, 1:26pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/17 "2014-08-20T13:26:11Z")

</div>

It depends. If @Jesse asked me if it is possible to integrate a payroll system to SambaPOS I’d say no. But he did it 🙂

> [@TimeTrex Community Edition Integration: How to integrate third party Payroll/Time Clock software into SambaPOS](http://forum.sambapos.com/t/timetrex-community-edition-integration-how-to-integrate-third-party-payroll-time-clock-software-into-sambapos/2048):
>
> !!!IMPORTANT READ FIRST!!! This tutorial will be based on the understanding that you already have TimeTrex Community Edition installed and it is operating correctly it will not explain how to install and operate TimeTrex Community Edition. You should have a working knowledge of how to administer TimeTrex BEFORE you deploy it or this tutorial in your business. If you have any questions on Installation or Administration of TimeTrex use the official TimeTrex resources [http://forums.timetrex.com/](http://forums.timetrex.com/) …

I mean we don’t offer a ready to use solution yet but SambaPOS is flexible enough to do anything you want. Especially if you have some coding skills like @RandyMagnum

> [@External System Communication](http://forum.sambapos.com/t/external-system-communication/2128):
>
> I run an internet cafe and although there are plenty of software solutions out there for managing the computers, they all have fairly terrible POS solutions. I’ve been running SambaPOS4 for a while and it’s absolutely perfect. I’d now like to integrate the cafe management software a little bit more closely with SambaPOS, an example of this closer integration working for one use case is as follows: New Ticket Created Cashier scans purchased items Customer requests to purchase a package of “comp…

---

<div class="post-metadata">

**Author:** ![albosta](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/a/8baadc/32.png) [@albosta](https://forum.sambapos.com/u/albosta)\
**Post date:** [August 20, 2014, 3:16pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/18 "2014-08-20T15:16:49Z")

</div>

is there a tutorial yet for no-show and date handling. I’m new to samba pos and looking for this features.

Thank you for your support.

---

<div class="post-metadata">

**Author:** ![ginoli](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/g/90ced4/32.png) [@ginoli](https://forum.sambapos.com/u/ginoli)\
**Post date:** [August 24, 2014, 5:03pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/19 "2014-08-24T17:03:48Z")

</div>

But how to cancel reservation? There is a button?

---

<div class="post-metadata">

**Author:** ![danielpotter05](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/d/96bed5/32.png) [@danielpotter05](https://forum.sambapos.com/u/danielpotter05)\
**Post date:** [October 22, 2014, 4:11pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/20 "2014-10-22T16:11:04Z")

</div>

Could you please advise what mappings should be used for ‘Mark Ticket is Reservation’ and ‘Check In Reservation Ticket’. These are greyed out in the Rules list. Also The Reservation button is inactive on the ticket, is this because there are no mappings associated?

---

<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:** [October 22, 2014, 4:18pm UTC](https://forum.sambapos.com/t/simple-reservation-example/284/21 "2014-10-22T16:18:32Z")

</div>

Rules are inactive and do nothing when they don’t have a mapping, and so they appear grey. In 99.9% of cases you will use a Default Mapping (all `*`) which will suffice.

When talking about Rules, we often leave the mapping information out since it is assumed that a Rule needs a mapping to work.

[Next page](https://forum.sambapos.com/t/simple-reservation-example/284.md?page=2)
