Order Count excluding Void

Hi all,

is there an easy way to count the number of items in an order which have been submitted, excluding voided items ?
{ORDER COUNT} gives you all items included voided items.

Thanks very much!


That’s because void item is still a submitted order but has been set to a void state.
You need to use report tag instead and use expression of ODI=False
If no one does before hand have very similar one on my system.

1 Like

{TICKET ORDER QUANTITY TOTAL EXP:(ODI=False)} I think it would be.
Depends on your setup, and if you have changed void flow.

You were almost right @JTRTech !

{TICKET ORDER QUANTITY TOTAL EXP:(ODI=True)} worked for me :wink:

Thanks very much!

Arr yes, you want not voided LOL

just a quick follow up to this question, is there a way to configure a button to void all items in a ticket all at once ?

I know there is the “cancel all items” action but that only works before it has been submitted…

This is what you need to void the whole ticket…just be careful and have it so you need to confirm the void

Brilliant, thankyou!

Guys, one last question on this topic… is there a way to differentiate between an order which has submitted items and not.
I’m looking to call the cancel action if items have not been submitted, but the void action if items have been.

The code above doesn’t seem to work as it seems to count non submitted orders as part of the total and therefore the constraint i have set on the relevant rules doesn’t function correctly.

Submitted orders have state of Submitted and non submitted orders states are New so you can constrain to those states.

Tried the below but this doesn’t seem to work… what am i missing ?

I thought about using ticket state “new orders” but the problem with that is that if someone goes into the ticket, adds something then goes to cancel it, the void doesn’t fire correctly.

That is not right.

You would use select orders action and set it to select submitted orders, then fired execute automation command action with the command name and value of the void button would be the cleanest way.