Selected work

Case study 06

Loyalty coupons. From the serial number to approval.

An internal system for the life of a loyalty coupon: issue, print, delivery, receipt, and approval. The company sells building materials and issues redemption coupons as an incentive.

Sector
Building materials distribution
Type
Internal loyalty-coupon operations
Role
End-to-end owner: operating cycle, domain model, rules, interface, permissions, and file generation

The business problem

  • Serial numbers were issued by hand, so a duplicate or a gap was easy to miss.
  • It was unclear which merchant and distributor received which number range, in which governorate and district.
  • Handover, customer receipt, and approval were separate, with no record of who did each step.
  • The same coupon could be scanned more than once.
  • Permissions were not split by department, so people could reach steps outside their job.

What the system changes

Issue time and reconciliation time are not listed.

A state for every coupon

Created, then Pending, then Preapproved, then Approved. The dashboard counts them by product type and state.

Duplicates are refused

The serial, the exchange permission, and the receipt number are unique. A repeat scan is rejected.

Tied to the field

Merchant, distributor, governorate, and district. A technician is linked to their merchants.

Delivery can be proved

The merchant’s receipt is recorded with the receipt image and the permission number. The image is not shown here.

Work by department

More than 14 roles across sales, marketing, stores, accounts, operations, and information. Separate permissions for customers, users, QR, permissions, delivery, receipt, and approval.

Coupon flow

  1. 01Issue a QR batch: Created
  2. 02Exchange permission: Pending. Reprinting is locked
  3. 03Rep delivers to the merchant, with a receipt image
  4. 04Customer receipt, then a first scan: Preapproved
  5. 05Approval scan: Approved. A repeat scan is refused
  6. 06Dashboard by type and state

Information

  1. Issue and follow-up

Marketing and sales

  1. Permissions and exchange

Stores

  1. Delivery

Accounts

  1. Approval

Technicians, merchants, and distributors are linked to the coupon. They are not all system users.

Technical architecture

No names, national IDs, phones, or receipt numbers.

PresentationASP.NET Core 9 MVC, Razor, Bootstrap, jQuery
BusinessValidation, QR, PDF, Excel, and Word
DataEF Core 9 on SQL Server
IdentityASP.NET Identity plus custom permissions on the role and the user
QRQRCoder and ZXing.Net
Languagear-EG and en-US