Logo Light

How to Build a Loyalty Points Wallet That Updates Itself

Aug 20, 2026

Loyalty programs sound simple until you actually try to track them in a spreadsheet. Every purchase should add points, every redemption should subtract them, and the balance has to stay correct no matter how many rows pile up. Most spreadsheets end up with a "Points" column that someone manually edits after every transaction — until one day the math stops adding up and nobody can tell why.

In this tutorial, we'll build a Loyalty Points Wallet — a system where each customer has a Points Balance that updates itself the moment a purchase or redemption happens. No manual edits, no recalculating the whole sheet, no drift between what's recorded and what's real.

Why this matters

A points balance isn't really "one number" — it's the result of everything that has ever happened to that customer's account. Instead of storing a number and hoping it stays correct, we'll let the system derive it from the underlying purchases and redemptions, every time something changes.


Step 1: Create the Customer Table

Start with a table to hold your customers. Add the basic fields: Name, Email, and Phone.

Customer table with Name, Email, and Phone columns, ready for loyalty trackingCustomer table with Name, Email, and Phone columns, ready for loyalty tracking

Add a few customers to work with:

  • Sarah Chen
  • Marcus Lee
  • Priya Patel

Customer table showing three records for Sarah Chen, Marcus Lee, and Priya PatelCustomer table showing three records for Sarah Chen, Marcus Lee, and Priya Patel

We'll come back to add their points balance once we have real transactions to calculate it from.


Step 2: Create the Purchase Table

Create a new table called Purchase. Add a One-to-Many field linking each purchase back to a Customer, plus an Amount field using the Currency data type (USD), and a Date field.

Purchase table with Customer link, Amount in USD, and Date columnsPurchase table with Customer link, Amount in USD, and Date columns

Add a few sample purchases so there's real data to calculate against:

  • Sarah Chen — $120.00 on 2026-08-05
  • Marcus Lee — $45.00 on 2026-08-10
  • Sarah Chen — $80.00 on 2026-08-18
  • Priya Patel — $200.00 on 2026-08-19

Purchase table listing four purchase records linked to Sarah Chen, Marcus Lee, and Priya Patel with their respective amounts and datesPurchase table listing four purchase records linked to Sarah Chen, Marcus Lee, and Priya Patel with their respective amounts and dates

Decide your earn rate up front

For this tutorial, we'll use a simple rule: every $10 spent earns 1 point. Keep this ratio in mind — it's what the next Custom Logic step will apply.


Step 3: Create the Redeem Table

Create another table called Redeem, also linked to Customer via a One-to-Many field. Add a Credit field (Number) representing how many points were redeemed, and a Date field.

Redeem table with Customer link, Credit, and Date columnsRedeem table with Customer link, Credit, and Date columns

Add a sample redemption:

  • Sarah Chen redeemed 5 points on 2026-08-19

Redeem table showing a single redemption record for Sarah Chen redeeming 5 pointsRedeem table showing a single redemption record for Sarah Chen redeeming 5 points


Step 4: Add the Points Balance Field

Now go back to the Customer table. Add a new column and set its data type to Custom Logic — this needs to be chosen from the start, since a plain column can't be converted into one later.

Adding a new column on the Customer table and selecting Custom Logic as the data typeAdding a new column on the Customer table and selecting Custom Logic as the data type

Describe the rule in plain language: for each customer, take the sum of all their Purchase amounts divided by 10, then subtract the sum of all their Redeem credits, to get the Points Balance.

Describing the points balance logic as purchase amount divided by 10 minus total redeemed creditDescribing the points balance logic as purchase amount divided by 10 minus total redeemed credit

Confirm the clarification screen once the system shows its interpretation.

Clarification screen confirming the aggregation logic across Purchase and Redeem tables to compute Points BalanceClarification screen confirming the aggregation logic across Purchase and Redeem tables to compute Points Balance

Click Save.

What just happened

The moment you saved this, every customer's Points Balance was calculated from their existing purchases and redemptions — Sarah Chen at 15 points (12 + 8 − 5), Marcus Lee at 4.5, and Priya Patel at 20 — without you touching a single number by hand.

Customer table showing the Points Balance column filled in automatically for Sarah Chen, Marcus Lee, and Priya PatelCustomer table showing the Points Balance column filled in automatically for Sarah Chen, Marcus Lee, and Priya Patel


Step 5: Watch It Update in Real Time

Let's test it. Add a new purchase for Marcus Lee — $50.00 on 2026-08-20.

Adding a new purchase record for Marcus Lee for fifty dollars on 20 August 2026Adding a new purchase record for Marcus Lee for fifty dollars on 20 August 2026

Go back to the Customer table. Marcus Lee's Points Balance has already jumped from 4.5 to 9.5 — no refresh, no manual recalculation.

Customer table showing Marcus Lee's Points Balance updated instantly after the new purchase was addedCustomer table showing Marcus Lee's Points Balance updated instantly after the new purchase was added

What this replaces

This single automatic update replaces the need to reopen a spreadsheet, find the right row, re-sum every purchase and redemption for that customer, and manually overwrite the balance — a process that's easy to get wrong and easy to forget.


Step 6: Test a Redemption Too

Now add a redemption for Priya Patel — 10 points on 2026-08-20.

Adding a new redemption record for Priya Patel redeeming ten points on 20 August 2026Adding a new redemption record for Priya Patel redeeming ten points on 20 August 2026

Her Points Balance drops from 20 to 10 immediately, reflecting the redemption without any extra step.

Customer table showing Priya Patel's Points Balance reduced after the redemption was recordedCustomer table showing Priya Patel's Points Balance reduced after the redemption was recorded


Recap

Here's what this setup accomplished compared to tracking loyalty points manually:

What you had beforeWhat you have now
A "Points" column edited by hand after every transactionA Points Balance calculated automatically from real transactions
Easy to lose track of which purchases or redemptions were already countedEvery purchase and redemption feeds the balance the moment it's entered
Balance drifts out of sync with actual activity over timeBalance always reflects exactly what's in the Purchase and Redeem tables

What you built along the way:

  1. A Customer table holding basic contact details
  2. A Purchase table linked to Customer, tracking amount spent
  3. A Redeem table linked to Customer, tracking points used
  4. A Custom Logic field on Customer that continuously derives Points Balance from both linked tables

This same pattern — a running total derived from linked activity — works for far more than loyalty points. Store credit, subscription usage, warranty claims, or any "balance that changes over time" can be built the exact same way.

Try it yourself

This Loyalty Points Wallet setup is available as a ready-made template. Duplicate it, plug in your own customers and transactions, and see the balance calculate itself from day one.

Try the Live Preview

On this page

Related articles

Explore more product articles and best practices for teams building with Ambisius.

Still Using Spreadsheets?
You Should Try This.

Turn familiar spreadsheets into a structured system built for your business

Try Ambisius for Free

No commitment. No credit card required.

Logo Light

© 2026 Ambisius. All rights reserved.