Loyalty is important for all businesses. The propensity for repeat purchases is driven by many factors. These could be emotional, like brand affinity or premium status, or tangible benefits, such as discounts based on purchase behavior.
In this blog, we will examine how to extend a typical loyalty program to multiple parties so that a business ecosystem may be created. Multi-partner loyalty programs increase customer engagement and spending. We will also see how to reduce the technology and operational complexities of running such a loyalty program by using Daml smart contracts. As you will see in this post, Daml is a powerful platform to create these multi-party workflows while being extremely simple to read and understand.
Let’s consider a simplistic loyalty program comprising two businesses: a fitness center and a grocery store. Each business offers customers discounts against purchases.
In our use case, each business also has the power to have those points redeemed at the other business. This kind of collaboration is logical—a fitness center will want to incentivize customers to buy healthy foods, and a grocery store may want to help customers meet their aspirations, thereby altering their grocery lists in a win-win for both parties.
Moreover, this arrangement also creates a customer experience that typical loyalty programs do not provide today (with the exception, perhaps, of airline miles programs, to some extent).
As may already be obvious, creating this kind of collaboration between two entities is not trivial (creating a bridge to exchange data reliably and in a timely manner being one of the challenges). We also have the issue of data privacy: traditional technology creates data silos (at either business), and over time, keeping these silos in sync becomes a program of its own.
In addition to data and privacy, we also need to keep the business rules in sync. When the parameters change, they must be made available to the software programs at either business, and must go through elaborate change management depending on how they are deployed.
Finally, we run into one of the most challenging problems of all: managing customer identity. Customers at either businesses must always be kept in sync, using some kind of an identifier. Even if it is something like a phone number or email address, these can easily be changed, potentially leading to reconciliation issues.
Typically, the concept of a multi-party collaborative model looks like this: two infrastructures kept in sync through data transfers, separate business process implementations, and constant reconciliations, causing a disjointed customer experience.
To solve these problems of data and process islands in legacy architectures, Daml emerges as a good choice to integrate the customer experience across enterprise and department boundaries.
It must be noted that deployment complexities and the need for physical separation of data is addressed because multiple businesses can either share a cloud deployment with logical segregation of data (same cloud DB), or have completely independent databases on two different clouds. However, the two datastores are automatically synced by Daml, thus eliminating reconciliation needs and pushing the complexity under the hood.
Here’s what a Daml-based architecture that provides a golden source across enterprise boundaries looks like.
We’ll demonstrate the overall business process as represented below.
When a customer signs up at either the fitness center (business1) or the grocery store (business2), they are created within that business per their current process.
In addition, they are also created using the provided Daml APIs in the new, multi-party loyalty platform. A shared Daml customer contract is automatically created, which has only the data elements that both businesses should be allowed to see, per the agreement with the customer. That way, the privacy of the customer is preserved.
This is what Daml looks like when the customer requests to open an account:
A Daml contract called OnboardingRequest is created. The customer is the signatory—the Daml way of saying that the customer has an obligation to honor the contract. On this contract, the business can accept and create the customer contract. They can also notify the right business partners for everyone to have access.
To do that, we add a right called ProcessApplication on the OnboardingRequest. Daml controls who can access this right with the keyword controller. In this case, the business to which the customer requested to be onboarded has the right to complete the onboarding.
As you can see, the network partner is also notified, so they have access to the resulting contact called CustomerContract.
All three parties now have access to this contract; the customer and the original business are the signatories. We could also create an approval process for business2, but for the sake of simplicity, we’ll not show it here.
The customer has the right to SpendMoney, which triggers the issuance of LoyaltyPoints and also a PartnerNotification by the business where the spending happens.
Since actions (choice) in Daml have what are called controllers, only the specific parties can take a specific action. So, a choice that allows the fitness center to update the fitness routine of the customer cannot be executed by the grocery store. This leads to tremendous efficiencies in the way rights amd obligations are managed. The complexity is abstracted away from the developers and baked into the Daml smart contract layer.
Here’s how onboarding and subsequent actions take place conceptually in a Daml-based architecture. As you can see, the smart contracts layer simplifies maintenance of a golden source. No more reconciliations are needed.
Loyalty is an important driver of customer engagement. As the demand for new digital customer experiences increases, collaboration between businesses favored by the customers promises to be an important driver of growth and engagement. With Daml, multiparty collaboration is simple and flexible—and enterprise grade. Read more here to see how Daml promotes this while maintaining privacy and interoperability.
Have you checked out our new Wallet Sample App?