The following sections describe the high-level architecture of the digital coupons ecosystem built on distributed ledger technology (particularly Hyperledger Fabric).
The architecture describes four popular digital coupon use cases and explains how they can implement to address collaboration, digital fraud, and dispute resolution issues.
Besides DLT, the high-level architecture diagrams rely on well-known building blocks to communicate the intended design: databases, message queues, event listeners, workers, and more, which make up the infrastructure and backend of the solution.
Mobile apps, internal sales, admin portals, and public websites represent the front end.
The digital coupon journey starts with a merchant or brand sales manager creating and submitting campaigns to a distributed ledger. The campaign consists of targeting (zip code, age, interests, etc.) and associated coupons in its simplest form.
The coupons can be an individual asset or just a counter on the campaign entity in case the number of coupons is vast.
The campaign and coupons form a so-called coupons pool that limits the total number of coupons related to the campaign.
A distribution service that learns about new campaigns from chaincode events propagated via organization peer nodes indexes the pool.
The distribution service constantly runs its matching routine (CRON batch job) by trying to find customer profiles corresponding to campaign targeting. Whenever it finds a match, it takes one coupon from the pool, links it to a coupon token on private off-chain storage (Private Data Collection), and transfers it to the customer.
Additionally, it can enhance batch matching with real-time events triggered by the purchase of goods or referrals (see Referral program).
The coupon token is a secure intermediary containing only the required information for customers to redeem the coupon. It ensures that the redemption transaction is validated and approved by both merchant and distributor. Since blockchains stores the PDC hash, merchants can validate that the coupon token was linked to the exact campaign.
Upon redemption, merchants validate the coupon token and exchange it for an actual coupon ID so that the platform protects both merchant and distributor. In addition, merchants can link it back to the campaign and approve the discount (convert coupon) with a valid customer profile and coupon ID.
The entity-relationship diagram illustrates coupon distribution and redemption use case data entities.
The Hyperledger Fabric uses key-value storage (LevelDB) or document storage (CouchDB) as a backend. Therefore, there are no referential integrity guarantees except those based on cryptography (transactions and block hashes).
Merchants can narrow down the set of available distributors to preferred ones by using additional campaign entity attributes such as channels and commissions, for example, choosing the lowest commission over the number of channels.
Campaign targeting implementation depends on security requirements. Teams can perform targeting over public (stored on blockchain) profile attributes, such as zip code. This can be easy to implement, and matching can be quite flexible but limited to non-sensitive data.
Distributors can run set intersections over private data collection hashes of campaigns and customer profiles targeting attributes for private or secure matching.
The downside of the approach is that matching is strict - the number of PDCs with static schema should be created and pre-populated for each matching case, possibly increasing the burden and lowering solution scalability.
Websites with deals or portals are different from traditional coupon distribution services since customers search for coupons before shopping online or in-store.
However, the design of the merchant sales application does not change as much. Instead of campaigns, it creates deal search services offered to potential customers with constantly indexed deals.
Whenever a customer purchases a deal via traditional currency or loyalty points (see Loyalty program), the dealer service creates a voucher token, links it to the original deal, and transfers it to the customer.
On purchase, customers receive push notifications on their mobile app with the deal voucher and redemption details.
The digital voucher redemption flow is similar to the one described above (see Secure distribution).
This is where customers' mobile app presents QR code to merchants' POS terminal, which the voucher token and customer profile validate, and they exchange it for the original voucher.
Companies often use deal websites for promo-code distribution.
However, when companies distribute promo codes to enterprise blockchain applications, they are severely limited because of their natural transparency.
Merchant applications can use loyalty points or tokens to reward frequent customers. Customers can then use the points as an alternative payment system within the blockchain network.
The system enables a blockchain-based digital coupons store or marketplace where customers exchange loyalty points for coupons or vice versa. From an architecture and design perspective, merchant sales application remains roughly the same, but a new party joins the network, a loyalty points (tokens) issuer service.
It plays the role of a bank, minting the initial amount of loyalty points and selling them to merchant applications.
Customers can acquire loyalty points in batches through the exchange portal or issued automatically every time a merchant decides to reward loyal customers.
Loyalty store services should possess similar indexing capabilities to dealer marketplaces to allow coupons and deals to be easily found and exchanged by customers. Same as before, merchants take the coupons from campaign coupon pools.
Upon successful transaction, the loyalty store is responsible for issuing and transferring the coupon token to the new owner and updating the index.
Besides, customer applications' loyalty points balance tracking capabilities, the coupon management, and redemption flows remain the same (see previous sections).
Eventually, the loyalty store accumulates a significant amount of loyalty points. Customers should keep part of it in an internal wallet to ensure consistent loyalty points for coupon exchanges. However, the remainder can be returned to the points issuer service for a reward.
The referral program allows customers or end-users to play distributor roles and get rewarded for converted referral coupons with loyalty points (see Loyalty store).
A merchant application is usually responsible for issuing enough referral coupons to incentivize new customers to visit the store or shop online. When referring a friend, a customer application creates a referral request with a target user ID. Then, the coupon distributor service fulfills the requests using the matching mechanism described in previous sections.
However, the interaction is real-time, where matching happens sooner as the distribution service receives an event from an organization endorsing a peer.
The distribution service creates and transfers the coupon to the referred customer when they find an appropriate match. The customer receives a corresponding push notification and finds the coupon in their wallet. Upon a successful coupon redemption, merchants reward the referring customers with loyalty points that can be exchanged for coupons or deals later (see Loyalty store and Deals marketplace).
More Solutions to Explore
The existing solution architecture and distributed ledger technology to implement more advanced solutions, and integrations, include:
Home