Change menu on specific entity

So i have a issue with the change screen menu action that seems to work fine until I add a second ticket to the table.

Here is the scenario I have a entity that’s called patron there all my and people like family orders will be put on this entity but now the issue I have is that it works fine on the first order but when there is a new ticket added to this table it doesn’t work anymore. Anyone have an idea how to fix this. Btw I use this menu change cause the patron menu has all items priced at 1 if there is no option to fix the change menu action then im also happy with a alternative way to get every order at a price of 1 on this entity

Here are my actions and rules used:

This action i made as a second way to get the wanted result as the patron price tag also is set to 1 on every product but this also doesn’t fix the prob when adding new ticket to the table

This action is to change the menu i use to that of the patron with everything priced at 1

This action i use to revert back to normal department and price tag once ticket closes

This is the rule for when the patron entity is selected and needs to change menu.

Here is use a rule to revert back to normal menu and department on the close ticket automation

This is a backup rule to revert back to normal menu and department.

Hopefully one of you guys can find my error :sweat_smile:and help me out thank you.

You don’t have to change back on ticket close if you set default menu.

Yeah it indeed doesn’t need it just tested it, but even without that i still have the issue that when i add a extra ticket on the table it doesn’t work. Once table exist the menu change also doesn’t work but, then the price list change does so that issue I have fixed for now.

When you say add ticket you mean with add ticket button or creating another ticket in normal play and selecting entity?

Its the add ticket button for when you already have a ticket on the entity open and want to have a second ticket on it like a separated bill or second group on the same entity, when i press that add ticket automation button everything reverts back to normal, menu and price tag.
Once a second ticket is Made the change menu action and rule for some reason don’t seem to work anymore unlike the change price tag that one seems to start working after there exists 2tickets with a order already on it(if its the first newly created ticket it doesn’t work same as first order of the second created ticket).

So at this point i just have a issue for the first order of a newly created ticket on the same entity.

It works fine when I add ticket. Must be some custom automation you did that is interfering.

It might be that the Entity Selected Rule is not being triggered for the new Ticket on the same Entity. You should put a Show Message action in that Rule to test that.

You might need to use either Ticket Entity Changed event, or maybe (probably) Ticket Created event would be better.

3 Likes

Thanks once I’m back at the restaurant i will try it and will also restart from scratch cause maybe it’s like @Jesse said that somewhere one of my rules is interfering.

so i found the prob and partially fixed it.

Problem was indeed caused due when you add a second ticket to a entity it doesn’t trigger the select entity rule but just creates a new ticket on it and uses Update entity rule instead.
25
05

So the partial solution is very easy just add a second rule that triggers the change menu action whit the Entity Updated rule on the required entity.


here is my partial fix.

So there is 1 action required this is the one to change your menu with the adjusted prices.


next up are the 2 rules i used

1for when you select the entity from the entity screen.


and a second one for once you add a second ticket to the entity.

1 Like

so i changed my previous post a bit as it isn’t a full solution cause after a evening of work it seems there is still is a issue:

so when there are already 2 tickets or more on the entity it doesn’t trigger any of the entity rules when selecting either of these.

if your entity is like this it doesn’t work anymore once you select either of the tickets

here is a ss of the rule debugger hope this will help someone to find a solution

there are no active events when selecting a ticket


there are inactive events tough but i can’t seem to find a working method to use either of those

You can hook on ticket opening event I’m sure.

Your issue is that selecting a ticket on that list is not selecting or updating ticket entity. It is just opening the ticket,.
If you had explained more thouroughly this would have already been commented on.

You can probably add a ticket key opened rule with an {ENTITY NAME:WhateverEntityTypeNamePatronIs} in the constraint

Sorry i tought i had explained the issue clearly enough😓.

Do i need to add the constraint in action part of the rule or in the custom constraint list cause i tried to add a custom constraint Entity Name>equals>patron in custom constraint list But this for some reason shuts down whole sambapos when selecting the ticket.

In the custom constraint but don’t use equals, think that’s more useful for numbers

Try MATCHES instead

K will try it in couple of hours when I’m at work. thanks

So i tried it but no luck and half of the time it shuts down sambapos (i tested rules to see if there is a conflict but it says rules work fine)
here is my rule and the debug log


43

The Entity Updated Event/Rule is not really Ticket-based. I would remove that Rule (just delete the mapping to disable it is enough), if you haven’t done so already. That Event is more for when you have updated Entity Data.

I think you are on the right track with the Ticket Opened Event.

What I don’t understand is why the “patron” menu is used when it matches either the “patron” or the “offert” Entity. Maybe that’s how you want it, but it doesn’t make sense to me. I would have though you would want the “offert” menu when using the “offert” Entity, but whatever, which means you would remove the “offert” constraint, clone the Rule, change the constraint to “offert” and change the action to load the “offert” menu.

Im pretty sure EntityName is not a valid value on ticket opened rule.
Thats why I sugested using the { curly print tag type expression } to call the enitty name.

i used the Entity Updated rule for when you press the add ticket button on a already existing ticket this was the only way to get the menu changed if there is already a ticket open on the entity

the offert table and patron table are basically the same the offert table is for items we gift to clients who frequent the restaurant on regular bases and the patron table is that of me, family and staff but we don’t want to gift the product instantly(this way i can still track what was gifted to who and how much was gifted) ,i also don’t want that the waiters to use those tickets to let clients pay and take the money

so i should add this {EntiyName} in the custom constraint list or should i add it in the action of the rule?

No… Where did I put EntityName?

Replacing ‘WhateverEntityTypeNamePatronIs’ with the entity type name parton falls into.
This goes on the left where youve put EntityName.