[Question] Split ticket based on Positions

Hey can you please show me how to set that up. I honestly have been trying for the last hour but can figure out how to setup the rule to grab the position buttons value and set that to state to apply for the next order added.

I will learn alot from it if you can show me? thanks @JTRTech

It just uses a program setting value.
Order added --> set position state using setting value

State name etc in action but would normally put as a [:xxx] in generic rule but was in rush.

Position button pressed --> increase program setting value

Close ticket --> reset program setting to 1

Might be better option for resetting than close but was only example.

The button header just uses the setting value as it is now;

1 Like

Can I see your state real quick also please? @JTRTech

And your action

my preference would still be the [:xxx] method like this;

and have state name in the rule rather than action… makes admin easier and more visable

2 Likes

So im finally trying to accomplish a split tickets based on positions solution. Im trying to wrap my head around it but getting kinda confused :confused:

My proffered flow:
Every order has a SeatPosition State assigned… (ex 1, 2, 3, 4)

AC Button “Split All” is pressed.

Automatically all orders with state SeatPosition “1” are put into one ticket
all orders with state SeatPosition “2” are put into another ticket
and etc

Samba navigates to Ticket Lister Screen.

I got the part to assign positions done. I know that I need to somehow use value looper to loop through all orders and read the SeatPosition Value and move it to the new ticket. This is where im stuck.

Any little piece of help or advice or spiritual guidance is greatly appreaciated haha :slight_smile:

Will this not do what you need… ?

1 Like

I somehow completely missed that tutorial. Wow thanks I’ll look at that now and come back if I have questions.

That tutorial didn’t exist when you asked this question originally, and it might not have came up in search now depending on what you searched for. I just remembered it when I saw what you were trying to do. :slight_smile:

Okay I just looked at it and it’s a great tutorial that I can maybe learn off of by it doesn’t split tickets like I’m trying to. I’m using my setup for dine in restaurants so customers need the bill before they pay unlike his setup. I think my setup is very ideal for dine in restaurants if I can figure it out

Also there are so many scenarios that his setup doesn’t cover,

Combine positions 1 & 3 together then print bill as one ticket etc.

My setup flow will be really easy IMO
All tickets will be split based on positions then in ticket lister screen employee can easily merge and print however they want. I can use Qcmcay’s tutorial on putting print all bills button in ticket lister screen. All I need help with is splitting all orders based on their position

Here is something else that may help (it’s also not what you are looking for but possibly get some ideas):

You would need to loop the position values maybe using the loop action and a report expression to get a list on the position states on orders of the origional ticket.

To be honest I have been trying to figure this out but having no progress. Any help is greatly appreciated.

I now understand how the loop values works but its not helping me figure out how to use it towards my solution.

I think im understanding a way I can approach this.

Loop all orders in ticket to find highest position value. Then create some kind of jscript function that looks through each order and splits them based on position value and tags ticket with the position.

Loop execute automation command where the command value is the position number and the rule for it selects the orders with that position state and moves the orders to new ticket.
You might need to use a local program setting value to store the origional ticket I’d in order to reopen/load the ticket for each loop and move orders finishes on the new ticket.

Split command rule

  • save ticket I’d in local setting
  • loop value with expression to list position numbers

Loop value execute command rule

  • open/load ticket using local setting value for ticket ID
  • select orders with position state of command value
  • move orders
  • clock ticket

Something like that…

How do i select an order with a PositionState value = 2 for example?

Also if you find the free time id love to see an example of this - loop value with expression to list position numbers
Im getting stuck on how to read each order 1 by 1 and read its position state.

Sorry this is all new stuff to me as I never learned advanced automation. Exciting stuff though. Appreciate your help

Lol, I’ve never actually used the loop expression, typically used scripts in times when it was an option…

Select orders action has a state field I’m sure…

So you use the loop expression like an ask question to trigger a seperate rule feeding in the value for the position number.

Select Orders action has a order state field but not value field.

I am using a loop in my combo setup. Thing is if your splitting tickets with loop you will need a way to automate loading tickets etc.

More than likely you would have to use constraints looking for specific positions… positions being states.

Thats what im trying to wrap my head around. Im getting a little overloaded with all the tutorials, I just need a little start then I think ill figure it out. Honestly if I can get this setup im sure alot of people will find it of use. It will automate splitting large people count tickets.

Im thinking I need to somehow read all the orders and get a list of all the positions?

Then select all orders with each position and split ticket, go back to original ticket, split all orders with other positions, then go back to ticket lister screen where user will have a button to print all bills.

No automation wont read postions and make a list to act on. You loop it and act on each one based on its position.

So when I loop orders how can I read a state value?