Applying the ask question to this scenario

I’m not on my laptop to be able to link this thread to another I was working on but I’m hoping to get some idea so I could test and implement at a later time.

Regarding the take away and dine in implementation. To those who helped me set up the print for take away and dine in and having dine in to select a table number and tale away to apply incrementing number… Currently the system is set to print automatically upon payment… After some time the client of mine requested that he wants the option to print customer receipt only when necessary.
I know there is an ask question action which I could apply, but I just wanted to know, do I apply the action to the rule that prints for dine in and take away and remove the action within the auto execute print after payment rule?

Or is there another way which I can implement the ask question on both take away and dine in options without affecting their current rules and action setup.

Once I’m at the office PC I will post some screen shots to have a visual idea of my current setup.

Once I get this implemented also, I will have one more final step to do to completely be happy with the setup and be confident enough to do my first ever tutorial.

Few places you could put the ask question.
Before ticket closing (where total more than 0 and balance = 0)
Payment Processed

Could have in separate rule or in place of the existing print receipt and have the print action in a automation command rule (from the ask question).

There are numerous Print bill rules and actions in this case, since the prints are based on whether Dine in or take away is selected.

Screenshots of the current print bill rules

The Print Bill Rule Below

The Execute Print Bill Rule Below

Print Dine in Bill Rule Below

Print Take away Bill Rule Below

The Ask question Action below

I think due to the rules set for dine in and take away, whenever I insert the action PB_Ask Question… even after selecting no, it still prints because of the other actions in the rule.

I tried putting it In the before ticket closing check, and after pressing no, it still tried to print.

I tried putting the question in each of the take away and dine in print rules, and pressed no when it asked, yet it still printed(this may be because of the other actions within the rule)

So I thought about creating 2 separate actions for take away and dine in, then I saw that it requires an automation command… Therefore I thought how can I make this work. Do I need to have 2 automation commands for each ask question action, and then put them in each rule individually?

or I’d have to do something about the print actions in the take away and dine in rules…

To have an action as a result of an ask question it needs to be in a seperate rule.

Rule A (Say your ticket closing rule)
Ask Question
Question: Print Bill?
Buttons: Yes=Yes,Cancel=Cancel
Command: ClosePrintBill

Rule B (Close Ticket Print Bill Question Action)
Rule constraints;
Command Name = ClosePrintBill
Command Value = Yes

Print Bill A (Action constraint for ticket type A)
Print Bill AB (Action constraint for ticket type B)
1 Like

Sorry I think I’m gonna sound very newbie here but I tried, to apply or at least picture what you wrote in order to understand the way you are trying to show but couldn’t put it together.

I assume if I create these separate rules, I have to sort the order of those rules and put them before the other rules so that it applies that rule before other rules for this to work?

The Rule order as listed in the Rules section is not important.

The way the Ask Question Action works is to display a message with Buttons for choices that are assigned Command Values, which when clicked trigger an Event for Automation Command Executed.

The Rule on the left contains an Ask Question Action. It has several buttons defined with different Command Values. When a user clicks on 1 of the button choices, the configured Automation Command (AMCname) is executed along with the Command Value assigned to the button which was clicked. The execution of the assigned Automation Command (AMCname) is handled by the Rule on the right.

So in essence, every time you want to Ask a Question, it will involve 2 Rules.

  • 1 Rule containing the Ask Question Action.
  • 1 Rule to handle the Automation Command that the Ask Question Action is configured to fire.

You could “chain” several of these together, so 1 event asks a question to fire an automation command, which when handled by its rule, fires another question which fires an automation command which contains yet another question…

1 Like

Order will only matter if a factor of the rule is defined in another in the same event.
Is if your setting ticket type on ticket closing for example

I can see where chaining of ask questions could be useful. It makes more sense now. I only spoke of sorting order in my rules list since there are multiple printing rules that are set, the original execute print bill rule, the print bill rule on order screen, and the two print bill rules which are more defined to either dine in or takeaway.

Ok lets say I put ask question in this rule

If I use the ACN name as ‘Print Bill’

I save it, then press Dine in, apply an order then click cash(example)
It immediately gives me this

And if I press "No"I get below

So it still prints regardless.

Now this tells me that my ask question is working, the values are there, but I believe because of the other Execute Print job rule I have, it still prints regardless…

This is my execute bill after bill payment(payment processed)

I also tried removing the ask question in my dine in and take away rules,
instead I added it to the execute bill print after payment rule,

Tested it, and it still tries to print even if I pressed no.

(Don’t mind the errors, I dont have the printers attached, I just use it as an indication to see whether its actually trying to print or not)

@Shivan, how you doing.

This is a really good one to know - all subsequent Rule actions will be processed after your Question! What you should do is call another Automation Executed Command and test to see if the User selected Command Value=Yes or No (pseudo code).

Place all subsequent Rule Actions into the new Automation Command Executed rule. use ACNName above to enter the Automation Command Name.

Hint: The ACNName does not need to actually exist in the Automation Command Lists just use a unique name!


Your Ask Question Action must call an Automation Command (ACNname), otherwise it is pointless.

As @pauln mentions, you do not need to actually define the Automation Command in the Automation Commands section, simply type a name into the area where your parameter is ACNname. You could use for example: PrintBillYN.

Then remove the Print Bill action from that Rule.

Create a new Rule for Automation Command Executed Event and in the Constraints use:

Automation Command Name Equals PrintBillYN

Command Value Equals Yes

Put the Print Bill action into this Rule.

1 Like

Ok, so If i create a new rule with those two constraints, and values, I’d just put the print bill action in there, and remove print bill from my "Dine In Bill Print"rule for example, right?

Therefore I should remove my “Execute Print job when ticket paid” rule completely, correct?
Like the screenshot below?

Or am I having to remove the bill print jobs in my "Dine in Bill Print"rule?

EDIT: I think I have to remove my execute bill print when paid, remove the Dine in Print bill from my "Dine in Bill Print"rule, put the ask question action in that rule, but the ACNName as PrintBillYN(example) then in a rule, apply those constraints you suggested, and put the Dine in Print bill"in there. Hmm ok I’ll give this a try.

1 Like

Ok so here is what i’ve done so far, and what I think should be appropriate to do next. As a test, went ahead and created a new rule.

I then went to this rule and removed the “Dine in Print Bill”, and left the PB_As Question action there. Now since I still want the kitchen and counter orders to print, I left them under the ask question action( I hope this is right so far).

Now I tested this, when clicking no, it doesn’t print(which is good),but when you click yes, it doesn’t print the receipt.
(Ive now assigned notepad for printing of receipts, and checking the print)

For your buttons you have:


In your Rule for PrintBillYN your constraint is:

Command Value Equals Yes

Everything is case-sensitive. You are passing yes from the Ask Question Action, but in your subsequent Constraint, you are checking for Yes.

yes is not equal to Yes (note the case of the “Y/y”)

As a reminder, your buttons are defined as such:


The color specifications are optional, so you can shorten it to this:


1 Like

Ahh I see, yep yep, after I made that change, it work wonderfully, so I applied another rule for my take away and that’s working also.
Thank you so everyone for clarifying the information with me, and sorry for been a newbie.

1 Like

Ask Question action is a great Action for learning Rule Structure it forces you to understand the hierarchy. Once you understand how that works and how actions/constraints fit inside that sandbox then you will really start blazing trails with your setup.

Great job @Shivan for asking quality questions and giving us quality information to assist you with. This is an awesome example of how the community can help you configure SambaPOS.


Thank the awesome helpful community for their patience and understanding. I’m just a newbie trying to grasp the basics haha.