Update Entity Action

Hi @emre

Not sure if this is a SambaPOS issue or just duplicated FOB’s (pre-programmed Key Tags). Emre is there anyway a Update Entity Action could update 2 Entities?

The Rule & Action:


Gif in Action:

Emre what is happening is the data is appearing on 2 separate Customer (Entity) records. When this occurs the keyboard entry search fails as it finds two Customers with the same FOB number.

This can only occur if:

  1. FOBS are duplicated;
  2. Update Entity is updating 2 records.

Currently on 400 assignments we have about 20 duplications.
Your thought please.

Well it wouldn’t be updating 2 entities because they cant have the same primary key aka {ENTITY NAME} and your rule is only feeding it a single Entity. So it looks like similar FOB’s are being used for Entities.

Can you recreate an instance where it updates 2 entities? It seems more believable that 2 duplicate FOBS were used.

That action is used in thousands of setups.

Yes, Kendash - I am a bit stuck on this one. I guess I just need you guys to cast your eyes over it and reaffirm it not something I have done or SambaPOS.

Ultimately once all FOBs are assigned the problem will go away. The issue in the short term will be angry members either having money spent off their accounts OR having to change their FOBS again.

The other issue is it is almost IMPOSSIBLE to prove the duplicate FOB theory as you need to catch both FOBS in hand i.e. both members in front of you with 2 FOBS the same.

The thing is no pattern suggests its sambapos. It highly suggests a few duplicate fobs though.

Yes but we don’t know what it will do if we set it up incorrectly :slight_smile:

@pauln you used {ENTITY NAME} tag but didn’t defined an entity type so I’m not sure what it resolves to. It probably resolves to nothing so SambaPOS updates the entity that selected on ticket for given entity type. You have a complex entity setup so I’m not sure… I added few additional checks to ensure action updates correct entity. I’ll be glad if you test next refresh and let me know if it works fine or not.

PS: Unfortunately few people responds to my test requests. I assume that it works fine…

1 Like

I will always try to respond (speaking on my behalf) - but as we went LIVE Wednesday, I am fully testing V5.1.60. I am just about complete with all my reports and will move into latest V.5.1.61 betas as soon as possible. I know there are 2-3 items in there that I would like to check.

By the way @emre you would proud to see the excitement and motivation of the Bar Crew using their shiny new POS system. I am taken back with their compliments - it is a tribute to SambaPOS and some hard yakka over the last several months.

Tonight I watched the crew hit a new high in Sales - they were running through the Bar and hitting SambPOS as hard as they could!

3 Likes

Great. So try clearing / removing {ENTITY NAME} and let action to update customer entity that selected on ticket.

1 Like

Umm I see what you are saying, you may have found my fault :slight_smile:

1 Like

That is true, but I still find it hard to believe it would update two Entities and if it was setup wrong and it in fact is updating two entities then I would expect a pattern other than 20 out of 400. But who knows.

It does 4 things.

  1. Updates Entity Custom Data
  2. We also store entity custom data in tickets so it also updates that.
  3. It updates custom data for entity that possibly cached in memory.
  4. It also updates custom data for entity if an entity id stored in rule chain. That is needed if you execute it on non ticket rules like Entity Selected.

While it doing it it may update multiple entities if you incorrectly set an entity name in action but the entity assigned to ticket is different. Well I don’t think it is happening if that action only executes as @pauln demonstrated but who knows? I added additional checks to ensure it updates selected entity. I hope that does not breaks someone’s setup as people may benefit from that issue :slight_smile: That’s why I requested a test…

So @pauln please add {ENTITY NAME:Customers} back to action after 5.1.61 update to ensure it only updates customer with that name.

2 Likes

Ok I appreciate the time you Emre, and @Jesse to review this. Unfortunately I think:

Could be the cause as there is a sequence used by some operators when assigning FOBS. I think I watched about 300+ given out. The unfortunate thing is I will inconvenience quite a few customers as when a FOB was checked and double assigned we immediately deleted the other assignment.

Unfortunately a hard one to test unless you are punishing the system with 2 terminals updating Entity Data every 5 seconds…

Ok @emre removing the {ENTITY NAME} works or at least does not break my rule. When you suggest “Update” are you referring to the official update right or betas?