Monday, March 04, 2013

Rewards API - for retail customer loyalty

Below is a spec for Rewards API for customer loyalty programs I came up with. The idea is to keep track of customer purchases by providing them with a store specific card and offer them a financial reward (such as 10$ for every 100$ spent in a month) in return of their spending at the store.

This API can be exposed as a SOAP or other remoting technology and integrated into POS systems.

Key usecases:
1. Customer enrolls in to loyalty program
2. Customer purchases are recorded and points get accumulated
3. Customer redeems rewards points accumulated in his account
4. System clears points accumulated that were not used at the end of every month

Data Model:
Customer_Card
Cardid--firstName--lastName--address--enrollDate

Card_Points
cardId--points--expirationDate
123 80 3/31/2013

Card_Purchases
cardId--purchaseDate--grossAmount
123 3/5/2013 45.0$

Points_Multiplier
pointsMultiplier
0.25

Rewards_Points
points--rewardAmount
100 10$

Application Programming Interface (API) Specification
Integer enrollCustomer(Customer)
void deleteCustomer(int cardId)
void updateCustomer(int cardId, Customer customer)
Customer getCustomer(int cardId)

Double getPointsBalance(int cardId)
Double getPointsMultiplier()

Double addPoints(cardId, purchaseAmount)
Double redeemPoints(cardId)

Business Rules:
- Points expire at the end of every month
- Points_Multiplier specifies how many points there are for 1$
- Rewards_Points specifies how many dollars are rewarded for points

1 comment:

Unknown said...

Thank you for sharing such a lovely post. The web-stores selling products online offer great promotional offers in order to retain the loyalty of the customers. Introducing Rewards programs for shopping at their web stores, they enable the customers to claim additional benefits, thereby aiming at overall customers satisfaction.