When changing ticket types order prices need to be updated as some items have different based on delivery/pickup. This is working but I need to constrain which orders are selected to update.
Any combos have fixed pricing no matter what. Right now the menu items that are part of a combo are reset to their default price whose sum is more than the combo price.
Using the Select Orders action, I would like to be able to select orders where PStatus is not set or Group Name is not set, or even Group Key is not set. Setting PStatus = No Promotion on order added (thinking I could use that constraint to select orders) interferes with combo automation, and group price is changed to 0.
I’ve tried to select by order state PStatus!=Promotion, Order.GroupTagName == "" as an expression with no luck.
Have you tried only carrying one field for the action.
Have in the past found that an empty field is not ignored.
Think it was portion on update order (May have been old version that has been changed since) but an empty field reverted product tp 1st/default portion rather than ignored.
Perhaps your empty other fields are being included causing all to be selected bypassing other fields filter expressions?
Not necessarily selecting all orders, but rather getting the Unique Order Id (UOI) then, looping each UOI to set the price. You can constrain out the order based on the order state on the Loop Rule (or just adjust the price to same price).
I think the problem is that it only reads the order states after it has selected the orders not before. I might be wrong but I was doing some automation using order states and hit the same bump few months back.
A constraint is based on the rule event not the action, and guessing the select orders isn’t in an order based rule so has no like to orders. Or even if it were on say order added it would reference the order that was added not all ticket orders, and in that case there would be different flow anyway
If one calls in an order for pickup but then changes his mind and calls back to change to delivery I wanted a way to change the ticket type. States, pricing, etc. would need to be changed.
In the end I’m putting this on the back-burner. I’ve spent too much time on something that won’t be used often and isn’t critical.
Cant you use different Entity Screens with different Ticket Types for this? Then you can also use Ticket Entity Changed Rules to change active ticket type, apply different price definitions, states across the board etc.