{ticket quantity sum:{name}}

Should this tag work on order added event?
{TICKET QUANTITY SUM:{NAME}}

Pretty sure not. you would need to specify what your constraining ie. O.MenuItemName={NAME} but pretty sure thats wrong as O.MenuItemName is a field not an expression.
If you were looking for sum of orders with state it would be {TICKET QUANTITY SUM:(OS.Status=New)}

Order states will not work in my scenario. I need to know to quantities of individual items.
{TICKET QUANTITY SUM:Test Item} for example works fine. where the name is specified.

In the .5.1.59 release notes @emre said

Nested Settings syntax now works properly, for example:

{SETTING:OStatus_{SETTING:OStatus_Table}}

The above syntax was returning empty values prior to .59 update, so it could not reliably be used in Constraints.

Would this not apply in this situation?

No because neither of those expressions your using are program settings.

[:MenuItemName] is a built in expression for order added event,

Try {TICKET QUANTITY SUM:[:MenuItemName]}

{NAME} probably includes portion…
NAME #Line: Item Name
PRODUCT NAME Product Name
PORTION Portion Name

So also could try {TICKET QUANTITY SUM:{PRODUCT NAME}}

1 Like

{TICKET QUANTITY SUM:[:MenuItemName]} works perfect. Thank you!
I did not think these expressions would work so never tried them.
I had tried {PRODUCT NAME} first and it did not work. {NAME} was the last one I tried that’s the only reason I pasted it above.

So the nested syntax only work for settings, It would be useful if this worked everywhere.

It depends on the use sometimes.
Possible that those {} tags are not valid for that event… but good you got sorted.

1 Like

It should probably work, but it does not. Small bug I think @emre …

N:{NAME}\rP:{PRODUCT NAME}\rPS:{SETTING:OrderName}\rTQS[]:{TICKET QUANTITY SUM:[:MenuItemName]}\rTQSN:{TICKET QUANTITY SUM:{NAME}}\rTQSP:{TICKET QUANTITY SUM:{PRODUCT NAME}}\rTQSPS:{TICKET QUANTITY SUM:{SETTING:OrderName}}

From the test above, the only one that works is {TICKET QUANTITY SUM:[:MenuItemName]} which is shown here as TQS[] …

2 Likes

Hmm nesting an order level tag or a global level tag in a ticket level tag won’t work because of the evaluation order.

Tags processed in that order.

  1. Ticket tags
  2. Entity tags
  3. Order tags
  4. Global tags

As ticket tags processed before order tags {NAME} won’t be a valid parameter for {TICKET QUANTITY SUM}

[:x] parameters will always process first so always prefer them to access order details.

2 Likes