Rick's Tutorial 6 - Staff Discount (can also duplicate for customer entity too)

This tutorial will allow you to add staff discount to a ticket by swiping a staff card, scanning barcode or keying in the staff members employee number. It will:

  • automatically add the staff entity to the ticket when swiping/scanning or keying in the staff employee number
  • allow the staff details to print on the receipt
  • update the ticket type to “Staff Discount”
  • apply the relevant discount %
  • print a specifically created staff discount receipt (staff and store copies)
  • allow you to track staff discount in accounts

Step 1 - Create Staff Entities
Main Menu - Manage - Entities - Create a new entity called Staff as below

then click custom fields and ensure you add the following TWO fields “Employee Number” and Discount 10 (for 10% discount) or call them whatever you want just make sure they are typed exactly as they are here in the actions so they work

Step 2 - Automatically add staff entity to ticket when swipe\scan\key in employee number

Main Menu - Manage - Automation - Actions - Create a new change ticket entity action as detailed below

Step 3 - Create the rule
-Main Menu - Manage - Automation - Rules - add new rule Numberpad Value Entered Rule as set out below

when adding this change ticket entity action we just created, enter [:NumberpadValue] in the employee number field that appears.

EDIT - New rule added when being used with SWITCH USER function see the bottom of this post on how to apply discount when the staff entity is already loaded

This rule now takes the number that is swiped/scanned or keyed in on the pos screen and loads that staff entity if the number entered matches the employee number of that entity

The Flow

Using my test cashier “Cashier 1” i will now assign this staff member to the ticket by entering their employee number (which is 1111111 as you can see from the screenshots)

NEXT STEP - Create ticket type, accounts, calculation type and receipt templates

Step 1 - Create a new Ticket Type
Main Menu - Manage - Tickets - Ticket Types - Create the below ticket type

Step 2 - Create Account Type
Main Menu - Manage - Accounts - Account Types - Add Account Type - Create as below

Step 3 - Create Account
Main Menu - Manage - Accounts - Accounts - Add Account - Set up as below

Step 4 - Create Account Transaction Type
Main Menu - Manage - Accounts - Transaction Types - Add Account Transaction Type - Create as below

Step 5 - Create Calculation Type
Main Menu - Manage - Tickets - Calculation Types - Add Calculation Type - Setup as below

Step 6 - Create Printer Templates
I have 2 for staff discount, a store copy and a staff copy
Main Menu - Manage - Settings - Printer Templates - Add Printer Template - Create as below

Staff Discount - Store Copy

[LAYOUT]
-- General layout
<EC>
<XCT>29,40,76,6,0,48,69,48,48,1,1
<EL>
<F>
<EB>
<F>-
<C10>SALES RECEIPT
<C10>STAFF DISCOUNT - STORE COPY
<F>-
<F>
<F>
<DB>
<EB>
<C11> ORDER {TICKET ID}
<F>
<F>-
Qty Item Description                       Price
<F>-
<F>
<DB>
{ORDERS}
<F>-
<F>
<EB>
<C00>{TICKET QUANTITY SUM}x Items Sold
<DB>
<F>=
<EB>
{DISCOUNTS}
<F>
[<J10>Total Promotion:|{ORDER STATE TOTAL:Gift}]
<J10>Total:|£{TICKET TOTAL}
<F>
{PAYMENTS}
<F>
[<L00>Card Type: {TICKET TAG:Credit Card Type}]
[<L00>Card Number: XXXX XXXX XXXX {TICKET TAG:Credit Card Digits}]
[<L00>Auth Number: {TICKET TAG:Authorisation Number}]
<F>=
<F>
<F>
<F>
<F>
<F>
<F>
<F>
<F>
<F>_
<F>
<C00>Staff Signature
<F>
<F>
<F>
<F>
<EC>
<BAR>{TICKET ID}
<EL>
{ENTITIES}
<F>
<DB>
<F>-
<C00>Date:{TICKET DATE}   Time:{TIME}   Served By:{USER NAME}
<F>-

[DISCOUNTS]
<F>
<J00>{CALCULATION NAME} {CALCULATION AMOUNT}%|£{CALCULATION TOTAL}
<F>

[PAYMENTS]
<F>
<J00>{PAYMENT NAME}|£{PAYMENT AMOUNT}
<F>

[ORDERS]
-- Default format for orders
<J00>{QUANTITY}x  {NAME}|£{TOTAL AMOUNT}
{ORDER TAGS}
<J00> {TICKET TAG:Think21}

[ORDERS:Gift]
-- Format for gifted orders
<J00>- {QUANTITY} {NAME}|**FREE ITEM**
{ORDER TAGS}

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
<J00> * {ORDER TAG NAME} | £{ORDER TAG PRICE}

[ENTITIES:Staff]
-- Staff entity format
<F>-
<EB>
<C10>Staff Discount Details
<F>
<L00>Staff Name:
<DB>
{ENTITY NAME}
<F>
<EB>
<L00>Employee Number:
<DB>
{ENTITY DATA:Employee Number}

Staff Discount - Staff Copy

[LAYOUT]
-- General layout
<XCT>27,112,0,25,250
<EC>
<XCT>29,40,76,6,0,48,69,48,48,1,1
<EL>
<F>
<EB>
<F>-
<C10>SALES RECEIPT
<C10>STAFF DISCOUNT - STAFF COPY
<F>-
<F>
<F>
<DB>
<EB>
<C11> ORDER {TICKET ID}
<F>
<F>-
Qty Item Description                       Price
<F>-
<F>
<DB>
{ORDERS}
<F>-
<F>
<EB>
<C00>{TICKET QUANTITY SUM}x Items Sold
<DB>
<F>=
<EB>
{DISCOUNTS}
<F>
[<J10>Total Promotion:|{ORDER STATE TOTAL:Gift}]
<J10>Total:|£{TICKET TOTAL}
<F>
{PAYMENTS}
<F>
[<L00>Card Type: {TICKET TAG:Credit Card Type}]
[<L00>Card Number: XXXX XXXX XXXX {TICKET TAG:Credit Card Digits}]
[<L00>Auth Number: {TICKET TAG:Authorisation Number}]
<F>=
<F>
<C11>THANK YOU
<F>
<F>
<EC>
<BAR>{TICKET ID}
<EL>
{ENTITIES}
<F>
<DB>
<F>-
<C00>Date:{TICKET DATE}   Time:{TIME}   Served By:{USER NAME}
<F>-

[DISCOUNTS]
<F>
<J00>{CALCULATION NAME} {CALCULATION AMOUNT}%|£{CALCULATION TOTAL}
<F>

[PAYMENTS]
<F>
<J00>{PAYMENT NAME}|£{PAYMENT AMOUNT}
<F>

[ORDERS]
-- Default format for orders
<J00>{QUANTITY}x  {NAME}|£{TOTAL AMOUNT}
{ORDER TAGS}
<J00> {TICKET TAG:Think21}

[ORDERS:Gift]
-- Format for gifted orders
<J00>- {QUANTITY} {NAME}|**FREE ITEM**
{ORDER TAGS}

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
<J00> * {ORDER TAG NAME} | £{ORDER TAG PRICE}

[ENTITIES:Staff]
-- Staff entity format
<F>-
<EB>
<C10>Staff Discount Details
<F>
<L00>Staff Name:
<DB>
{ENTITY NAME}
<F>
<EB>
<L00>Employee Number:
<DB>
{ENTITY DATA:Employee Number}

Step 7 - Create Print Jobs
Main Menu - Manage - Settings - Print Jobs - Add Print Jobs - set up both store and staff jobs as below

Print Job Name = Print Receipt - Staff Discount Staff Copy

Print Job Name = Print Receipt - Staff Discount Store Copy

NEXT STEP - Create all actions

Action 1 - Staff Discount Calculation 10%
Main Menu - Manage - Automation - Actions - Create the action as shown below

Action 2 - Update Ticket Type
Main Menu - Manage - Automation - Actions - Create the action as shown below

Action 3 - Enable Autoprint Receipt - Staff Discount (updates ticket state)
All of my receipts print depending on the state of the ticket, so we need to create an action to update the state for staff discount so that the staff discount receipts print
Main Menu - Manage - Automation - Actions - Create the action as shown below

Action 4 - Refresh Ticket (dont create again if you already have it)
Main Menu - Manage - Automation - Actions - Create the action as shown below

Action 5 - Print Receipt - Staff Discount Staff Copy
Main Menu - Manage - Automation - Actions - Create the action as shown below

**Action 6 - Print Receipt - Staff Discount Store Copy **
Main Menu - Manage - Automation - Actions - Create the action as shown below

Action 7 - Disable Autoprint Staff Discount
Main Menu - Manage - Automation - Actions - Create the action as shown below

NEXT STEP - Create all Rules

Rule 1 - Staff Discount 10%
Main Menu - Manage - Automation - Rules - Add Rule - Create as below

Rule 2 - Execute Autoprint Receipt - Staff Discount
Main Menu - Manage - Automation - Rules - Add Rule - Create as below

Rule 3 - Disable Autoprint
Main Menu - Manage - Automation - Rules - Add Rule - Create as below

I have different “Execute Autoprint Receipt” rules for different reasons such as cash, card, staff discount, refunds, Parked Sale etc so once a ticket has been paid if you then view the ticket from the ticket screen it still has the autoprint state enabled so everytime you re-open the settled ticket and close it the receipts will print. This rule removes the autoprint state when the ticket is re-opened so when you then close it it doesnt print receipt that are not needed.

I think i have now covered everything needed for this automatic staff discount to work based on swiping a staff card, scanning a barcode or keying in the staff employee number linked to the staff entity.

Here is how it works in screenshots (this all works much faster than the time it takes to create lol)

Step 1 - Enter orders on ticket

Step 2 - Swipe staff card, scan barcode or key in employee number to add staff entity and add discount

Step 3 - Check accounts to track staff discount values

Step 4 - Check all staff discount transactions and open individual tickets
Select the Staff Discount line from the account screen and click Account Details

Step 5 - Select the ticket to view and press find ticket

Step 6 - Ticket opened to view

My Receipt Output (using notepad as receipt printer not attached to my lapotp)

29,40,76,6,0,48,69,48,48,1,1
------------------------------------------------
                 SALES RECEIPT                  
          STAFF DISCOUNT - STORE COPY           
------------------------------------------------
       ORDER 2559       
------------------------------------------------
Qty Item Description                       Price
------------------------------------------------
1x  Dry Roasted Peanuts                    £1.25
 
------------------------------------------------
                 1x Items Sold                  
================================================
Staff Discount 10%                        £-0.12
Total:                                     £1.13
Cash                                       £1.13
================================================
________________________________________________
                Staff Signature                 
2559
------------------------------------------------
             Staff Discount Details             
Staff Name:                                     
Cashier 1
Employee Number:                                
1111111
------------------------------------------------
 Date:17/01/2015   Time:00:41   Served By:Admin 
------------------------------------------------

2 Receipts print, this is the store copy that has space for a staff signature and has the employee details printed at the bottom of the receipt (name and discount number). The difference on the staff copy is that the header is different (says staff copy not store copy), there is no signature area as that isnt needed on their copy.

I hope this helps others that want to setup this or something similar, i have to add that I couldnt have done this without some help from others in the community such as @Jesse, @QMcKay and @emre so thanks again for your help!

Please remember that entity field names, action names, calculation and account names etc all need to be typed exactly as they appear when creating the rules/actions etc. If they are not identical they will not work

EDIT - Using staff discount with switch user function
This update allows staff discount to be applied when that staff member is already assigned as a ticket entity. This could have potential staff fraud issues with staff being able to put there own discount through when they are assigned to a ticket, but i only have this rule setup for a manager discount (not staff discount) which is a 100% discount for me and my wife to use only if we are putting a sale through for ourselves as free.

This is good for when you have your pos setup to automatically assign the logged in user as the ticket entity. So when anyone logs in on my system when they add the first order to the ticket it will add that user as the the ticket entity so every ticket has the cashier that processed it added to the ticket. if staff discount is needed to be added by the staff that is already assigned as the ticket entity you will need to create the following rule which will allow the discount to be added

This uses all the same actions already set up, the rule has a different event name and slightly different constraints

6 Likes

@RickH

Amazing tutorial… Looking forward for the updated one

Updated and complete

4 Likes