Loyalty Point Issues - help needed

Continuing the discussion from Tracking Promotions by Points:

[quote=“emre, post:1, topic:860, full:true”]
Hello. In this tutorial I’ll show you how to create points based promotions.

  • Upgrade to at least 4.1.27 version before starting this tutorial.
  • If you have [Database Tools Module][1] you can simply use this import file for easily importing this configuration to your database. Points_Promotion.zip (1.6 KB) Please test it first on a safe environment before merging it to your production database.
  • For the simplicity of this tutorial I’ve skipped Rule Mapping steps. After creating each rule, create a default mapping by adding a mapping line and leaving it unchanged.

So I have been testing this and have a few failures? Going to need some help from the Expert(s).
Before I upload every screen and may just do that at the end of this post I will sure you what is happening.

Points are being accrued nicely if:
Sell an item with rewards attached and go DIRECTLY to management -> batch editor and check. All good points stay nicely. This works as it should :confused:

Points disappear if:
Sell an item with rewards attached and the RESELECT the Customer to Check Points from the Ticker header?

Here are the screens.
Have just sold an item and gone to Select the Customer using a Button Caption -

After I click this button and return to the Ticket Screen I do not get the Points (2) from the last sale -

I have studied the debug output and see no areas where Points should be changed back?

##Beside all this above:

Why @emre do we need to use the TN Function below (my Products have Rewards as a Tag):
[=TN('{ITEM TAG:Reward}')*{QUANTITY}]

But do not need it here:

When both TAG:Rewards and TAG:Points are Product Tags?

Going to Reply to my post to add the screens:

##Product Tags:



Update Promotpn State

Decrease Points - not used yet!

Increase Points

Update Order to Promotion

Update Customer Points when paid

Use Points - not used yet!

Warn if not enough points - not used yet!


Slowly going insane…
Just need another set of eyes as mine are very red and sore :weary:

I’ve implemented tutorial manually on a fresh database and it seems working fine for me.

The reason of that issue can be anything but I’m sure that have no relationship with batch entity editor.

Umm the only difference is the tag used for Reward? But since it works if I do not bring Customer immediately up sounds an alarm bell? I hate doing it but can look take a peek at my database as it the only other interference can be VIP and Happy hour stuff?

In fact if you let me know what tool you are using to record video I will do the same and you will see the difference. I just cannot see what is wrong, even using the rule debugger?

You cannot see it because you probably implemented it without understanding what each rule or action you’ve added exactly does. Do you understand how points order state works in this setup? Without understanding that how many times I fix your database you’ll fall into same situation. Please keep in mind you’re trying to implement multiple advanced customizations and make them work together. It is really really hard without knowing exactly how automation works.

Using “Show Message” action is a great way to understand how values passes between rules and at what order they works. Ask us all single point you don’t understand.

This is what I’m using to prepare animated gifs. https://screentogif.codeplex.com/. I also use https://compressor.io/ to decrease size of generated gif file.

1 Like

Ok @emre, its Saturday and we both are working, infact it late Saturday night for me!

Here is my video:

I think I do understand the rules - well you will probably prove me wrong. I am doing this because:

I have shown you the rule debugger because I have followed each step. So I need help to see if I have made a typo or I have found an issue. I have also uploaded each rule & action in the next post.

The only thing I can be guilty of is not understanding how Qmackay VIP & HH system interferes with this? I will confess Q’s system which is tested intensely, manually entered by me, works great?
umm sorry about the end to the video will need to work that out :expressionless:

OK PM me the backup.

@emre you have it.
Try a customer with no points as yet. You may just need to settle off one of the accounts first as I have been testing Order States. Once cleared just use these steps:

  1. Select Customer
  2. Sell “Toasted Bagel Jam” - worth 1 reward point
  3. Select Customer again - see they have 1 point extra assigned.
  4. Click on Customer, point disappears in the Ticker Header (but has gone from Entity as well if checked in Batch editor).

You can repeat these steps:

  1. Select Customer
  2. Sell “Toasted Bagel Jam” - worth 1 reward point
  3. Use Management or go to “Menu & Management”
  4. Check in Batch Editor and point has been saved.

TIP: All Rules & Actions are Names “LP” for easy access.
The only existing rule modified was “Ticket Payment Check” - appended "Update Orders Promotion State.

Thanks - I will be happy to understand.

I will add some “elevator music” in the mean time…:violin:
Looking at the rule debugger after I settle ticket and then immediately “Select Customer” and CHOOSE THE SAME customer I see the actions - ZAVPUpdate Ticket State fires twice, I think this was desired from Q’s tutorial?

But the thing is the Custom Data retrieved by the Rule shows the old point value?! Does not show the increased value.

Ok not fair now :tired_face: I repeat the process BUT after settlement go to Batch Editor (I guess just get out of POS), move back into POS, bring the same customer up and Custom Data retrieved by the Rule shows the new point value?

Yep over to somebody you knows.

OH, oh I should mention if you bring the the funky ticket up using ticket explorer - the ticket that did not assign the point - the ticket header actually shows the Customer with the point gained? But if you exit and use POS to bring that customer up, no point was gained. Go figure that one…

My S.W.A.G.* is that it is probably caching the Entity Data, so after the Data update, you need to reload the Entity and/or refresh the Ticket display with Display Ticket action using TicketId=0.

* Scientific Wild Ass Guess

Yep, that is what I was thinking as have read about this "caching thingamajig". I did not like the sound of that and was hopefully trying to avoid it. Where can I read more on when to issue a “reload Entity”? In fact how do you reload a Entity? :sweat_smile:
PS - lots here would back your SWAG in the betting toke!

There are Actions for Change Ticket Entity and Load Entity.

Choose whichever works best for you. Even if you are not actually changing the Ticket Entity, it may work as a “reload” action… you’ll just need to test it.

Ah funny I have this big eye staring back at me from a 27" monitor! Do yo think you will loose your Panache if you change from the Eyeball? Anyway I digress -

Last question - what do you suggest I change Entity to? Blank, Same, First? Also is it best to do it at the end of this process as I am looking at the rule debugger and there is a few VIP States that are triggered on Entity Changed as well (i.e. Select a Customer).
I will also Search to see what others have done as well thanks Q.

However, maybe you just need to refresh the Ticket display with Display Ticket action using TicketId=0. Have you tried that?

Same. Basically you want to verify the data has been written. I usually use a (temporary) Show Message Action to test this immediately after updating Entity Data.

LOL, I have just recently been considering changing my avatar, but have not done so yet. Is this one better?

OK I hate choosing customers from entity screen buttons… lol. Yes this is a caching issue. As I allowed customer selection I have to remove caching from entity button selection screen.

Man, that is complex Q! The pic that is :laughing:

Well, I gotta say @emre that is what I thought from the outset and should of not spent the hours looking through “haystacks”. As yes I am still coming to grips with Samba so made an error of judgement :disappointed: Unfortunately years of coding big convoluted systems and still doing so I can tell whats my screw up.

So now we are at the end of this maybe, can you suggest how to modify the Rules or Actions to solve this? As I have not used what Q suggested before it would be helpful if I was shown once please.

I would suggest this also would occur from the Standard Search Screen as well. I sort of recall the only way to solve it was to exit POS and go to management FYI.

OK I’ll remove caches. Button screens was primarily designed for table selection but I shouldn’t predict how entity screens will be used anymore. In fact I shouldn’t allow that use but I did. That is my fault. Hmm… Maybe I can find a different idea.

1 Like

@emre would be happier if you just tell me how to fix the Points updating issue? - So shall I use Display Ticket ID = 0 as Q suggested? At which point shall I insert this (this is another pun!) - Ticket Closing? Update Ticket Status? I rather not use a default rule as it may get called too often.

I can confirm the “Use Points” Automation also suffers the same faith as all of the above :pensive:
Just surprised this has not surfaced before…
Anyway 12.06am had enough for today :sleeping: