The tokengating app was developed to enhance Shopify's capabilities by integrating Web3 technology.
It aimed to provide a guide for merchants on creating tokengate apps, ensuring both experienced and new merchants could leverage Web3 to offer exclusive experiences to their customers.
Merchants needed a way to offer exclusive products, discounts, and content to specific token holders, enhancing customer loyalty and engagement through blockchain technology. There was also a need to educate merchants on the best practices for integrating tokengating within their Shopify stores.
The final solution is a robust tokengating app that:
A tokengate defines token requirements that determine who can unlock exclusive content. It consists of a segment (defining which tokenholders can pass) and a reaction (the outcome, such as a discount). Merchants configure these gates, which are evaluated against blockchain data and presented to customers with a wallet connection experience. Example: A merchant might offer an exclusive discount to token holders of smart contract 0x1234...5678.
A tokengate defines token requirements that determine who can unlock exclusive content. It consists of a segment (defining which tokenholders can pass) and a reaction (the outcome, such as a discount). Merchants configure these gates, which are evaluated against blockchain data and presented to customers with a wallet connection experience. Example: A merchant might offer an exclusive discount to token holders of smart contract 0x1234...5678.
Tokengating apps enable merchants to gate access to products, promotions, and content based on a customer's Web3 wallet contents. Key requirements include programmatic representation of gated statuses using metafields for both orders and products.
The app stores the merchant's gate configuration in the GateConfiguration model and binds it to products through the GateSubject model. Only the app that created these configurations can update or delete them.
The app displays gate configuration data to customers using a theme app extension or a custom storefront built with Hydrogen or the Headless channel. Key responsibilities include: