Loyalty System: Discount Per Visit


#41

Your entity name is fixed.
Thats your problem with the update!
The action needs the name as in the customers name to know which to update, the action to update doesnt automatically set to the entity for the curent ticket.
You need to [:carry the field] and use something like {ENTITY NAME:Customer} in the rule for the entity name.


#42

You mean like this?


Didnt work at beginning, but found a mistake in the field name. Fixed that.
Now its working again!

I wonder how it worked before then. The name customer was fixed but i thought it would grab the correct entity as it worked before.

Weird. Its working now so thats good. Lesrnt something new here. Thanks.


#43

Maybe if you don’t specify an entity name it autoselect current.
Wernt you using different t flow with program settings before?


#44

Nah. I scrapped program setting in favor of entity.
Hmm maybe thats true.
Gonna work on now trying to setup, if discount is applied, minus 10 points. If discount applied then removed, return points to original value


#45

If they have multiple tickets in a visit would they get it or only once per ticket?


#46

So you will want to add those steps to your ask question automation command rule.
Allong with a ticket state in order to map buttons to.
Something like Discount=
So you can have Apply discount for discount= (null)
Set discount= applied on your apply rule.
Remove discount rule to remove calculation, add points back and set discount state back to ‘’ (null/blank)


#47

I think in this case each time they spend would apply a new point is fine.
As long as its set on a new ticket.
So the current flow I think is ok. Though your suggestions are much appreciated.

I will be working on this again today when I get back in the office.

Is this the same Ask Question ticket that checks Discount Eligibiity?

So we create a ticket state to apply to auto command button, and setup a rule for it similar to how you did yours in the loyalty points you created yeh?
I’m just not sure what constraint I would add to add the points back if discount is removed.


#48

Constraints on the remove discount button shouldn’t be a huge issue as you will be setting the button live using the ticket state you set when you apply discount so will only be available once discount is applied


#49

Ok So finally back at this.
Here is my automation Command


And the rule that I created.

I followed the tutorial for your loyalty with the idea, however I think that my constraints may be wrong here.
Is my discount constraint correct?

EDIT: I dont think the ENTITY NAME:Customer IS NOT NULL Constraint is correct or the even name either.
The difference I found between yours and this one is that the entity data changes.
Where as this one the data doesn’t change, only the total amount changes.
So i thought giving Ticket Total changed event, and applying [=TN(’{CALCULATION TOTAL:LoyaltyV1_Discount}’)] Greater than 0 constraint. However that didn’t work too.
I checked the state names and they appear correct. Hmm


#50

Ok I’ve managed to fix it.
Turns out i don’t need a new rule at all.
Instead I updated the state as soon as the discount is applied on my apply discount rule
image
And I amended my remove discount rule to change state to not show the button after discount has been removed.

So far here is what it all looks like.

Ok so far we have done the follow

  1. Created a Visits Entity section under Customers entity.
  2. Created a rule to add 1 point for each time a ticket is settled with their name selected.
  3. Created a rule which fires if customer has more than 10 visits to apply discount.
  4. Created a rule to show cancel discount only when a discount has been applied.

Things to do now

  1. Create a constraint or rule that removes 10 points whenever loyalty discount is applied.
  2. Create a constraint or rule which puts 10 points back if discount is cancelled while ticket is still unpaid.

I Suppose I may have to amend the Cancel Discount Rule where I have to add an action to add 10 points of Cancel discount is pressed.

I may also need to amend the apply discount rule to minus 10 points if discount is applied.


#51

Ok I think I made it work!

Here is what I did
In my Apply Discount button. I added a new update entity data action to -10 points if loyalty discount is applied.
image
Then if Cancel is pressed, I need to re-add those 10 points.
So I added another Entity Data update action to my cancel discount rule
image

Here is the result

What do you think of this method?

Any suggestions? Anything you think I should improve or change or add to make it better?


#52

Id call it visit points, visits back to 0 looks wrong lol


#53

Haha fair enough. Thats a good point. Easy to change.

Im thinking of adding entity card scan next which should be pretty easy.

We could take it further and make it ranges of points and add discount levels.

Eg accumulate 50 points, recieve 30% discount… cap at 100 points, recieve 1 free meal and 10% discount. Something li’llke that


#54

I use rfids for our loyalty discount.
My I have a staff discount level too and have a fireld for staff username which it the checks to prevent a member of staff using their own for while they are logged in. Doesn’t stop them swapping fobs but one better than nothing.