Joy Loyalty SDK
Introduction
Joy Developer Toolkit (JDK) was built with the mission to empower developers to create completely custom-builds for the Shopify store
You can use JDK to retrieve and display customers' information, redeem points for rewards, open or close the widget, etc.
Getting started
Include the Joy Js script on each page of your site to access all the functionality of Joy's javascript library. The script should always be loaded directly from https://static.joy.so rather than included in a bundle or hosted yourself.
<script async src="https://static.joy.so/avada-joy.min.js"></script>Once this script is loaded on your store, or you install the Joy app on your Shopify store, you will be able to access the joyInstance global object with all of its methods.
Authentication
Before going further, make sure you generate your Secret key at Settings > Developers > Manage keys.

Liquid authentication
Webview
This is an example KoaJS example for the web view render of the Joy widget.
Events
SDK-ready events
In order to run after the SDK is loaded, you can listen to the event joy:ready
Other app events
Each time customers redeem coupons successfully, you can listen to the event joy:redeemCoupon
Each time customers revoke coupons successfully, you can listen to the event joy:revokeCoupon
Each time customers apply coupons successfully, you can listen to the event joy:applyCoupon
Last updated