How to remove a ticket tag when another is selected

Hey guys,

I’ve got 3 ticket tags to choose from. DINE IN, TAKE AWAY and Order No(Auto incremented number generator).

You can have all 3 tags assigned to the ticket, and you can manually untick each one.

What I would like to know, what type of action can I create that removes any tag currently assigned to a ticket?

I would like to attach this action to my Assign TAG rule, so that when DINE IN is selected
, it clears anything that is already assigned and simply puts DINE IN tag. Like Below


When TAKE AWAY tag is selected, it clears any assigned tags and puts TAKE AWAY tag and Order No tag like below.

Currently if you have selected TAKE AWAY TAG, it automatically puts Order No(which is what I want it to do), but customer decides to go dine in, you have to manually untag TAKEAWAY and Order No tags first before selecting DINE IN tag, so that it only shows DINE IN. Likewise when you selected DINE IN, customer decided they wanted to go TAKE AWAY, you manually Unclick DINE IN then click TAKE AWAY tag.

Just create an update ticket tag action and leave it blank, then put your DINE IN ticket tag action after it. so when you press DINE it it will remove the current ticket tag and then add DINE IN as the ticket tag

Have you seen this:

You only create one ticket tag button.

Yes I have, I originally had it like that, then I realised for the intended purpose of what the system I’m trying to put together for this client, I need to do it this way as it would be easier for the client to do it on the go without more menu options.

For what I’m trying to setup, you can take a look at Dine In or Takeaway Help
:slightly_smiling:
I think I tried that JTR but I may have made a mistake with my actions. I don’t have my workstation laptop with me right now. I’ll check up on it right after I do some more office work :slightly_smiling:

OK, fair enough just want to make sure you have options. Not much space left for automation command (prob 4 buttons left from your screen), I rather save space for other command. :wink:

You should create Update Ticket Tag action with parameter like this [:Tag Value] and update tag in the rule. So, you don’t need to create too many actions too.

One action can update and remove (leave it blank to remove the tag)

I’m scared of custom constraints haha. :confounded::laughing: I don’t know how they work together. But you know… I know this is possible but I simply can’t seem to get my head around how to get it to work. If I could Ideally get the Ticket tag to automatically set itself based on the entity screen selection in my other post, Then I would probably remove both those buttons, create that one ticket tag, and with help make it do exactly what I want it to do outlined in this post at the same time.

Because this is just one part of the equation. After setting this up perfectly, my next step would be to tie it all together. Oh boy would I be happy then. It seems so easy to do, but for me, it would definitely be a new personal accomplishment.

I use Ticket Created event to choose Dine in or Take Away it tags ticket appropriately. You could do the same and constrain it based on Entity or anything else you want.

Could you show me how to constrain something like that to entity which is a table selection.
Coz the user would press Dine In first, then they have to select a table, its when a table is selected that the Dine In tag should be applied automatically.

In that case there is no reason to select it. I’ll not be at a computer until 9 hours from now. I can show you after my meetings today.

Alright no worries, I’ll try a few things out and let you know how I go. thanks guys :slightly_smiling:

You said you wanted to remove a Tag automatically if a Table was selected:

Rule EVENT: Ticket Entity Change
Constraint: Entity Type Name Equals Tables

You will need to create a Action to Update the Dine In/Take Away TAGS with Null or Blank as discussed above. Obviously I am showing that may Tables Entity is actually called “Tables”.

Alright, I’ve created some actions and rules. but it seems to crash sambapos everytime I click on either ticket tag.

My DINE INE Action

My Clear All Tags Action


My Take away Rule

My Dine In Rule

When a table is selected, it should tag it with Dine in. In the case that customer changes mind to take away, instead of going back to entity screen to pick take away, the user clicks take away button, and that button clears any tags and retags it with take away.

That is what I’m trying to achieve.

If take away is selected, by default the Auto command is “Add Ticket” in widget settings, so maybe I could make a rule, so when Add ticket command is executed, it clears any tags, and puts take away tag.

So see my image - what you are saying is Ticket Entity Changed i.e. Blank → Tables or Customer ->+ Tables. All are Entity Changes not Ticket Tag Changes/Selected. Of course you can do it that way but if you use Entity Change Event it 1 Rule with 1 Action.

Ticket Entity Changed Event → Use Action to then Update Tag to DineIN

So Customer still on Ticket? Therefore no Entity Change or will you remove Table?

If there is no change in a Entity assigned to Ticket then yes you will use your tag setup.
If you remove the Table (Entity) then the same Rule can be used to call Action Update Tag to Takeaway.

Thinking it would be easy to remove Table then the flow is simple - but required user to use Select Entity Table and Remove. You can also use an Automation button to remove Entity Table just like you remove Tags - call Update Ticket Entity with a Blank Entity for Tables.

[EDIT:]
Hey @Shivan 11.44pm need to get some sleep, gluck. :sleeping:

Haha sorry Paul. Thanks for the help. That Ticket Entity Changed did the trick. When a table is selected it puts Dine in Tag straight away. When I close ticket or cancel order, and click Take away, there is no ticket tag. Ok great, we are getting somewhere.

I think I was really confusing myself or making things more complicated than it really seemed.

I think I’ll just make the flow simple, If customer chose dine in then decided they wanted take away, then user just cancels order and re inserts it under take away. Likewise if customer chose take away, then decided they want to dine in, just cancel order and choose a table.

Anything more than that would just complicate things in my opinion.

You should really use [:variables] for your Action Parameters…

Then in your Rules, you can specify the Tag Name an Tag Value.


FYI, this screenshot you showed having blank Tag Name will do nothing, or might cause the crash you were experiencing. Leaving the Tag Name blank is not going to work to remove all Ticket Tags. SambaPOS won’t know what to do with this action…

In the rule, if we leave Tag Name and Tag Value empty, would it clear the tags? Or do I have to put a value?

No, that is what I m saying. Leaving the Tag Name empty does not clear all Ticket Tags. The action is useless in that case (the one shown above above). You need to tell the Action which Ticket Tag you are trying to update.

Thanks QMcKay… I managed to get the ticket tags working. Except now when a table is selected, the Order No ticket tag still shows with Dine In tag. Order No tag shows when take away is pressed and Dine In tag is auto removed, but when table is selected, Order No is still showing even though in my rule it set to clear it.

Here is my Dine In Rule


Here is my Take away rule

However, If only one Clear All Tags is put instead of 2, it only clears one of them, not both. If I put to clear the tag for Order No only, TAKEAWAY still remains, if I do TAKEAWAY only Order No still remains. If I put both in the rule like the screenshot, TAKEAWAY is cleared, but Order No still remains when table is selected.