Custom Simple Loyalty Card Features

Here is how you would setup the Payment Processed so it does not allow double points.

Setup the same rule as you had before on Payment Processed but add this Custom Constraint:

{STATE:Loyalty} Not Equals True

Then add an Update Ticket State action that uses State Name: Loyalty
State: True

It might look like this.

Remember you would have your Create Account Transaction action in it as well.

So this rule would check if Ticket State Loyalty is anything but true and then execute if it is. If Loyalty is True it wont execute… if executed it sets state to True.

@alex1 its best to use payment processed so its based off amount spent. If you do it on order updated… then if order is cancelled and another order added it wont cancel your points…leading to abuse.

Instead of Ticket Total we could use ProcessedAmount and add points based off amount processed. If you do this then you might not need the constraint. Syntax would be like:

[=TN('[:ProcessedAmount]') * 5/100]

This tells it to do 5% for amount processed instead of ticket total. Meaning it wouldnt matter if you did two payment types and you could ignore the constraint i just told you about.

@alex1 this shows you two possible routes you can take with Payment Processed event. Using the last one is preferred as its the simplest all you would do is change the expression.

Thanks Kendesh, that’s great too!


I’m just playing around with the tender code and started by making a very simple new payment button but the issue I’m having is that I click the button, but it only updates the order if I press the cross symbol, does this happen with yours?


Hi QMcKay, one more thing, have you noticed that the system isn’t updating in real time using the custom payment buttons?

i.e. If they use the whole gift card to pay a portion of the balance and click tender gift cert again, it allows the balance to go below zero (even if it is set to credit), because it appears only when the entire order is paid for that the gift/samba card balance is updated properly.

The difference is in the GC Rules for Payment Processed. You should look at those in the Tutorial.

Basically, the Rules check the Balance of the GC, and if it hits zero, the GC Entity is replaced with a “dummy” GC that has no balance, and is named in such a way that it does not pass the constraints in order to be used as payment.

Notice my 2nd screenshot where the GC has been replaced with the dummy Entity called ZZGC2000. Because the name does not start with GC20, the constraint in the GC Tender Rules will not allow processing of the Payment. Besides that, the constraints are also checking the Account Balance of the Entity to ensure it is greater than 0.


Thanks, so that works however in this case, as we need to add a percentage of the transaction to the card at the end, this won’t work as the card has been changed to zero.

So I was thinking, could I instead just disable the button itself, I tried to but didn’t have much luck, could you please shed some light on that?

Sorry again for bugging you!



I worked out the issue above! Essentially, only allow the GC tender to be pressed at the beginning of the transaction, add actions to add points on the tendering rules, and add a ticket closing check that adds points if the card is not the void card!

I would love to hear if you have an alternative method though, I’m sure there is a more elegant method?

Also, any idea about why I have to click the (X) button after tender GC to get it to process?



You are using TENDERED TOTAL in your amount to tender…

Hi Kendesh,

Thanks, this is my current setup:

I know you said to remove tendered, but I tried to remove tendered and it still didn’t work. Do I need to remove tendered from the conditions too?

Instead use {:TENDEREDAMOUNT} so it would simply be {:TENDERED AMOUNT} for the entire expression.

You map it to Payment Screen. {:TENDEREDAMOUNT} reads the amount entered from payment screen

To summarize what I mean:

Change anywhere you have [=TN('{TICKET TOTAL}')-TN('{TENDERED TOTAL}')] to {:TENDEREDAMOUNT}

Your last constraint would change to {:TENDEREDAMOUNT} Equals {TICKET TOTAL} no need to format it with TN.



Is available as well. You maybe could use that tag.

{:NUMBERPAD} Reads numberpad value.
{:PAYMENTDUEAMOUNT} Reads payment screen payment due amount.
{:TENDEREDAMOUNT} Reads payment screen tendered amount value.

I followed the exact steps but my “Create Account” & “Account Details” buttons are greyed out. Any advice?

Check the user role your using has create account permissions in user roles

Create entity first and save,then go back into it press edit the button should be activated, if it isnt then your user role doesnt have permission to create an account