09.19 Workflows and rules
What Major does by itself — deduct stock, print the receipt, free the table — and your own rules on top.
- Who can do this
- Owner
- Permission needed
- «Manage Settings»
Settings → Workflows has four tabs.
09.19.01 Quick Settings Copy link
The common automations as switches: Auto-deduct inventory on ticket close, Auto-reverse inventory on ticket reopen, and Auto-print receipt on ticket close. Most shops keep them all on.
09.19.02 Rules Copy link
Every rule: its switch, its name (a lock on the built-in rules you cannot edit, Default on the ones you can), the Event that runs it, the Actions it takes, its Run order and the Departments it applies to. Set departments limits a rule to some departments — print the kitchen ticket for dine-in only, say.
Add Rule builds one in four steps: When should this rule run? (the event — a ticket closed, a payment added, an item added, a shift opened…), What are the conditions? (only when…), What happens? (deduct or return stock, print the receipt, change a table's state, show a message, open the drawer, Print Document), and Review Rule.
The Print Document action
This action prints one of the print documents: choose the Print document. A New items only document runs only when an order is sent, so other events do not offer it. On an event that does not know the till (a shift opened, say) it says This event does not know the till — it prints on the default printer. A saved document that was deleted shows (deleted): choose another.
List conditions
In What are the conditions?, a condition can look at the ticket's items: Ticket Categories or Ticket Products, with contains any of, contains all of or contains none of, then search for and pick the categories or products. For example: print a bar copy only when the ticket contains any of the drinks categories.
Built-in rules: Core and Default
The rules Major ships come in two kinds:
- Core rules keep the books and the floor right — deduct stock on close, reverse it on reopen and on a closed ticket's void, free or seat a table, seat and release a timed station. They open read-only, with Core rule — keeps stock and tables right: you can only switch them on or off and limit them to departments.
- Default rules are workflow choices — Print receipt on ticket close, Print kitchen tickets on send, Send to KDS on order submit. They carry the Default badge and open for editing like your own rules: name, event, conditions, actions. They cannot be deleted (switch one off instead). Restore default puts one back exactly as Major ships it — name, event, conditions and actions — after a confirm; whether it is on and its departments stay as they are. An update never overwrites a Default rule you have edited.
Conditions on how a ticket was paid and closed
Three yes/no facts let a rule tell a held close from a normal one (see A delivery order):
- on Payment Added: Ticket fully settled (nothing is left to pay after this payment) and Close waits for a status (the ticket stays open until a status such as «Delivered»);
- on Ticket State Changed: Close was waiting for a status (true only when the ticket closed because its status reached the closing state, or was closed by hand while it waited).
The built-in Print receipt on ticket close carries one condition: state = Closed. A delivery closed at «Delivered» does not print a second receipt, because Major prints one original receipt per version of the sale (The receipt and reprinting). To print at the settling payment of such an order, add a rule on Payment Added with both of the first two facts set to yes. On Ticket Status Changed you can also check who moved the status: A person, A rule, The kitchen, Initial or Automatic (from payment / close / void).
Payment Added also offers Tender type: Cash, Electronic or Credit, from the kind of the payment method, not
its name. For example, to open the drawer when cash is taken at the door for a delivery, add a rule on Payment Added
with the condition Tender type = Cash and the action Open drawer. Do not build the condition on the payment
method's name: a Vodafone Cash wallet, for one, is not cash in the drawer.
The close receipt rule after the update
The update put the built-in Print receipt on ticket close back to the single condition state = Closed, if it was exactly as Major ships it. If you had edited it, it stays as you left it, and Major still refuses to print a second original receipt for the same sale.
Rules shows a Print rules to review notice for every active rule whose condition names Close was waiting for a status, or that prints «فاتورة العميل» on an event other than Ticket State Changed and Ticket Status Changed, with: "The receipt prints once per sale; this condition is no longer needed". The notice never edits the rule: open it and decide. Close was waiting for a status keeps its meaning, so rules that use it work as before.
09.19.03 Ticket States Copy link
The State Flow of a ticket (New, Open, Paid, Closed, Voided…) and the Transitions allowed between them.
Under them are your own status groups, such as delivery stages, which rules can also move a ticket through: see Status groups.
09.19.04 Execution Log Copy link
Every time a rule ran: when, which rule, the event, the Outcome and how long it took. Filter by rule and outcome. Look here first when something did not happen by itself — the receipt did not print, the stock did not move.
09.19.05 Simulate a draft before saving Copy link
Open Rules → Add Rule, or edit an editable rule, and reach Review Rule. Under Simulate this draft:
- Select Supply sample for each fact you want to provide, then enter its value. An unchecked fact is unknown, not zero or false. For numbers use a decimal point, without commas or exponent notation.
- If the rule is limited to departments, choose a sample department. Try an included department and an excluded one.
- Press Simulate draft. Read the overall result, the department scope, the conditions and the selected actions.
- Try values that should match, values that should not, missing values, and values just below, at and above any numeric boundary. After changing the draft, supply samples again and rerun the preview.
| Result | Meaning |
|---|---|
| Match | The supplied facts satisfy the rule; the listed actions would be selected. |
| No match | The conditions or department scope do not match. |
| Unknown — missing or unusable information | The preview cannot decide with these samples. Supply or correct the missing facts. |
| Rule disabled | Conditions can be previewed, but no actions would be selected. |
| Invalid draft or samples | Correct the reported problems and simulate again. |
The preview does not save the rule, run actions, change sales or stock, or print. It checks one rule against the samples you provide. It cannot establish whether those samples are true, referenced records exist, printers work, actions succeed, or other workflows will be triggered. A match is not a safety approval. Review the event, departments, conditions and actions before saving; an enabled saved rule affects real work.
09.19.06 Workflow recovery after an interruption Copy link
Open Settings → Workflows → Execution Log. Workflow recovery lists work waiting for processing or requiring review. It is a status view, not a restore button or an undo operation.
- Read the event, time, Ticket ID when available, and Support reference.
- For Waiting for processing, use Refresh recovery status to check progress. Refreshing does not repeat actions.
- For Processing or review needed, work may still be running or may have stopped after some steps. Check the ticket, stock movements and receipts before making a correction. Do not repeat a sale or stock adjustment merely because a row remains.
- If the item persists or the outcome is unclear, contact support with the reference and what you verified.
An empty list does not prove that earlier business results are correct. If loading fails, the status is unknown; it is not an empty recovery list.






