Pre-Programmed Gift Card Setup with Promo Cards accounting

A little overview on how this gift card setup works.

This first animation will show the activation, adding a name/label to the card, changing the name/label, using the gift card for a sale.

  • To start the process simply scan a card from the POS screen. (I’m hand typing card number to keep things simple)
  • A pop up appears with the options to activate the gift card or cancel out.
  • If activating, a gift card menu item is automatically added to the ticket.
  • Followed by an automatic pop up asking for a price to load on the gift card.
  • After settling the ticket, another pop up will appear asking for a name/label (optional).

To use the gift card as a payment:

  • Add items to the ticket.
  • Scan the gift card.
  • Use Select Card to use a payment and automatically go to the settle screen.
  • At the settle screen, add the payment amount then select the Gift Card payment button.
  • A final pop up appears showing the balance left on the gift card. (pop up will disappear after 6 seconds-not demonstrated)

This animation shows activating 3 gift cards on the same ticket.
What’s a little different when activating multiple gift cards:

  • The Activating popup will only appear for the first gift card, any other, non activated, gift cards will not show the activating pop up.
  • Different gift cards can have different prices (amount to load on gift card).
  • After the sale, the name/label pop will not appear. (scanning each card after the sale can set the name/label field, if desired)
  • After the sale, I show that each gift card is activated with the proper amount.

Sometimes business want to give a gift to loyal customers, give away a promotional gift card, donate a gift card to charity, etc. This setup has the ability to create a free gift card and track the redemption (using the gift card as a payment) of the Promo Gift card (Promo Gift Card is what we will be calling these type of cards).

Scan Gift Cards is the same as before. For this animation I am going to show creating multiple Promo Gift Cards, the procedure is the same for creating 1 Promo Gift Card. The only expectation, when creating 1 Promo Gift Card, you will be asked for a name/label.

  • After scanning the cards you want to create as Promo Gift Cards, select one of Gift Card items (no need to select all items). We need to access the Order Tag screen to show the “Create Free/Promo GC” button. This button is only available to Administrators and for Gift Card menu items.
  • After pressing the button, the Promo Gift Cards will be created and all Gift Card items will be removed from the ticket.


This next animation is using a Promo Gift Card as a payment. You will notice, there is no difference from a regular gift card. This is designed to keep things simple for the user. The only way to tell the difference between a regular (sold) Gift Card and a Promo Gift Card, is the pop up after scanning. A regular Gift Card will have a “Add Funds” button. A Promo Gift Card will not have that button. This is designed to Promo Gift Card Funds and Paid Gift Card funds separated.

Accounting Screens after transactions


GC Promo Card Funds has the 3 cards we created, totaling $50 ($15, $15 & $20) & the $2.25 that was used as Gift Card payment


This Account is used as a total that used a Promo Gift Card payment.


This screen is all the Gift Cards that we have (Promo & Paid) with their balances. If a Gift Card (Promo & Paid) have a zero balance, it will not show.


This is the transactions for gift card # GC2010


This is the holding account for Promo Gift Cards, funds that have not been redeemed.


Question: But what about reloading a gift card? What about selling non-gift card items and Gift Card items? What if you could Activate, Add funds and add regular menu items all to one ticket?
Answer:

  • Order doe not matter. I forgot to mix menu items and Gift Card items on the ticket.
Breakdown on what happened
GC # Beg Bal Added $ Ending Bal
GC2005 N/A $10 $10
GC2006 N/A $15 $15
GC2001 $8.50 $10 $18.50
GC2003 $20 $1.00 $21.00
GC2010 Promo GC Can not add funds
GC2008 N/A $35 $35

N/A = Not Activated

Gift Card Screen after transaction:


Gift Card account screen (GC2001), showing activation, Redemption & funds added.

General Info
Products, Order Tags, Accounts & Entities
Automation Commands & Actions
Rules
Printer Template & Reports

This tutorial is designed for use with pre-programmed Gift Cards (barcoded, magstrip & RFID). The flow is designed to make it easy for the user to preform Gift Card tasks through a series of pop-ups after scanning a Gift Card.

Before we begin, I have to give credit to QMcKay for coming up with a Gift Certificate tutorial…the foundation on which this tutorial is built upon. It’s with great sadness that QMcKay is not longer with us, his passing occurred in the fall of 2018. His contribution to this community is invaluable!

I also want to acknowledge Emre. His vision to create such a flexible and versatile software is just stunning. I am always amazed to see the different types of business that use this software in ways that I am sue was not the original intent. The flexibility allows it to be adapted in many different ways. I tell people that SambaPOS is like an Erector Set. It’s a big pile of parts, ready to build anything you want. You just might need a little help to design what you want. But the pieces are all right there. Again, it is sad that Emre is no longer with us, but his vision and passion for SambaPOS lives on through the staff and the members of this forum.

A little about Gift Cards…

Gift Cards have quite a few benefits, such as you receive money before having to provide products or service, branded Gift Cards is a form of advertising and in some areas gift cards can have an expiration date.

A few drawbacks of having Gift Cards, bookkeeping involves a little more work (recording the sale of a Gift Card & recording redeeming of funds of the Gift Card.) Some areas require the unused portion of Gift Cards to be sent the local government (unused funds of Gift Cards is called Breakage.)

It is advised that you talk with your tax professional and/or legal advisor about your local laws and requirements before deciding to accept Gift Cards.

A little about the different types of Gift Cards.

Barcoded Gift Cards

By far the easiest to implement, cheapest and most versatile is barcoded Gift Cards. These type of Gift Cards can be ordered in a variety of designs, shapes, sizes & media types. The only restrictions is the size of the bar code. The scanning of the Gift Card can be contactless. The user can simply scan the card while the customer holds up the card.

It would be possible to create your own gift card design and print on cardstock paper. Making sure that the barcode on each gift card is unique.

Magnetic Strip (magstrip) Gift Cards

A little more costly and a few technical obstacles. Magstrip cards tend to be restricted to size of a credit card. Magstrips have up to 3 tracks (most common are 2 tracks). The first track can be alphanumeric, the other 2 tracks are numeric. Magstrip readers normally are designed to read both tracks with a ‘return’ after each track read. Each track starts with and end with characters called sentinel (% or ; at the beginning, ? at the end). These obstacles can be overcome by magstrip reader utility can turn certain tracks on and off and turn sentinels on or off. However, doing this may cause problems of other uses of the card reader (employee cards, customer cards, etc). Use caution when disabling some of these features.

RFID (radio frequency identification)

Can be the most costly of the 3. Can be ordered in a variety of shapes and objects. Contactless. Needs a little coordination between customer and user as to when to scan the RFID.

How Gift Card Readers work

Regardless of the type of Gift Card used, SambaPOS will only read the number from the Gift Card. The information being display is information stored in the database, not on the Gift Card. No information is written to the physical Gift Card.

Special note on Gift Card numbering…

For this tutorial, the pre-programmed Gift Card starts with GC20. But you do not have to use this format, you can use all numbers. But it is suggested to stick with the same starting numbers to denote it’s a Gift Card. If in the future you decide to add another type of card (loyalty, customer, etc) you can denote a different starting number for those cards.

Regardless of which method you choose, you should also have the Gift Card number printed on the card as a backup. In the event of equipment failure.

Your vendor may ask if you want sequential or random numbering. Either method will work. There is no better way, it personal choice.

If you do choose random numbering, it would be a good idea to come up with a way to eliminate overlapping numbering between orders. One idea would be incorporate the year into the number. For instance, GC20 could start out with GC2020########### (# is any random number). The next type you have to order, provided it is not in the same year could be GGC2021###########.

When ordering your gift cards, choose a vendor that will work with you to get the product you desire. Don’t be afraid to ask for samples. Typically you will get some over-runs from previous productions, but it is still a good place to start. If you want to see what information is encoded on sample gift cards, simply open up notepad and scan the card.

Gift Card States

Gift Cards will automatically be given 1 of 3 states: Activated, Promotional & Redeemed.

Activated state

  • Cards that are purchased with funds.
  • Can be reloaded at any time.
  • Name/Label can be changed at any time.

Promotional state

  • Cards that are given out for free (donation, loyal customer, prizes, etc.)
  • Are NOT re-loadable with a current balance.
  • Name/Label can be changed at any time.

Redeemed state

  • Cards with a zero balance, both Activated & Promotional.
  • Can be reload to Activated or Promotional state. (reused)

Now that we got the basics out of the way, lets get started!

2 Likes

I have chosen to use many of Q’s Accounts, Actions, Rules etc. in this tutorial. To keep things organized in this tutorial, all Actions & Rules will start with GC2. The only names not changed are the Account Names, Transaction Types & Document Types, they will start with GC. I have added a few Accounts, Transaction Types & Document Types. The new ones will start with GC2.

If you have used Q’s method, you should be able to incorporate it into your existing system. It is HIGHLY recommended that you try it out on a test machine first! And of course BACKUP your system before implementing into your production environment! You will need to unmap all rules of any previous Gift Certificate/Card setup. They should be grayed out after saving. If you do not unmap them, they will conflict with this tutorial.

Products (1 item)

Manage->Products->Product List->Add Product

Product Name: Gift Card
Group Code: Gift Card
Barcode: (blank)
Tag: Gift Card
Portion Prices: Normal
Multiplier: 1
Price: 0.00

We will NOT be adding this to the menu list. Everything that is needed to add a Gift Card item will done through scanning the Gift Card popups.

----------------------------------------------------

Order Tags (1 item)

Manage->Tickets->Order Tags->Add Order Tag Group

General Settings Tab
Name: GC#
Min Selected Items: 0
Max Selected Items: 0
Group Tag: (blank)
Category Tags: (blank)
Add Tag Price to Order Price [ ](unchecked)
Tax Free [x] Checked
Free Tagging [x] Checked
Save Free Tags [ ](unchecked)
Free Tag Format: (blank)
Display Settings Tab
Button Color: (default)
Column Count: 5
Button Height: 65
Font Size 14
Display Format Gift Card #: <color Yellow><bold>{0}</bold></color>
Hidden [x] Checked
Order Tag List Tab (blank)
Prefix List Tab (blank)
Mappings Tab
User Role Department Ticket Type Product Group Product Portion
* * * * Gift Card *

Account Types (2 Items)

Manage->Accounts->Account Types->Add Account Types

GC Accounts (1 of 2)

Name: GC Accounts
Filter Type: All
Rules: Credit
Tags: (blank)

The GC Accounts will hold the individual balances for each Gift Card.


GC Balances (2 of 2)

Name: GC Balances
Filter Type: All
Rules: Default
Tags: (blank)

The GC Balances is an overview of total Gift Cards Purchased and total of of amount redeemed.

----------------------------------------------------

Accounts (5 items)

Manage->Accounts->Accounts->Add Account

GC Funds (1 of 5)

Accounts 1 of 5

Account Name: GC Funds
Account Type: Payment Accounts
Currency: (blank)

GC Promo Card Funds (2 of 5)

Account Name: GC2 Promo Card Funds
Account Type: Payment Accounts
Currency: (blank)

GC Purchases (3 of 5)

Accounts 3 of 5

Account Name: GC Purchases
Account Type: GC Balances
Currency: (blank)

GC Redemptions (4 of 5)

Accounts 4 of 5

Account Name: GC Redemptions
Account Type: GC Balances
Currency: (blank)

GC2 Promo Gift Card Discount (5 of 5)

Account Name: GC2 Promo Gift Card Discount
Account Type: Discount Accounts
Currency: (blank)

----------------------------------------------------

Account Screens (2 item)

Manage->Accounts->Account Screens->Add Account Screen

Gift Cards Accounts Screen (1 of 2)

Accounts Screen 1 of 2

Name: Gift Cards
Filter Type: All
Display as Tree [x] Checked
Display Summary [ ] (unchecked)
Account Type: Display Details Hide Account With Zero Balances
GC Balances [x] [ ] (unchecked)
GC Accounts [x] [x]
Automation Command: (none)
Account Screen View

Changes to General (2 of 2)

In Account Type add GC Balances.

Accounts Screen 2 of 2

----------------------------------------------------

Transaction Types (6 items)

Manage->Accounts->Transaction Types->Add Account Transaction Type

GC Purchase Transaction (1 of 6)

Account Transaction Type Name: GC Purchase Transaction
Source Account Type (Debit): GC Balances
Target Account Type (Credit): Receivable Accounts
Default Source Account: GC Purchases
Default Target Account: Receivables
Currency: (blank)

GC Credit Transaction (2 of 6)

Account Transaction Type Name: GC Credit Transaction
Source Account Type (Debit): GC Accounts
Target Account Type (Credit): Payment Accounts
Default Source Account: (blank)
Default Target Account: GC Funds
Currency: (blank)

GC Redemption Transaction (3 of 6)

Account Transaction Type Name: GC Redemption Transaction
Source Account Type (Debit): Receivable Accounts
Target Account Type (Credit): GC Accounts
Default Source Account: Receivables
Default Target Account: (blank)
Currency: (blank)

GC Debit Transaction (4 of 6)

Account Transaction Type Name: GC Debit Transaction
Source Account Type (Debit): Payment Accounts
Target Account Type (Credit): GC Balances
Default Source Account: GC Funds
Default Target Account: GC Redemptions
Currency: (blank)

GC2 Promo Card Credit Transaction (5 of 6)

Account Transaction Type Name: GC2 Promo Card Credit Transaction
Source Account Type (Debit): GC Accounts
Target Account Type (Credit): Payment Accounts
Default Source Account: (blank)
Default Target Account: GC2 Promo Card Funds
Currency: (blank)

GC2 Promo Card Debit Transaction (6 of 6)

Account Transaction Type Name: GC2 Promo Card Debit Transaction
Source Account Type (Debit): Payment Accounts
Target Account Type (Credit): Discount Accounts
Default Source Account: GC2 Promo Card Funds
Default Target Account: GC2 Promo Gift Card Discount
Currency: (blank)

----------------------------------------------------

Document Types (4 items)

Manage->Accounts->Document Types->Add Document Type

GC Purchase Doc (1 of 4)

Name: GC Purchase Doc
Button Header: (blank)
Button Color: (default-no change)
Account Type: GC Accounts
Default Amount: (blank)
Description Template: (blank
Exchange Rate: (blank)
Document Type GC Credit Transaction
Batch Create Tab (leave as default)
Print Mapping Tab (leave as default)
Mappings tab * * *

GC Redemption Doc (2 of 4)

Name: GC Redemption Doc
Button Header: (blank)
Button Color: (default-no change)
Account Type: GC Balances
Default Amount: (blank)
Description Template: (blank
Exchange Rate: (blank)
Document Type GC Debit Transaction
Batch Create Tab (leave as default)
Print Mapping Tab (leave as default)
Mappings tab * * *

GC2 Promo Card Created Doc (3 of 4)

Name: GC2 Promo Card Created Doc
Button Header: (blank)
Button Color: (default-no change)
Account Type: GC Accounts
Default Amount: (blank)
Description Template: (blank
Exchange Rate: (blank)
Document Type GC2 Promo Card Credit Transaction
Batch Create Tab (leave as default)
Print Mapping Tab (leave as default)
Mappings tab * * *

GC2 Promo Card Redemption Doc (4 of 4)

Name: GC2 Promo Card Redemption Doc
Button Header: (blank)
Button Color: (default-no change)
Account Type: GC Balances
Default Amount: (blank)
Description Template: (blank
Exchange Rate: (blank)
Document Type GC2 Promo Card Debit Transaction
Batch Create Tab (leave as default)
Print Mapping Tab (leave as default)
Mappings tab * * *

----------------------------------------------------

Entity Types (1 item)

Manage->Entities->Entity Types->Add Entity Type

Entity Type 1 of 1

General Settings Tab
Name: Gift Cards
Entity Name: Gift Card
Display Format: [Number] - [Label]
Primary Field Name: Number
Primary Field Format: (blank)
Default States: (blank)
Warehouse Type: (blank)
Custom Fields Tab
Custom Field Name Field Type Mask Type Editing Format Default Value Values Value Mapping
Balance[1] Number None (blank) (blank) (blank) (blank)
Label String None (blank) (blank) (blank) (blank)

[1] QMcKays original Tutorial uses GCBalance, I’m using just Balance.

Accounting tab:

Account Type: GC Accounts
Account Name Template: [Number]
Account Balance Display Format:[2] <linebreak/><color Red><bold>See Manager</bold></color>;<linebreak/>Balance on Gift Card: <color Yellow>$ #.00</color>;<linebreak/><color Yellow>-Zero-</color>

[2] Syntax for this field is <positive value>;<negative value>;<zero value>. In accounting, Gift Cards have a negative (credit) balance. If a Gift Card enters into a positive (debit) balance, we have a mechanism to alert management and look into the history of the card to find what went wrong. Chances are that customer did nothing wrong, but rather a cashier did something to break how a normal gift card transaction is suppose to be handled.

----------------------------------------------------

Gift Card Entity Screen (1 item)

Manage->Entities->Entity Screens->Add Entity Screen

General Settings tab
Name: Gift Cards
Button Header: Gift Cards
Ticket Type:[1] Ticket
Ask Ticket Type [ ] (unchecked)
View Mode: Search
Search Value Replace Pattern: (blank)
Appearance tab
Background Image: (blank)
Background Color: (default)
Use State Display Format [ ] (unchecked)
Column Count: 0
Row Count: 0
Button Height: 0
Page Count: 1
Font Size: 50
Header Button Font Size: 0
Auto Refresh Delay: 0
Entity List tab
Entity Type: Gift Cards
Display State: GCStatus
State Filter: Activated,Promotional
Entities: Select Entity (blank)
Details tab
Template: (blank)
Mappings Tab
(blank)[1]

[1] There is no need to view this screen for general use of Gift Cards. If the need arises to access this screen, simply map it (preferably to Admin. And add the entity to your ticket type OR create an automation Command (Navigation Setting, Entity & Gift Card settings).

Gift Card payment button (1 item)

Manage->Tickets->Payment Types->Add Payment Type

Payment Type 1 of 1

General Settings tab
Template Name: Gift Card
**Account Transaction Type: GC Redemption Transaction
Account: (blank)
Button Header (blank)
Button Color: (default)
Font Size: 26

Payment Processors tab (blank)

Mappings tab
Terminal User Role Department Ticket Type
* * * Ticket
1 Like

Automation Commands (2 items)

Manage->Automaton->Automation Commands->Add Automation Command

GC2 Select/Change Gift Card (1 of 2)

Button on Settle Screen

General Settings tab
Name: GC2 Select/Change Gift Card
Category: (blank)
Button Header: Select\rGift Card
Color: (default)
Font Size: 26
Confirmation: None
Execute Once [ ] (unchecked)
Clear Selection [x] Checked
Toggle Values [ ] (unchecked)
Values: (blank)
Navigation Settings
(no changes)
Mappings tab
Terminal User Role Department Ticket Type Enabled States Visible States Visibility
* * * * * * Payment

GC2 Manual Create (2 of 2)

General Settings tab
Name: GC Manual Create
Category: (blank)
Button Header: Create Free/\rPromo GC
Color: (default)
Font Size: 26
Confirmation: None
Execute Once [x] Checked
Clear Selection [x] Checked
Toggle Values [ ] (unchecked)
Values: (blank)
Navigation Settings
(no changes)
Mappings tab
Terminal User Role Department Ticket Type Enabled States Visible States Visibility
* Admin * * Ordered Ordered Order Line
Button on Order Tag screen

ezyDidRgsK

----------------------------------------------------

Actions (25 items)

Manage->Automation->Actions->Add Action

GC2 Add Line to Text File [1] (1 of 25)

Actions 1 of 26

Action Name: GC2 Add Line to Text File
Action Type: Add Line to Text File
File Path:[2] <path to file>.GiftCardLog.txt[3]
Text: [:some text]

[1] The use of action is a fail safe option. In the event of data loss and a backup database needs to be restored, this file can be used as a reference to adjust each Gift Card to the proper amounts.

[2] The path should point to a folder that SambaPOS has access to. If in a network environment it should be point to a folder that every work station can write to, such as SambaPOS backup directory.

[3] You can download this file, unzip it and place it the folder appropriate folder.
GiftCardLog.zip (175 Bytes)
After some data has been written to this file, it can also be opened with a spreadsheet program (it is in a csv format).


GC2 Add Order-Gift Card (2 of 25)

Actions 2 of 26

Action Name: GC2 Add Order-Gift Card
Action Type: Add Order
Menu Item Name: Gift Card
Quantity: (blank)
Tag: (blank)
Order State Name: (blank)
Order State: (blank)
Order Tag JSON: (blank)
Price: (blank)
Increase Inventory: (blank)
Decrease Inventory: (blank)
Account Transaction Type Name: GC Purchase Transaction
Locked: (blank)
Calculate Price: (blank)
Can Create Ticket: True
Enforce Quantity: (blank)

GC2 Ask Question-Message Box (3 of 25)

Actions 3 of 26

Name: GC2 Ask Question-Message Box
Action Type: Ask Question
Question: [:popup header]
Buttons: [:buttons]
Description: [:extra information]
Automation Command Name: [:Auto/Command Name]
Execute Command in Background: False
Background Color: Navy
Transparent Color: (blank)
Multi Select: False
Inactivity Command Name: (blank)
Inactivity Timeout Seconds: [:Close in X secs]
Execute Inactivity Command in Background: (blank)

GC2 Change Ticket Entity (4 of 25)

Actions 4 of 26

Action Name: GC2 Change Ticket Entity
Action Type: Change Ticket Entity
Can Create Ticket: True
Can Create Entity: False
Entity Type Name: Gift Cards
Entity Name: [:Name]
Entity Search Value: (blank)
Update Null Entity (blank)
Entity Screen Name: (blank)
Entity Search Screen Value: (blank)

GC2 Purchase (5 of 25)

Actions 7 of 26

Action Name: GC2 Purchase
Action Type: Create Account Transaction Document
Account Transaction Document Name: GC Purchase Doc
Account Name: [:Account Number]
Account Id: (blank)
Date: (blank)
Description: GC Purchased Gift Card [[:CardNum]]
Amount: [:amount]

GC2 Add Funds (6 of 25)

Actions 8 of 26

Action Name: GC2 Add Funds
Action Type: Create Account Transaction Document
Account Transaction Document Name: GC Purchase Doc
Account Name: [:Account Number]
Account Id: (blank)
Date: (blank)
Description: GC Funds Added to Gift Card [[:CardNum]]
Amount: [:amount]

GC2 Create Promo Gift Card (7 of 25)

Actions 9 of 26

Action Name: GC2 Create Promo Gift Card
Action Type: Create Account Transaction Document
Account Transaction Document Name: GC2 Promo Card Created Doc
Account Name: [:Account Number]
Account Id: (blank)
Date: (blank)
Description: GC Create Promo Gift Card [[:CardNum]]
Amount: [:amount]

GC2 Redeem (8 of 25)

Actions 10 of 26

Action Name: GC2 Redeem
Action Type: Create Account Transaction Document
Account Transaction Document Name: GC Redemption Doc
Account Name: [:Account Number]
Account Id: (blank)
Date: (blank)
Description: GC Redeem From Account [[:CardNum]]
Amount: [:amount]

GC2 Promo Card Redemption Doc (9 of 25)

Actions 11 of 26

Action Name: GC2 Promo Card Redemption Doc
Action Type: Create Account Transaction Document
Account Transaction Document Name: GC2 Promo Card Redemption Doc
Account Name: [:Account Number]
Account Id: (blank)
Date: (blank)
Description: GC Promo Card Redeem From Acct [[:CardNum]]
Amount: [:amount]

GC2 Create Entity (10 of 25)

Actions 12 of 26

Action Name: GC2 Create Entity
Action Type: Create Entity
Entity Type Name: Gift Cards
Entity Name: [:Card Number]
Custom Data: (blank)
Create Account: True

GC2 AMC - Generic (11 of 25)

Actions 13 of 26

Action Name: GC2 AMC - Generic
Action Type: Execute Automation Command
Automation Command Name: [:automation command name]
Command Value: [:command value]
Background: False
Delay: (blank)

GC2 Loop Values - GC2 Cards to Activate (12 of 25)

Actions 14 of 26

Action Name: GC2 Loop Values - GC2 Cards to Activate
Action Type: Loop Values
Name: GC2 Cards to Activate
Values: [:loop values]
Split Char: [:value separator]
Display Progress for Items: (blank)
Progress Title: (blank)

GC2 Loop Values - GC Manual Create Promo Card (13 of 25)

Actions 15 of 26

Action Name: GC2 Loop Values - GC Manual Create Promo Card
Action Type: Loop Values
Name: GC Manual Create Promo Card
Values: [:loop values]
Split Char: [:value separator]
Display Progress for Items: (blank)
Progress Title: (blank)

GC2 Select Card Orders (14 of 25)

Actions 16 of 26b

Action Name: GC2 Select Card Orders
Action Type: Select Orders
Order State: (blank)
Order Ids: (blank)
Expression: (MG=Gift Card)
Select All: (blank)
Select Last Order: (blank)

GC2 Add Order Tag GC# (15 of 25)

Actions 17 of 26

Action Name: GC2 Add Order Tag GC#
Action Type: Tag Order
Order Tag Name: GC#
Old Order Tag Value: (blank)
Order Tag Value: [:Gift Card Number]
Order Tag Note: (blank)
Order Tag Price: (blank)
Order Tag Rate: (blank)
Order Tag Require Selection: (blank)

GC2 Balance Field Update (16 of 25)

Actions 18 of 26

Action Name: GC2 Balance Field Update
Action Type: Update Entity Data
Entity Type Name: Gift Cards
Entity Name: [:CardNum]
Field Name: Balance
Field Value: [:GC Balance]

GC2 Label Field Update (17 of 25)

Actions 19 of 26

Action Name: GC2 Label Field Update
Action Type: Update Entity Data
Entity Type Name: Gift Cards
Entity Name: [:CardNum]
Field Name: Label
Field Value: [:GC Label]

GC2 Update State GCStatus (18 of 25)

Actions 20 of 26

Action Name: GC2 Update State GCStatus
Action Type: Update Entity State
Entity Type Name: Gift Cards
Entity Name: [:CardNum]
Entity State Name: GCStatus
Current State: [:Current GCStatus]
Entity State: [:New GCStatus]
Quantity Exp: (blank)

GC2 Add Order Price (19 of 25)

Actions 21 of 26

Action Name: GC2 Add Order Price
Action Type: Update Order
Name: (blank)
Quantity: (blank)
Price [:price]
Portion Name: (blank)
Price Tag: (blank)
Increase Inventory: (blank)
Decrease Inventory: (blank)
Calculate Price: (blank)
Locked: (blank)
Disable Portion Selection: (blank)
Tax Template: (blank)
Account Transaction Type: GC Purchase Transaction
Warehouse Name: (blank)
Update All Orders: (blank)
Require Selection: (blank)

GC2 Update Order State (20 of 25)

Actions 22 of 26

Action Name: GC2 Update Order State
Action Type: Update Order State
State Name: Card
Group Order: 3
Current State: [:Current State]
State: [:state]
State Order: 3
State Value: (blank)
Require Selection: (blank)

GC2 Program Setting - GiftCard (21 of 25)

Actions 23 of 26

Action Name: GC2 Program Setting - GiftCard
Action Type: Update Program Setting
Setting Name: GiftCard
Setting Value: [:GiftCard value]
Update Type: Update
Is Local: True

GC2 Update Ticket Tag GC Number (22 of 25)

Actions 24 of 26

Action Name: GC2 Update Ticket Tag GC Number
Action Type: Update Ticket Tag
Tag Name: GC Number
Tag Value: [:GC Number]

GC2 Update Ticket Tag GC Balance (23 of 25)

Actions 25 of 26

Action Name: GC2 Update Ticket Tag GC Balance
Action Type: Update Ticket Tag
Tag Name: GC Balance
Tag Value: [:GC Balance]

Display Ticket (24 of 25)

Actions 26 of 26

Action Name: Display Ticket
Action Type: Display Ticket
Ticket Id: [:Ticket ID]

GC2 Program Setting - GiftCard - Delete (25 of 25)

Actions 25 of 25

Action Name: GC2 Program Setting - GiftCard - Delete
Action Type: Update Program Setting
Setting Name: GiftCard
Setting Value: (blank)
Update Type: Delete
Is Local: True

3 other actions that we will be using are: Display Ticket Screen, Update Order Gift State and Cancel Order. These actions should already exist.

1 Like

Rules (18 items)

Manage->Automation->Rules->Add Rule

GC2 Card Scanned - Step 1 (1 of 18)

Rules 1 of 18

Rule Name: GC2 Card Scanned - Step 1
Event Name: Numberpad Value Entered

Custom Constraint List

Execute Rule If: Matches
Numberpad Value Starts GC20

---- Actions ----

Action (1 of 2): GC2 Program Setting - GiftCard
Constraint: (blank)
GiftCard value: [:NumberpadValue]
Action (2 of 2) GC2 AMC - Generic
Constraint: (blank)
automation command name GC2 Scanned Gift Card
command value [:NumberpadValue]
Breakdown

The 1st action is going to set a temporary local setting that we may need later, depending on the choice decided later.

2nd action is going act like a pressing a button, but automatically. Will will use constraints to decide which rule will fire.

GC2 Card Scanned - Step 2 - New Gift Card (2 of 18)

Rule Name: GC2 Card Scanned - Step 2 - New Gift Card
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Scanned Gift Card
{ENTITY STATE BY NAME:Gift Cards.[:CommandValue]:GCStatus} Is Null (blank)

---- Actions ----

Action (1 of 2): GC2 Ask Question-Message Box
Constraint:[1] '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '0' || '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == ''
popup header Card number: <bold>[:CommandValue]</bold>\r <bold>Not Found!</bold>\r Activate the Gift Card?
buttons Activate Gift Card=Add Gift Card Item,Cancel=Cancel
extra information (blank)
Auto/Command Name GC2 Step 3 - Create-Add-Select
Close in X secs (blank)
Action (2 of 2): GC2 AMC - Generic
Constraint:[2] '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' > '0'
automation command name GC2 Step 3 - Create-Add-Select
command value Add Gift Card Item
Breakdown

[1]When the user scans a gift card to activate, this will popup the ask question to activate. Any other scanning of a new gift card on the current ticket will avoid repetitive popups.

[2]After the 1st Gift Card has been scanned, this action will take over, avoiding the popup asking to activate.

GC2 Card Scanned - Step 2 - Active Gift Card (3 of 18)

Rule Name: GC2 Card Scanned - Step 2 - Active Gift Card
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Scanned Gift Card
{ENTITY STATE BY NAME:Gift Cards.[:CommandValue]:GCStatus} Not Equals Promotional
{ENTITY STATE BY NAME:Gift Cards.[:CommandValue]:GCStatus} Is Not Null (blank)
[=F(-1*TN('{REPORT ENTITY DETAILS:E.Balance:(EN=[:CommandValue])}'),'0.00')] Greater 0.00

---- Actions ----

Action (1 of 1): GC2 Ask Question-Message Box
Constraint: (blank)
popup header Gift Card # <bold>{REPORT ENTITY DETAILS:E.Name:(EN=[:CommandValue])}</bold>\r [='{ENTITY CUSTOMDATA BY NAME:Gift Cards.[:CommandValue]:Label}' == '' ? '' : '<size 20>Card Label: {ENTITY CUSTOMDATA BY NAME:Gift Cards.[:CommandValue]:Label}</size>' ]\r Balance: $<bold>[=F(-1*TN('{REPORT ENTITY DETAILS:E.Balance:(EN=[:CommandValue])}'),'0.00')]</bold>
buttons Select Card=Select,Add Funds=Add Gift Card Item,Edit Label=Edit Label,Cancel=Cancel
extra information Select Card = Use Gift Card on the Settle Screen\rAdd Funds = Load more funds to this Gift Card\rEdit Label = Edit/Enter the Label attached to the card.\rCancel = Close this pop-up.
Auto/Command Name GC2 Step 3 - Create-Add-Select
Close in X secs (blank)

GC2 Card Scanned - Step 2 - Active Gift Card-No Funds (4 of 19)

Rule Name: GC2 Card Scanned - Step 2 - Active Gift Card-No Funds
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Scanned Gift Card
{ENTITY STATE BY NAME:Gift Cards.[:CommandValue]:GCStatus} Equals Redeemed

---- Actions ----

Action (1 of 1): GC2 Ask Question-Message Box
Constraint: (blank)
popup header Gift Card # <bold>{REPORT ENTITY DETAILS:E.Name:(EN=[:CommandValue])}</bold>\r [='{ENTITY CUSTOMDATA BY NAME:Gift Cards.[:CommandValue]:Label}' == '' ? '' : '<size 20>Card Label: {ENTITY CUSTOMDATA BY NAME:Gift Cards.[:CommandValue]:Label}</size>' ]\r Balance: $<bold>[=F(-1*TN('{REPORT ENTITY DETAILS:E.Balance:(EN=[:CommandValue])}'),'0.00')]</bold>
buttons Add Funds=Add Gift Card Item,Edit Label=Edit Label,Cancel=Cancel
extra information Add Funds = Load more funds to this Gift Card\rEdit Label = Edit/Enter the Label attached to the card.\rCancel = Close this pop-up.
Auto/Command Name GC2 Step 3 - Create-Add-Select
Close in X secs (blank)

GC2 Card Scanned - Step 2 - Promo Gift Card (5 of 19)

Rule Name: GC2 Card Scanned - Step 2 - Promo Gift Card
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Scanned Gift Card
{ENTITY STATE BY NAME:Gift Cards.[:CommandValue]:GCStatus} Equals Promotional

---- Actions ----

Action (1 of 1): GC2 Ask Question-Message Box
Constraint: (blank)
popup header Gift Card # <bold>{REPORT ENTITY DETAILS:E.Name:(EN=[:CommandValue])}</bold>\r [='{ENTITY CUSTOMDATA BY NAME:Gift Cards.[:CommandValue]:Label}' == '' ? '' : '<size 20>Card Label: {ENTITY CUSTOMDATA BY NAME:Gift Cards.[:CommandValue]:Label}</size>' ]\r Balance: $<bold>[=F(-1*TN('{REPORT ENTITY DETAILS:E.Balance:(EN=[:CommandValue])}'),'0.00')]</bold>
buttons Select Card=Select,Edit Label=Edit Label,Cancel=Cancel
extra information Select Card = Use Gift Card on the Settle Screen\rEdit Label = Edit/Enter the Label attached to the card.\rCancel = Close this pop-up.
Auto/Command Name GC2 Step 3 - Create-Add-Select
Close in X secs (blank)

GC2 Step 3 - Create-Add-Select - Select as Payment (6 of 18)

Rule Name: GC2 Step 3 - Create-Add-Select - Select as Payment
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Step 3 - Create-Add-Select
Command Value Equals Select

---- Actions ----

Action[1] (1 of 3): GC2 Change Ticket Entity
Constraint: (blank)
Name {LOCAL SETTING:GiftCard}
Action[2] (2 of 3): GC2 Program Setting - GiftCard - Delete
Constraint: (blank)
Action[3] (3 of 3): Display Payment Screen
Constraint: (blank)
Breakdown

[1]This action will load the Gift Card Entity from the local setting that was set earlier.
[2]This will clear the load local setting.
[3]This will display the settle screen.

GC2 Step 3 - Create-Add-Select - Add Gift Card Item (7 of 18)

Rule Name: GC2 Step 3 - Create-Add-Select - Add Gift Card Item
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Step 3 - Create-Add-Select
Command Value Equals Add Gift Card Item

---- Actions ----

Action (1 of 1): GC2 Add Order-Gift Card
Constraint: (blank)
Breakdown

This action automatically adds the Gift Card item to the ticket. Setting the price happens later

GC2 Step 3 - Create-Add-Select - Edit Label (8 of 18)

Rule Name: GC2 Step 3 - Create-Add-Select - Edit Label
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches All
Automation Command Name Equals GC2 Step 3 - Create-Add-Select
Command Value Equals Edit Label

---- Actions ----

Action (1 of 2): GC2 Label Field Update
Constraint: (blank)
CardNum {LOCAL SETTING:GiftCard}
GC Label [?Edit/Enter a Label/Name;;{ENTITY CUSTOMDATA BY NAME:Gift Cards.{LOCAL SETTING:GiftCard}:Label};;]
Action[1] (2 of 2): GC2 AMC - Generic
Constraint: (blank)
automation command name GC2 Scanned Gift Card
command value {LOCAL SETTING:GiftCard}
Breakdown

[1]After editing the label field, this action will back to GC2 Card Scanned - Step 1, but since we have captured the Gift Card number using a program settings, we will eliminate the need to scan the card again.

GC2 Manual Create Promo Card (9 of 18)

Rules 9 of 18

Rule Name: GC2 Manual Create Promo Card
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches
Automation Command Name Equals GC Manual Create

---- Actions ----

Action (1 of 1): GC2 Loop Values - GC Manual Create Promo Card
Constraint: (blank)
loop values {ORDER DETAILS:OT.GC#:(OS.Card=Ordered)::,},Stop
value separator ,
Breakdown

After scanning all the Gift Card(s), selecting just 1 gift card item and pressing the Create Free/Promo GC button. Will create a list of scanned gift cards in a comma separated list. The ,Stop will be added to the list at the end. We will use this, later, to tell SambaPOS to select all items and removed them from the ticket.

GC2 Update Order State-Ordered to Activated (10 of 18)

Rules 10 of 18

Rule Name: GC2 Update Order State-Ordered to Activated
Event Name: Before Ticket Closing

Custom Constraint List

Execute Rule If: Matches All
Remaining Amount Equals 0
{ORDER DETAILS:OT.GC#:(OS.Card=Ordered)} Is Not Null (blank)

---- Actions ----

Action[1] (1 of 2): GC2 Loop Values - GC2 Cards to Activate
Constraint: (blank)
loop values {ORDER DETAILS:OT.GC#:(OS.Card=Ordered)::,}
value separator ,
Action[2] (2 of 2): GC2 Update Order State
Constraint: (blank)
Current State Ordered
state Activated
Breakdown

[1]This action will grab the Gift Card numbers from the state of Ordered and create a comma separated list.
[2]This action will change all states from Ordered to Activated.

GC2 Update New Gift Card Item (11 of 18)

Rule Name: GC2 Update New Gift Card Item
Event Name: Order Added to Ticket

Custom Constraint List

Execute Rule If: Matches
Menu Item Tag Equals Gift Card

---- Actions ----

Action (1 of 5): GC2 Add Order Price
Constraint: (blank)
price[1] [?Amount to Load to Card;\d{1}\d{1}?.\d{2};;OC;"7","8","9","","10.00","15.00"|"4","5","6","","20.00","25.00"|"1","2","3","","30.00","35.00"|".","0",<backspace>,"","40.00","50.00"]
Action (2 of 5): GC2 Add Order Tag GC#
Constraint: (blank)
Gift Card Number {LOCAL SETTING:GiftCard}
Action (3 of 5): GC2 Update Order State
Constraint: (blank)
Current State (blank)
state Ordered
Action (4 of 5): Update Order Gift State
Constraint: (blank)
Status Locked
Value (blank)
Action (5 of 5): Display Ticket
Constraint: (blank)
Ticket ID: (blank)
Information

When SambaPOS detects a Gift Card item added to the ticket, it’s going to prompt for a price, add the program setting to the GC# Order Tag and update a card and gift state & status.

[1]Our popup has 5 sections:

[?<prompt>;<mask>;<default values>;<flags>;<custom keyboard (keycodes)>]

  • [? = Starts the prompt.
  • <prompt> = is the text to be displayed.
  • <mask> = restricts characters, in our case it will only allow numbers (regex)
  • <default values> = if we had options to choose from we could define them here.
  • <flags> = defines keyboard type and which buttons appear (number keyboard, qwerty keyboard, Ok button and Cancel button)
  • <custom keyboard (keycodes)>
  • ] = Ends the prompt

Our mask we will be using (\d{1}?\d{1}.\d{2}) will require 1 digit with an optional 2 digit a decimal and a mandatory 2 decimal places. If you would like more digits, just add \d{1}? at the beginning of mask for each digit you want to include.

<custom keyboard (keycodes)>

Top row: “7”,“8”,“9”,"",“10.00”,“15.00”|

  • “7”,“8”,“9” creates 7 8 9
  • “” creates the blank key
  • “10.00”,“15.00” creates the 10.00 & 15.00
  • | starts a new line.
  • every value is separated with a comma ,

GC2 Promo Card Redeemed (Update GC Data) (12 of 18)

Rule Name: GC2 Promo Card Redeemed (Update GC Data)
Event Name: Payment Processed

Custom Constraint List

Execute Rule If: Matches All
{ENTITY STATE BY NAME:Gift Cards.{ENTITY NAME:Gift Cards}:GCStatus} Equals Promotional
Payment Type Name Equals Gift Card
{ENTITY NAME:Gift Card} Starts GC20
[=-1*TN('{ENTITY BALANCE:Gift Card}')] Greater 0

---- Actions ----

Action (1 of 8): GC2 Balance Field Update
Constraint: (blank)
CardNum {ENTITY NAME:Gift Card}
GC Balance [=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount],'0.00')]
Action (2 of 8): GC2 Promo Card Redemption Doc
Constraint: (blank)
Account Number {ENTITY NAME:Gift Card}
CardNum {ENTITY NAME:Gift Card}
amount [=F(TN('[:ProcessedAmount]'),'0.00')]
Action (3 of 8): GC2 Update State GCStatus
Constraint: [=-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount]] <= 0
CardNum: {ENTITY NAME:Gift Card}
Current GCStatus Promotional
New GCStatus Redeemed
Action (4 of 8): GC2 Add Line to Text File
Constraint: (blank)
sometext {DATE} {TIME},{ENTITY NAME:Gift Card},{ENTITY STATE BY NAME:Gift Cards.{ENTITY NAME:Gift Card}:GCStatus},Promo Card Redeem Trans,([=F(TN('[:ProcessedAmount]'),'0.00')]),[=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount],'0.00')]
Action (5 of 8): GC2 Update Ticket Tag GC Number
Constraint: (blank)
GC Number {ENTITY NAME:Gift Card}
Action (6 of 8): GC2 Update Ticket Tag GC Balance
Constraint: (blank)
GC Balance $[=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount])] (After transaction)
Action (7 of 8): Display Payment Screen
Constraint: (blank)
Action (8 of 8): GC2 Ask Question-Message Box
Constraint: (blank)
popup header Balance left on Gift Card:\r\r <if {ENTITY BALANCE:Gift Cards} == 0.00><bold>$0.00</bold></if><if {ENTITY BALANCE:Gift Cards} != 0.00><bold>$ [=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount],'0.00')]</bold></if>
buttons Close
extra information (blank)
Auto/Command Name (blank)
Close in X secs 6
Breakdown

This is a big one…it will update a Promotional Gift Card account balance, field value, post 2 ticket tags to the ticket, add a line to backup text file, update the card status (if zero), show the payment screen (if another payment is needed) then show a pop-up with the balance of the gift card for 6 seconds before closing the popup automatically.

GC2 Active Card Redeemed (Update GC Data) (13 of 18)

Rule Name: GC2 Active Card Redeemed (Update GC Data)
Event Name: Payment Processed

Custom Constraint List

Execute Rule If: Matches All
{ENTITY STATE BY NAME:Gift Cards.{ENTITY NAME:Gift Cards}:GCStatus} Equals Activated
Payment Type Name Equals Gift Card
{ENTITY NAME:Gift Card} Starts GC20
[=-1*TN('{ENTITY BALANCE:Gift Card}')] Greater 0

---- Actions ----

Action (1 of 8): GC2 Balance Field Update
Constraint: (blank)
CardNum {ENTITY NAME:Gift Card}
GC Balance [=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount],'0.00')]
Action (2 of 8): GC2 Redeem
Constraint: (blank)
Account Number GC Redemptions
CardNum {ENTITY NAME:Gift Card}
amount [=F(TN('[:ProcessedAmount]'),'0.00')]
Action (3 of 8): GC2 Update State GCStatus
Constraint: [=-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount]] <= 0
CardNum: {ENTITY NAME:Gift Card}
Current GCStatus Activated
New GCStatus Redeemed
Action (4 of 8): GC2 Add Line to Text File
Constraint: (blank)
sometext {DATE} {TIME},{ENTITY NAME:Gift Card},{ENTITY STATE BY NAME:Gift Cards.{ENTITY NAME:Gift Card}:GCStatus},Redeem Trans,([=F(TN('[:ProcessedAmount]'),'0.00')]),[=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount],'0.00')]
Action (5 of 8): GC2 Update Ticket Tag GC Number
Constraint: (blank)
GC Number {ENTITY NAME:Gift Card}
Action (6 of 8): GC2 Update Ticket Tag GC Balance
Constraint: (blank)
GC Balance $[=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount])] (After transaction)
Action (7 of 8): Display Payment Screen
Constraint: (blank)
Action (8 of 8): GC2 Ask Question-Message Box
Constraint: (blank)
popup header Balance left on Gift Card:\r\r <if {ENTITY BALANCE:Gift Cards} == 0.00><bold>$0.00</bold></if><if {ENTITY BALANCE:Gift Cards} != 0.00><bold>$ [=F(-1*TN('{ENTITY BALANCE:Gift Card}')-[:ProcessedAmount],'0.00')]</bold></if>
buttons Close
extra information (blank)
Auto/Command Name (blank)
Close in X secs 6
Breakdown

This is a big one…it will update an Activated Gift Card account balance, field value, post 2 ticket tags to the ticket, add a line to backup text file, update the card status (if zero), show the payment screen (if another payment is needed) then show a pop-up with the balance of the gift card for 6 seconds before closing the popup automatically.

GC2 - Manual Create Promo Card-Looped Values (14 of 18)

Rule Name: GC2 - Manual Create Promo Card-Looped Values
Event Name: Value Looped

Custom Constraint List

Execute Rule If: Matches All
Name Equals GC Manual Create Promo Card
Loop Value Not Equals Stop

---- Actions ----

Action (1 of 8): GC2 Program Setting - GiftCard
Constraint: (blank)
GiftCard value: [:LoopValue]
Action (2 of 8): GC2 Create Entity
Constraint: (blank)
Card Number [:LoopValue]
Action (3 of 8): GC2 Balance Field Update
Constraint: (blank)
CardNum [:LoopValue]
GC Balance {ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (4 of 8): GC2 Label Field Update
Constraint: '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '1'
CardNum [:LoopValue]
GC Label [?Edit/Enter a Label/Name;;{ENTITY CUSTOMDATA BY NAME:Gift Cards.{LOCAL SETTING:GiftCard}:Label};;]
Action (5 of 8): GC2 Update State GCStatus
Constraint: (blank)
CardNum [:LoopValue]
Current GCStatus (blank)
New GCStatus Promotional
Action (6 of 8): GC2 Create Promo Gift Card
Constraint: (blannk)
Account Number [:LoopValue]
CardNum [:LoopValue]
amount {ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (7 of 8): GC2 Add Line to Text File
Constraint: (blank)
sometext {DATE} {TIME},[:LoopValue],{ENTITY STATE BY NAME:Gift Cards.[:LoopValue]:GCStatus},Promo GC Created,{ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])},{ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (8 of 8): GC2 Program Setting - GiftCard - Delete
Constraint: (blank)

GC2 - Manual Create Promo Card-Looped Values-Stop Value (15 of 18)

Rule Name: GC2 - Manual Create Promo Card-Looped Values-Stop Value
Event Name: Value Looped

Custom Constraint List

Execute Rule If: Matches All
Name Equals GC Manual Create Promo Card
Loop Value Equals Stop

---- Actions ----

Action (1 of 4): GC2 Select Card Orders
Constraint: (blank)
Action (2 of 4): Cancel Orders
Constraint: (blank)
Action (3 of 4): Close Ticket
Constraint: (blank)
Action (4 of 4): GC2 Program Setting - GiftCard - Delete
Constraint: (blank)

GC2 Purchase & Activate (16 of 18)

Rule Name: GC2 Purchase & Activate
Event Name: Value Looped

Custom Constraint List

Execute Rule If: Matches All
Name Equals GC2 Cards to Activate
{ENTITY STATE BY NAME:Gift Cards.[:LoopValue]:GCStatus} Is Null (blank)

---- Actions ----

Action (1 of 10): GC2 Program Setting - GiftCard
Constraint: (blank)
GiftCard value: [:LoopValue]
Action (2 of 10): GC2 Create Entity
Constraint: (blank)
Card Number [:LoopValue]
Action (3 of 10): GC2 Purchase
Constraint: (blank)
Account Number [:LoopValue]
CardNum [:LoopValue]
amount {ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (4 of 10): GC2 Balance Field Update
Constraint: (blank)
CardNum [:LoopValue]
GC Balance {ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (5 of 10): GC2 Label Field Update
Constraint: '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '1'
CardNum [:LoopValue]
GC Label [?Edit/Enter a Label/Name;;{ENTITY CUSTOMDATA BY NAME:Gift Cards.{LOCAL SETTING:GiftCard}:Label};;]
Action (6 of 10): GC2 Update State GCStatus
Constraint: (blank)
CardNum [:LoopValue]
Current GCStatus (blank)
New GCStatus Activated
Action (7 of 10): GC2 Update Ticket Tag GC Number
Constraint: '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '1'
GC Number [:LoopValue]
Action (8 of 10): GC2 Update Ticket Tag GC Balance
Constraint: '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '1'
GC Balance ${ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])} (Opening Balance)
Action (9 of 10): GC2 Add Line to Text File
Constraint: (blank)
sometext {DATE} {TIME},[:LoopValue],{ENTITY STATE BY NAME:Gift Cards.[:LoopValue]:GCStatus},GC Purchased,{ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])},{ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (10 of 10): GC2 Program Setting - GiftCard - Delete
Constraint: (blank)

GC2 Purchase More Funds to Gift Card (17 of 18)

Rule Name: GC2 Purchase More Funds to Gift Card
Event Name: Value Looped

Custom Constraint List

Execute Rule If: Matches All
Name Equals GC2 Cards to Activate
{ENTITY STATE BY NAME:Gift Cards.[:LoopValue]:GCStatus} Is Not Null (blank)

---- Actions ----

Action (1 of 7): GC2 Add Funds
Constraint: (blank)
Account Number [:LoopValue]
CardNum [:LoopValue]
amount {ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}
Action (2 of 7): GC2 Balance Field Update
Constraint: (blank)
CardNum [:LoopValue]
GC Balance [=F(-1*TN('{REPORT ENTITY DETAILS:E.Balance:(EN=[:CommandValue])}'),'0.00')]
Action (3 of 7): GC2 Update State GCStatus
Constraint: (blank)
CardNum [:LoopValue]
Current GCStatus (blank)
New GCStatus Activated
Action (4 of 7): GC2 Update Ticket Tag GC Number
Constraint: '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '1'
GC Number [:LoopValue]
Action (5 of 7): GC2 Update Ticket Tag GC Balance
Constraint: '[=F(TN('{ORDER DETAILS:OT.GC#.count:(OS.Card=Ordered)}'),'0')]' == '1'
GC Balance $[=F(-1*TN('{REPORT ENTITY DETAILS:E.Balance:(EN=[:CommandValue])}'),'0.00')] (After transaction)
Action (6 of 7): GC2 Program Setting - GiftCard - Delete
Constraint: (blank)
Action (7 of 7): GC2 Add Line to Text File
Constraint: (blank)
sometext {DATE} {TIME},[:LoopValue],{ENTITY STATE BY NAME:Gift Cards.[:LoopValue]:GCStatus},GC Purchased,{ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])},{ORDER DETAILS:O.Price:(OT.GC#=[:LoopValue])}

GC2 Payment Screen-Select/Change GC (18 of 18)

Rules 18 of 18

Rule Name: GC2 Payment Screen-Select/Change GC
Event Name: Automation Command Executed

Custom Constraint List

Execute Rule If: Matches
Automation command Name Equals GC2 Select/Change Gift Card

---- Actions ----

Action (1 of 2): GC2 Change Ticket Entity
Constraint: (blank)
Name [?Swipe Card/Enter Account Number;;;]
Action (2 of 2): Display Payment Screen
Constraint: (blank)
1 Like

Printer Templates & Rules

Printer Template [1]

Manage->Printing->Printer Templates-><your default template>

ESC/POS Printer Type:

Add this line underneath any lines under the {PAYMENTS} section.

<C00> [= '{TICKET TAG:GC Balance}' == '' ? '' : 'Gift Card Balance']
<C10> [='{TICKET TAG:GC Balance}'.substr(0,6)] 

HTML Printer Type:

Place under the {PAYMENTS} and the closing table tag ( </table> )

<div align=center>[= '{TICKET TAG:GC Balance}' == '' ? '' : 'Gift Card Balance']</div>
<div align=center>[='{TICKET TAG:GC Balance}'.substr(0,6)]</div>

[1] Both printer templates use Ticket Tags (GC Balance & GC Number). If a ticket needs to be reprinted, the balance will show the balance after that transaction, not the current balance of the gift card.

Reports

Manage->Reports->Add Report

Report Name: Gift Card Report
Template: (these report could be added to your Work Period Report)[1]

[Work Period Reports:3, 1]
>Gift Card Type|Total Amount
Promo Cards Created:|$ {ACCOUNT DEBIT TOTAL:GC2 Promo Card Funds}
Promo Discounts:|$ -{ACCOUNT DEBIT TOTAL:GC2 Promo Gift Card Discount}
Promo Cards Funds Balance:|$ {ACCOUNT TYPE BALANCE:GC2 Promo Card Funds}
-----
Purchased Gift Cards:|$ {ACCOUNT DEBIT TOTAL:GC Funds}
Activated Gift Cards Redeemed:|$ -{ACCOUNT CREDIT TOTAL:GC Funds}
GC Funds Balance:|$ {ACCOUNT TYPE BALANCE:GC Funds}

[1]The 2 balance reports will show the total balance of the account(s), not the balance of the account for the dates of the report.

------------------------------------

I would also like to thank pnFz5jTZL2 (Memo) & 7IEPHxOt2f (Posflow) for their help and feedback creating this setup!

2 Likes

I’ve seen typos in some places …

lcaol1

1 Like

Good Catch! I see I made a mistake on the last image, it should be {ENTITY NAME:Gift Card}. I made the changes.

THANK YOU!

1 Like