Table of Contents

Our previous article explored how travel companies can use blockchain to enhance loyalty programs, focusing on generating users’ engagement and participation as a community. This article outlines an architecture and design plan for travel companies in the Web3 era. Specifically, it details a proof of concept (PoC) solution to enable a shared loyalty program through permissioned blockchain technology. The system allows users to own their shared points, use them through different companies, and share them with others.

 

Architecture

Business Rules

  • There are two loyalty point types: local program points and global program points.
  • Each company manages its own rules for each loyalty program type. The backend off-chain handles the local program, and the chaincode handles the global program.
  • When the customer wants to use their loyalty points, the total points are the sum of local and global program points.
  • Only global loyalty points can be transferred to other users.
  • The current implementation allows a user to sign up and access any company.
  • The architecture allows a separate sign-up/in-process per company. When a customer signs up for any company, it must be checked whether the user exists in the global loyalty program; if the user exists, it must be linked to the new company; if it doesn’t, it must be created.

 

Architecture Description

The PoC is built using Hyperledger Fabric with the following architecture:

  • Each organization represents a company (i.e., Travel Agency, Airline, Hotel, etc.)
  • Each company's applications connect to corresponding nodes within their group. This allows each company to manage its customer loyalty points rules or collaborate with other companies.
  • The MSP of each organization manages identification per company. Users can belong to one or more than one company within the loyalty program community.
  • All organizations are part of a global channel. There is only one channel since the idea is that users within this program can use the points in any company that participates in the program and be able to share the points with other users.
  • There is only one orderer peer.
  • Backend code manages data off-chain. This backend manages the company's local loyalty program and integrates with the global loyalty program, allowing each company to manage its own rules but be integrated into a greater ecosystem.

 

Chaincodes and Channels

There is only one channel, as per reasons explained in the architecture section, and it includes the following chaincodes and backend:

User: Manages a unique user that belongs to one or more companies. Essential functions to provide are:
  • CreateUser: Creates a new user. It contains an array of companies to which the user belongs.
  • UpdateUser: Updates company data.
  • ManagePoints: Adds/reduces points to the user and updates the attribute rewardSources (an array where all the points transactions are stored).
  • TransferPoints: Manages the transfer points. This function is invoked by the rewardIngestion chaincode.

 

PointsConversion: Manages what rules apply for converting points to dollars (fiat) and how many points a user can earn by action (i.e., for comment, confirm comment). These rules are for earning and using points and can be defined per each organization. The primary functions to provide are:
  • SetConversionRules: Points per item (Points to fiat).
  • SetJoininRewardPoints: Points per joining.
  • SetReviewPoints: Points per review.

RewardIngestion: Manages all the logic for all types of rewards, transfers, and redeems. The primary functions to provide are:
  • EarnPoints/EarnPointsByReview/earnPointsByConfirmation/ earnPointsByConfirmationOwner/ joiningRewards/ redeemPoints: This function gets the current conversion for the ORG provided, updates the user points, and stores the transaction.
  • TransferPoints: Invokes the user chaincode to update the user points and store the transaction.

 

Off-chain backend includes the following logic:
 Company: Manages a company entity information.
      • CreateCompany: Creates a new company.
      • UpdateCompany: Updates company data.

 

User: Manages a unique user that belongs to one or more companies.
    • CreateUser: Creates a new user.
    • UpdateUser: Updates user data.

 

LoyaltyPoints: Manages rules for local loyalty program and integration with global loyalty program:
  • ActionToPointsConversion: Points per item (dollars, review).
  • PointstoFiatConversion: Dollars per point.
RedeemTotalPoints: This is a core function that decides whether the points to redeem are enough just with local points, whether a combination of local and global points is needed, or whether there aren’t local points and all the points to redeem are global.

 

Dapps

For the sake of this use case and to show the implementation of this architecture, we decided to develop two Dapps: one that simulates an airline e-commerce site and the other a travel agency.

For each app, we create:

  • Three dummy users.
  • Log in with any of those users.
  • For the airline, put a fixed number of airline tickets.
  • For the travel agency, set several Hotel/Room options.
  • Have a list of airplane trips and hotel stays that the user can review.
  • Add the functionality for booking airline tickets or hotel/rooms.
  • Add functionality for checking points’ status.
  • Add functionality for reviewing points history (earned and used)
  • Add functionality for transferring points.
  • Connect booking and review actions to loyalty points functions.

 

Conclusion

In this article, we saw that a permissioned blockchain such as Hyperledge Fabric with Dapps is an excellent fit to solve use cases like the shared Loyalty Program for Travelers.

This solution provides the use case with a solid foundation to connect all organizations participating in the ecosystem. It gives each of them a transparent and trustworthy implementation without ceding ownership to a third-party organization. Also, this allows each organization to define its rules regarding its customers and points usage and allows the end user to be part of a system that offers more possibilities for using its loyalty points.

In Encora, we have created deep expertise in Web3 and decentralized solutions using technologies like Hashgraphs and blockchain. This expertise can help our clients find new and better ways to solve their opportunities related to traceability, transparency, and trust, whether B2C or B2B.

 

Learn More about Encora

We are the software development company fiercely committed and uniquely equipped to enable companies to do what they can’t do now.

Learn More

Global Delivery

READ MORE

Careers

READ MORE

Industries

READ MORE

Related Insights

Online Travel Agencies: Some Solutions to changes in booking and commission attributions

Discover how we can simplify travel changes for both travelers and OTAs using blockchain and ...

Read More

The AI-Powered Journey: How AI is Changing the Face of Travel

As travel elevates itself into an experience where every journey is as unique as the travelers ...

Read More

Enhancing Operational Excellence with AI: A Game-Changer for the Hospitality Industry

By AI, the hospitality industry can offer the best of both worlds: the efficiency and ...

Read More
Previous Previous
Next

Accelerate Your Path
to Market Leadership 

Encora logo

Santa Clara, CA

+1 669-236-2674

letstalk@encora.com

Innovation Acceleration

Speak With an Expert

Encora logo

Santa Clara, CA

+1 (480) 991 3635

letstalk@encora.com

Innovation Acceleration