Loyalty System: Discount Per Visit


#1

Hey guys,
So I am trying to build a slightly different type of point system then the current ones available and made.

The scenario is…

Customer is encouraged to come to a restaurant X amount of times. After X amount of times, they are eligible for a specific discount % .

If a customer visits 10 times, they become eligible to a 20% ticket total discount.
They can come more than 10 times and not use their discount to accumulate more points.

However each time they apply a 20% discount, it minuses 10 points from their total.

They must have at least 10 points to be eligible.

Points are allocated 1 per visit.

So each time a customer comes in, their name is checked in via “Select Customer”, a rule will be made to check points and allocate accordingly.
Similar to how it will show the points at the top in JTR’s Loyalty setup, I am intending to create it this way also.

So far I have created the actions I believe I will need.

LP_Counter%20Reset LP_Increase%20Counter

LP_Update%20Entity%20Visits%20Action

They may be even wrong, but I got the idea of program update based on the ticket counter used for takeaway services.

I suppose I’m just trying to find out how I can put them In a rule which will

  1. Add 1 point for each time the customer checks out(Counts as 1 visit)

  2. Use the points to show a discount button only available when customer has 10 points or more.

I think I will need a rule before ticket closes, to check to ensure a customer is selected, and if it is, update their “Visits” entity field by adding 1 before ticket is closed.

I will update this as I go, but any feedback or assistance is much appreciated.


#2

I’m not sure if you want to use program settings or entity fields. Personally I would use entity fields and forget program settings.

You’ll obviously need to transfer one of the values to ticket state for the button mapping.

If there a time basis for the visits or just an overall count?

I’m looking to change the hotels loyalty setup to require at least one visit every 30 days to keep the discount active, a laps on the 30 limit will not reactivate untill their next visit within another 30 days. Plan to log date of last visit and base it arround this.


#3

I thought I needed both so I can increment the number into the entity field.
If program settings is not required Im happy to use entity fields as its much easier that way.

In this case I think an overall count is fine.
the 30 days to keep the discount active is a very good idea, even to use Logging date of last visit is something of interest to me and can be useful too for operator and customer.

Ok I will remove program settings.

would something like this work in update entity field before ticket closing?

I think the last part may not work because I’m not putting a math function.
What was the math function I can use to increment?


#4

Ok so looks like the Field Value didn’t work.
Instead it showed.


Hmm need to look at the rule again.

I’ve setup the entity field to only have a number.


I wonder if this is conflicting with it.


#5

Found the problem. It was in the rule. I missed the closing bracket [x].

Still didn’t add 1 though.
hmm


#6

Get some show message actions in there to check it’s getting the value expected.


#7

Found the problem.
Entity name field in 2 places were wrong.


Fixed it using the settings in the screenshots and now it is adding…
Except it only appears to add when you click the “Close” button, but doesn’t add if you settle the ticket?
Hmmm
It makes sense since the rule is getting fired before ticket is closing. I wonder if I should change it to a different event, like apply it after ticket is closed.
EDIT: Yeah it wont update after ticket is closed.
I need to change the event name or add a constraint.
Any ideas?


#8

Before ticket close should be triggered from settle, well after settle since ticket is closed after payment…


#9

Interesting enough it doesn’t add it if I settle the ticket. However If I select a customer, cancel the order and press “Close” Open a new ticket and select customer, it adds 1 extra point. hmmm


#10

Pretty sure total amount =0 isn’t right, it should be greater than surely.


#11

Hmm I changed it to match similar to how you add your points before ticket is closed.

You had Remaining total Equal 0.
So I just changed it to that.
I go to add customer, don’t put an order, and press close.
Check and it added 1 point…
Still not adding it if I settle ticket though.
That’s strange


#12

I have a rule which says, Print customer receipt? in a payment processed rule. Would this affect the other rules from firing? I don’t think it should


#13

I can only guess maybe its rule ordering.
My system had points to value so would have been slightly different in constraints as a 0 value ticket wouldnt have given points anyway.
You want it to only work for tickets with values so expect you would want total greater than 0 and remaining amount = 0 ie a paid ticket with value…

That print shouldn’t effect.

Breakdown the overall flow your aiming for?


#14

Fixed it!

I changed the even to a payment processed event.
And as soon as I did that with the rule below.
It added 1 point to the customer’s entity! after the payment was processed.


I think this way is better, because it would mean the point will only apply once they have entered the restaurant, ordered something and paid for it. Once it’s paid, they earn a point.


#15

Ok so next part is to help the user know that customer is on their 10th visit and they are applicable for a discount.

I initially thought, why not bring a popup on the screen letting the user know that they are eligible for a 20% discount as soon as an entity is selected.
Though I think that won’t work as we don’t want that applying before they even order anything.

So wondering if maybe I should create the rule to fire the even of an ask question before or after the settle button is pressed.
Or maybe have it show similar to your loyalty program where it shows LoyaltDiscount: Available and a discount button becomes visible to use to apply the discount.

What are your thoughts?


#16

Ok, so I decided that maybe when the “Settle” button is pressed, it gives an ask question advising that the customer is eligible for a discount.


This works, however it doesn’t apply it straight away.
This is because it is already going on the settle screen while the question is been asked, so when you click on “Apply” it looks like it hasn’t done anything.

Go back to settle screen and its not showing there…
However, press close, and press settle again and it’s showing!

However when you press the settle button, it asks you the question again, but if you look in the background or press Don’t Apply, on the settle screen you can see it applied the discount.

Hmm maybe I have to apply the ask question rule before settle is fired.


#17

Fixed!

I had to remove the mapping of the original Settle button to stop it from firing.
Then I added “Display Payment Screen” Action In the new rule.

This worked perfectly.
Here are the other rules which made this work.


#18

Next… Minus 10 points from customer entity once payment is processed and discount is applied.

The constraint here would be, if customer has 10 points or over, and a discount is not already applied…
Apply the 20% if “Apply” is pressed, once payment is processed, minus 10 points from customer entity field “Visits”

Is there constraint we can use to check If a discount has or has not been applied?


#19

So can you settle with less than 10 points :stuck_out_tongue:
Id add an action constraint to only ask about discount is the discount amount =0 so it only asks once.


#20

haha good question. Lemme check… Oh crap… No I cant! haha.
Ok so I have to apply a constraint to this.

So what would you type for the discount amount? I’m not sure of the constraint to use for discount?