Ask Question - how to make different things happen depending on the answer?

Hi I have an age verification question set up and i want to do one action if i select one answer and do do something else when i select the other.

Originally i just had the “YES/Verified ID” button so that added a ticket tag to the order to say Age Verification Confirmed I then decided I wanted another button so that if ID could not be checked that button could be pressed instead so that the order is cancelled (aborted)

My first button worked perfectly and added the tag to the receipt but since ive added the second button this no longer works.

Can someone give me a step by step guide on how to make these two buttons do different things when pressed, thanks :smile:

There are already guides out there. Here is a start. You need to use command values. Buttons in the action would look something like Yes=Y,No=N Y and N being the command value. Then your automation command should have Y and N under Values: Finally in your rule that fires the command put command Value equals Y and add the desired action if Y is pressed. Make another automation executed rule and put N for command value and action to fire if its N.

These are my buttons (i did read the guides but i couldnt figure it out)
Command Value Y = YES/ID Verified
Command Value N = NO ID Cancel Sale

This is the automated command

This is the rule that fires the command but i dont know where to put the Value equals Y
The Think 21 Confirmation Action is the message box that appears
The Think 21 Confirmation tag is what i want to happen when YES/ID Verified is pressed (which it did before i added another button) Once i know where to put the value equals Y and can copy and do the same for value equals no, could you show my where ive gone wrong and where i should be putting the value equals Y or N?

It has to be on an automation command… You are not using an automation command to fire your actions. Your using ticket created… which means it will do your actions on every ticket created regardless if you press yes or no.

THe way you have it set is … Ticket Creates… then it asks question… question has no rule to tell it what to do if you hit yes or not… it tags order on ticket created… so basically your question is doing nothing but showing you a popup.

You need to take the confirmation tag out of your Ticket created rule. Keep the question action in that rule…

Make an Automation Command called Think 21 Confirmation

create an Automation Command Executed rule that handles Think 21 Confirmation Put custom constraint of Command Value Equals Y Then put your Think 21 confirmation Tag action that shows age verification confirmed.
Make another Automation Command Executed rule that handles Think 21 Confirmation put Command Value Equals N and then add your action for No response.

my message box comes up now, but nothing happens when i press the buttons, this i smy rule for the YES action, is this correct?

how does this link to “Make an Automation Command called Think 21 Confirmation” and how does that link to the message box?

Woooooo worked it out! my YES action now works, just gotta sort the NO out no

thanks again for you help!! Appreciated as always

I cant figure to NO option out, when i press my first item to create the ticket my message box appears. If i press my YES action the sale continues and my ticket tag appears. However when i press my NO action the item is still added to the order and a ticket is created. when i click my NO button i want it to not create a ticket and just log out forcing the user to start a new sale, any ideas how i set that up? ive tried assigning my abort action, the cancel action, mark ticket as closed nothing i do works (except mark ticket as closed, but that just greyed all my buttons out and i had to use windows task manager to close POS and re-open)

you need to make the question fire BEFORE ticket is created. and make it so if you press Yes it creates the ticket. If you press no it does not create a ticket. You probably still have it fire on ticket created… which means its going to create the ticket regardless of the answer. Or you can just set the no to imediately close ticket… since nothing is added it will not actually create a ticket in your viwer.

EDIT: ok I see your flow now… your firing the question when you add a product to order. Sorry was having trouble following your flow at first. Im looking at it now to see how to do it.

What option do i select to do that? Youre right it is on create ticket as i wanted the message to pop up at the start of every transaction and the only way i could think of was to set it as create ticket so when the first item of every transaction is added that creates the ticket and prompts the question

I dont know what to change ‘create ticket’ to instead so the message pops up at the start of every transaction, any ideas?

Is this coming from a Bar only menu or is it part of your main restaurant too? Do you have to select a Bar department then start taking orders… how does your flow work?

Bar only, yea i select bar department from bottom left of screen or users would log in and the bar department would be the first screen they come to

EDIT: Reformatting my instructions it was scatter brained.

Try this:
Create an Update Order action set QTY to 0 leave everything else default.
Create an Order Added to Ticket rule set custom constraint to Menu Item Group Code Equals [GROUP CODE] where [GROUP CODE] is your group code you assigned to your restricted items if you have not assigned this go ahead and assign each of your restricted menu items a group code.
Add your Ask Question action.
On your yes Automation Command Rule add your action to show confirmation message
On your No Automation Command Rule add your Update Order action, and a Close Ticket action.

Brill thanks ill do this tomorrow and let you know how i get on

Thanks again!

SPOT ON!! thank you very much!!

Problem - ive now added the rest of my group codes to my products but the NO rule doesnt work properly on all of them. When the close rule happens it should then log out but i get the screen switching issue again but it doesnt happen on all the group codes

Also the message box should just appear once at the start of the transaction but it pops up after every single item is added

any ideas why?

Well the reason its popping up after each item is added is because thats where the question was injected. We would need to find a better place to inject the question… or store some program settings for the question to look for and then loop it at ticket close.

@RickH I like the Think21 idea, I have implemented a ask question prompt showing the DOB required to be 18 using ticket date and the 216 month calculation.

I was wanting to maybe add additional feature.
At the minute the Think21 button on my custom numberpad just displays the above ask question with 18yo today DOB.
Was thinking it would be nice to constrain that ask question to only happen if the numpad value is blank and if there is a a value entered (date on ID - have added a / for a button) so can enter date of birth as 18/06/88.
Would like to have two ask question messages constrained to if that DOB is over 18 or not - ie ‘Customer is Under 18 - No alcohol or tabaco to be sold to this customer’ (red) or ‘Customer is over 18 (green)’.
Am not sure where to start with this formula though.

Am thinking along the lines of;
([=FD(ADM(’{TICKET DATE}’,-216),‘dd-MM-yy’)]) >= [=FD{:NUMBERPAD},‘dd-MM-yy’)]
But not having much luck,

Any help appreciated.

Just a suggestion. Thinking people who’ll reproduce that setup we can share some configuration in advance. For example your custom keyboard config or rough details about your rule setup will speed things up.