SDK
Overview
The Growave SDK provides developers with powerful tools to interact with and extend Growave’s functionality on your Shopify store. The SDK enables you to listen to events, interact with widgets, and use methods for seamless integration with Growave applications. Whether you’re automating widget interactions or responding to specific storefront events, the SDK offers a flexible, scalable solution.
Prerequisites
Before using the SDK, ensure that:
- You have a Shopify store.
- The Growave: Loyalty & Wishlist + application is installed in your Shopify store.
SDK initialization
The SDK initializes automatically when the Growave app loads on your page. This occurs when the Growave script is loaded and the app is fully running. The SDK helps you to:
- Listen to events: Respond to events such as widgets being injected, opened, or closed, or products being added to a wishlist.
- Use methods: Interact with widgets or applications within the Growave ecosystem. These methods allow you to perform tasks like opening a drawer only when the widget is ready.
SDK modules
The SDK is modular, with modules registering themselves as specific Growave apps are started. Each module triggers an event when it’s ready. This modular approach lets you interact with different parts of Growave based on the apps you’ve enabled.
Available SDK modules
- Common module: Provides general utilities and constants. Available once the SDK is ready.
- Authentication module: Handles user authentication processes. Available when authentication tasks are required.
- Reviews module: Manages product reviews. Available when the Reviews app is active.
- Rewards module: Manages customer rewards and loyalty programs. Available when the Rewards app is active.
- Wishlists module: Handles wishlist functionality. Available when the Wishlists app is loaded.
Benefits of using the SDK
The Growave SDK simplifies development by reducing the need for custom code to interact with Growave. It provides direct access to Growave applications, enabling you to:
- Automate interactions: Use SDK methods to automate tasks, like opening drawers or authenticating users.
- Respond to events: Listen for specific events and trigger actions to ensure your storefront behaves as expected.
- Expand functionality: Leverage new methods and events as the SDK evolves, allowing for greater customization.
Future expansion
The SDK’s current capabilities are just the beginning. As Growave evolves, the SDK will expand with new methods, events, and modules, ensuring it continues to meet developers' needs as they build and enhance custom storefronts.
Conclusion
The Growave SDK is a robust toolset for integrating and extending Growave within your Shopify store. By using the SDK, you can create a more dynamic and interactive storefront, reducing the need for custom code. As the SDK grows, it will unlock even more opportunities for customization and innovation in your projects.