Customer will not load

ive got it set up so that when a customer card is swiped and barcode scanned they are added to the ticket. I have two rules set up one for customers to receive 10% discount and another just to add them to the ticket.

If i just wat to add customer to the ticket i swipe the card/scan barcode and customer is added and everything is good. However if i swipe\scan a card to 10% discount everything works, discount is added, ticket type updates BUT the customer doesnt get added to the ticket and therefore the details do not print on the receipt.

My rule for non discount customer is set for numbers between 1000000000 and 9999999999 (10 digit numbers) swiped\scanned these customer are added and this works as below

1234567890 is scanned/swiped

and customer is added to ticket at the top “Customers: Test Customer Non Discount”

this works fine and i know my change ticket entity works fine as it has added the customer here

My rule for discount customers numbers are set between 100000000 and 999999999 (9 digit numbers)
Now the issue, an item has to be added to the ticket then swipe/scan a discount related number to automatically deduct 10%, my discount number here is 123456789

You can now see the discount has been applied, the ticket state has updated to DISCOUNT: Customer Discount BUT the customer has NOT been loaded onto the ticket

I cant work out why the customer will not load, like i said before rules use the same change entity action so i know that action works, however even when i delete all other actions in the rule to test if the customer loads it does not, for some reason the action to load the customer does not work in this rule, but it does in another.

I have a similar setup for staff discount, the swipe their card at the end of a transaction and it will deduct 10% automatically, I have another staff discount setup for a different % using the same actions and this works perfect. in this case 10% staff discount numbers are 6 digits long and my other staff discount % are 7 digits long

so i dont know why the same “Load Customer” action wont work in my two different rules any ideas?

Here the rule for non customer discount

the rule for customer discount

my load customer action

and my customers entity screens, you will see customer numbers of 123456789 and 1234567890

Any thoughts would be appreciated ive been at the for hours now and cant figure it out. ive even deleted the rule and started again and tested all the “bits” and its definitely the load customer action that does not word on the discount rule

Ok can you share with us the other actions. It looks like your not really discounting it your using it as a payment? What is the AT_Ticket Type Name?\

I am thinking its because your trying to change Entity and Pay Ticket in same rule. They do not operate sequentially anymore. I dont think it can change entity and Pay Ticket at same time. You should probably make it trigger via 2 rules. First rule changes entity and triggers autoexec command to fire 2nd rule that takes payment.

Or configure it as a real discount and not pay ticket.

Yea it is set as payment and the ticket type name action just changes the ticket type so from sale to sale-customer discount

Change entity and pay ticket both work in my staff discount setuo which is the same as this, that changes entity and has pay ticket actions in it and it works perfect

Ill try and configure it as a real discount

Thanks

Even if i remove all the other actions so the rule onky has load customer it still does not change the entity and add custoner to ticket so i know its not due to having pay ticket action there as well (and because that setup works for my staff discount rule)

So if thats the case then its a constraint issue. Instead of {TICKET TOTAL} try {REMAINING TOTAL}

Cheers ill try that tonight, im pretty sure i use {TICKET TOTAL} in my staff discount rule and that works perfect and i cloned that rule when making the customer one and changed the actions

Ill give it a try and let you know if its worked :slight_smile:

It didnt work

this is my 10% off staff discount rule and this works perfect

The result when this rule is used, staff name cashier 1 added to ticket and discount (payment) applied

I cloned the staff discount rule as i know it works and just changed the relevant actions for the customer discount

when this rule activates i get this, state changes, discount applied but customer not added. If i remove all actions other than load customer it still does not add customer to ticket

Ive checked my entity naming but cant see an issue there, thats the only other thing i thort it could be?

It could be the number range your using is too large… But unlikely… if that one works fine then your missing something.

You said you cloned it… did you change the action to use Customers instead of Employees and did you remove then readd the action to your rule?

What is the purpose of the constraint for Numbers? If the numbers on the cards are unique then why have the constraint?

yea created a new rule for load customer, removed load staff saved closed it all. reopened the rule and added the customer one. I know that action load customer works because my rule for using a barcode or swiping a card that is a non discount customer works, and its using the same action

remove the constraint and try it. Just keep the ticket total constraint.

did that and same issue, everything else worked, state changed etc but customer still not added

Ok so your customers must be configured wrong. and your action might be wrong.

But more than likely its the customer entities.

non discount customers with 10 digit customer number, this is working

discount customers with 9 digit customer number, not working

these are set up the same as staff with different discounts and they work fine, can you spot anything obvious?

Instead of using the numbers as a way to distinguish why not just make a new field called Discount and you can put Y or N for each person you want to get or not get discount… add constraint to the rule to look for that instead of constraining numbers.

1 Like

Ok ill have a look at that that might make it simpler actually, ill let you know how i get on :slight_smile:

Still doesnt work, if i use a new field called discount and have either Y or N, the non discount rule still works as it did before, but the discount rule still does not

Ive even renamed my customers entity from customers to cust, deleted and remade all actions and rules and exactly the same thing happens non discount works but discount does not.

Im really stumped because my staff discount version works perfect and the customers version is based on the staff version

Its as if the built in customers entity does not allow more than one rule to be applied to it???

im going to create another entity called customers2 and see if that works

Did you set default mapping for rules? Your changing ticket type… the ticket your changing too does it have Customers Entity Type linked under

 Tickets > Ticket Type > Your Ticket > Entity Type List
1 Like

Ill double check, that might be the issue!

I created a new entity and i cant even get that to load on ticket now just with a simple action an rule using numberpad value entered linked to customer number

Im going to restore backup and check ticket type for linked entity, im thinkin that might be it as thats the only other thing i havent checked, ill let you know if it worked, thanks again

that wasnt the issue either, i didnt have any entities mapped to my ticket types and staff discount rules work fine. im thinking i might start again, get rid of the number constraints and try the additional field with YN answer. the issue is definitely to do with the action to add entity to ticket (change ticket entity) as when that action is all that is in the rule is doesnt work/linked with an error linking to the entity i just cant see it so im going to try from scratch again :slight_smile:

it seems when using the “Numberpad Value Entered” action you cannot use {ENTITY DATA:X} in the custom constraints???

Ive setup a separate field in my staff and customer entities for discount 10 and I enter either Y or N. Now i have set all my staff with employee numbers of 7 digits long so when entered in the keypad the rule will kick in. If I setup my rule as below then everything works (but i havent used the discount 10 Y or N constraint so every staff member when swiped or scanned has 10% discount applied as below)


So to limit the staff discount to specific employees ive setup the following Discount 10 and Discount 100 fields on my staff entities (100 gives me 100% discount so is not used for normal staff)

if i add these additional Y and N constraints to my rule as shown above this stops the rule from working and the staff entity is not loaded to ticket, the state doensnt change and no discount is applied. This has been the only change since the first screenshot above where the rule worked for any staff member. when adding the Entity Data constraints the rules does not work so either im not typing the correct format for the constraint or {ENTITY DATA:X} cannot be used here?? im hoping someone will tell me im typing it wrong?? @Jesse