###What is a State?
State is a general SambaPOS feature that defines operational properties of things. SambaPOS have three different types of states.
- Entity State
- Ticket State
- Order State
###Updating States
We change state of things by using these actions.
- Update Entity State
- Update Ticket State
- Update Order State
There is no need to define states somewhere. State changing actions accepts any values. If you define states under Management > Settings > States you’ll be able to define colors, report appearance and rules will fill parameter combo boxes with configured states for easier usage.
###Default States
On first installation we crate some states by default.
- Entity States (Tables, Customers)
- State Name : Status
- New Orders
- Available
- Bill Requested
- State Name : Status
- Ticket States
- State Name : Status
- New
- New Orders
- Unpaid
- Locked
- Paid
- State Name : Status
- Order States
- State Name : Status
- New
- Submitted
- State Name : GStatus
- Gift
- Void
- State Name : Status
Entity States
On default configuration creating a ticket changes entity’s Status state to New Orders. That behavior configured with Update New Order Entity Color
Rule. Since default entity screens displays Status state of entities, changing Status state of an entity to New Orders changes color of entity buttons to Orange. That color configured at Settings > States > New Orders
State.
Entity state changing rules changes both table
and customer
entity states. So “All Tables” and “Customer Tickets” screens displays same entity colors.
Ticket States
As soon as we create new ticket it’s “Status” state becomes New
. Adding first order changes state to New Orders
. Closing ticket updates state to Unpaid
. Clicking “Print Bill” updates ticket state to Locked
and finally settling a ticket updates state to Paid
. All these behavior controlled by Rules such as “New Ticket Creating Rule”, “New Order Adding Rule”, “Ticket Payment Check Rule” or “Print Bill Rule”. You can change whole workflow for your needs.
Changing ticket’s state updates command buttons availability or visibility. For example you can’t click Print Bill
button if ticket state is “New” or “Locked”. That configured by related Automation Command’s Enabled and Visible states.
###Order States
Orders have two different states.
-
Status. Can be
New
orSubmitted
. New order’s Status state isNew
. “New Order Adding Rule” updates this. Closing a ticket prints all new orders to kitchen printer and updates their status toSubmitted
. “Ticket Closing Rule” does this. -
GStatus. Can be
Gift
orVoid
. Again there are specific rules here. For example you can’t gift a voided order. Gift and Void automation command mapping defines that behavior. Also Clicking Void button updates order’s state toNew
so it prints to kitchen printer again.
###Entity Screens
All Tables Screen
Table screen displays Table entities. As configured with Display State setting, it displays Status
state of tables. Since these states configured to display Orange, Maroon and White colors, this screen displays buttons as:
- White if Table’s
Status
state isAvailable
- Orange if Table’s
Status
state isNew Orders
- Maroon if Table’s
Status
state isBill Requested
State filter setting left empty because we need to display all states here.
Customer Tickets Screen
We display customers that have open tickets here. So this screen displays entities where Status state is New Orders
only. We configured it by updating State Filter setting. Since New Orders
state is a sub value of Status
state there is no need to update Display State. If you use same state values for different states you can change Display State setting.
Visit Simple Reservation Example sample to learn how to add additional states for tables and how to display that state on entity screens.