Setup Ticket Tag when Entity Customer is chosen


I am running out of time, so I apologise if that question has already been asked.

I have:

Titcket Tag:CPT
Customer Entity with Custom field CodeId

When the waiter SELECT or DESELECT an ENTITY (Customer) to a ticket, I would like to setup the Ticket Tag CPT like this:

If no entity (DESELECT) CPT = 0, ElseCPT = Customer.CodeId

I am lost with the syntax.
Also I tried the actions:
Entity updated
Entity Selected
but not working.


The event would be Ticket Entity Changed event.

1 Like

Thank you ! works better :slight_smile:

I want to put ticket tag 0 or 1 depending on the value of ENTITY DATA:Sunat:CodeId

I try this with no luck:

[='{ENTITY DATA:SUNAT:IdCode}'=='6'?:'1':'0']


Ok correct syntax is

[=('{ENTITY DATA:SUNAT:IdCode}' == '6' ? '1' : '0')]