Help Please : 2nd action on Rule not working

you might need a separate rule with the second action, if you put the same as the first youll get a second keypad pop up asking to enter the amount again

you could try putting {NUMBERPAD} in the second action to read the input from the first action. Thats probably not the right tag to use and the second action may not be able to get that info from the first action im not sure but worth a try.

Im sure someone will jump in to tell you the best way :slight_smile:

1 Like

Anyone with any additional suggestions ? It will be much appreciated.

@RickH offered the solution.
Personally I don’t think you should do with products as isnt this going to increase sales?

You would not be able to call the value from the first prompt, into the second action.
You would need to create a command workflow.
Something like an execute automation command action with command name of ‘Customer Cash Out’ and command value of your [?prompt]
The action you showed above would then need to be in a rule for automation command executed with constraint of command name is ‘Customer Cash Out’ and then your two actions could use [:CommandValue] which is feed from the initial prompt in the execute automation command.

1 Like

@JTRTech, Thank you for your help and suggestion.

Just to make sure that I am not trying to complicate what I want to achieve I will explain my requirement in detail as someone might come up with a different/easier way to achieve this.

Customer walks in to have a drink and play pool.
Customer has no cash with him, and will pay with credit card.
He buys a beer, it goes onto his tab.
He now wants to play pool and asks for coins out of my cash register.

  1. I need to add the amount he took in coins to his tab, as he will settle this with credit card.
  2. But to ensure that my cash balance at the end of the day I also need to deduct it from the CASH in my cash register.

Any ideas to achieve this will be much appreciated.

A great day to all !

Its the having a payout as part of a ticket which Im not sure on.
Adding the change given as a product I dont think is correct way to do although that being said with the ability to set if a product inventory/price is calculated it might be achievable although without getting this right I can see you having reconciliation issues.
You might be better waiting for a suggestion from one of the others as am not overly familiar with the inventory/price calculation options for orders.

On a separate line of thought when I used to work on the bar and didnt have any cash I would give myself cashback by ringing in say £10 lunch special and paying with card and then refunding £10 lunch special on cash
Sales figures would balance fine and in essence it is swapping the card payment for cash.
I expect this would not be a recommended approach but expect this could be done with automation in samba (a bit like what you have done but when you add the cash out option a pool product goes onto the tab and the automation creates a new ticket with refund of that product. - Its messy though… wouldn’t recommend that approach.

@JTRTech, Thank you for the quick reply !
I fully agree with you that this is getting messy…
Unfortunately, I also need this for the cigarette machine that is in the pub, the customer doesn’t have cash and hence needs cash from my cash register to buys the Cigarettes. I then need to add it to his tab to be paid by Credit Card…
Luckily I have a small pub and I do not need to track inventory of any of the products, I am only using SambaPOS for the Sales part. Hopefully that will make a solution easier…

Personally you would be the first place that Ive ever seem which would allow cash out on a tab LOL
Most places would obviously go down a cash back route which there is a tutorial on the forum somewhere for.

Typically credit cards do not allow this but debit cards do.

I meant more in the way it was processed on the till, ie bill is £10, £20 charged to card, £20 tendered as card and the change processed as cash.
Although thats not default in samba it is on the last couple of softwares I have used and although not implimented it in samba am sure its easy to do.

Create some open price products (products having a price of 0).

  • Pool table
  • Cigarette Machine

You will track these as products sold. So when they ask for money, you use the numberpad to type in the amount, then click the appropriate Product.

Assign and Entity to the Ticket (table, customer, etc) so you can close the Ticket and come back to it later to add other things.

When the person finally pays (via CC), you will have a Ticket showing what they owe. Process the payment as you normal would.

Up to this point, you are not really doing anything special. But we want to track Cash coming out of your drawer, so we need to put some special automation in place to track this, using Transactions. This would be similar to any Payout from you drawer to a vendor, but in this case, we are working with a Ticket.


  • Create an account that will hold the value of money being removed from the drawer, i.e. “Cash OUT”.
  • Create a Transaction Type that transfers money from Cash to the Cash OUT account.
  • define an Action for Create Account Transaction
  • define a Rule for Order Added to Ticket
  • in that Rule, use the Constraints to check for the Pool Table or Cig Machine products
  • add the Action defined above to the Rule
  • the the {PRICE} tag as the Amount Parameter for the Action
1 Like

@JTRTech we have a similar sample

2 Likes

@QMcKay
Thank you for the assistance, this now works exactly as you explained-thank you so much.

However I have picked up one problem…if I add the price via the numeric pad, select the product, it goes onto the ticket with the correct value as expected…
However, if I then cancel that product, before submitting it… (let’s say someone makes a mistake and realize it-or the customer changes his mind) it clears the product from the ticket but the action I defined still removes the cash …one can see this by looking at accounts…the transaction that removed the cash still happened although the product was cancelled of the ticket…

Any ideas ?

This is because the transaction was created as part of the automation, and the cancel order rule has no knowledge of that.
You would have to add the reverse happen if one of those is canceled.
At least if I understand what youve done

JTRTech is right your original rule to add the order to the ticket has a second action to move cash between accounts so as soon as you add the misc item the cash is also moved from one account to another

When cancelling that orderline all the cancel button does is remove it from the ticket, there is no other action in that rule which is why the movement of cash between accounts doesnt happen, you havent told it to do that when an order is removed

You would need to create another action that moves the cash back into to original account and add that action to the cancel order rule. This might then need additional constraints so it only does the account moves for the specific items you require. In fact you might be better cloning the cancel order rule and amending it for this scenario. You would then have two cancel order rules, one that fires for normal items and the second that fires just for the misc items that need the account movement to happen

@RickH

Hi Guys, thank you for your replies.
I understand your explanations 100% , and tried to implement the reverse transaction but something is going wrong somewhere…I believe it must be in the rule…I created as per @RickH suggestion a second rule and left the default order cancel rule…
Currently I defined the rule as per the below…does this look right ?

If the action in that rule moves the ‘money’ from one account and back to where it started that should work, however you should two actions in that rule.

You need to add the cancel order action before that other action, then when either pool or cigarettes is cancelled it will be removed from the ticket and the money transferred back in accounts (providing you have setup your account action correctly)

EDIT - sorry just seen your using order cancelled rule so when either of those two items is cancelled then your account action should fire and move the money back

The other option was to use clone the default cancel order action which is an automation command executed rule that has the cancel order action and your account action, with the same two menu item constraints

I know making account transaction is quite complicated for me too. I think using ticket tag is easier than reverse account transaction and cleaner transaction too. You can ticket tag to track pool/cigarette cash out item added or cancelled and when click close ticket then do account transaction.

1 Like

It might be even better to do it when ticket gets fully paid. Not to deal with cancellations, voids, etc prefer this method. Handle payment processed rule and add a constraint to check if remaining amount is zero. When it is zero you can assume this is the final state of the ticket and you can make related account transactions.

To be able to find transaction amount you need to know total of these items. We have {ORDER STATE TOTAL:X} tag to determine total for orders that have a specific state. Alternatively you can use {TICKET ORDER TOTAL EXP:X} tag to find total of orders that matches X expression. Expression compatible with custom reports expressions so you can use these expressions.

  OT.<tag name>                      Order Tagged With
  OS.<state name>                    Order is in State
  OU                                 Order User Name Equals
  MT.<tag name>                      Order Menu Item Custom tag Equals
  MG                                 Order Menu Item Group Equals

So for example {TICKET ORDER TOTAL EXP:(MG=Beverages)} tag will return total amount for orders these menu item group equals beverages.

It will be better to experiment that with a show message action that shows tag value when payment processed. When you start seeing desired amounts you can implement action that decreases that amount from cash.

1 Like

Oh God! sorry you asked for V4. Expression tags is a V5 feature but {ORDER STATE TOTAL:X} will probably work for V4 so you can mark orders with a state change and use this tag to read total.

I suggest ticket close because I think customer in this case tend to stay very very long times (few hours at least). It remind me when I was young, I stayed there for 4-8 hours lol. He might want to check cash in the till before customer paid for the bill.

1 Like