How to make a coupon reminder using Joy SDK

Introduction

If customers can’t see their reward, they won’t use it. In a few lines, the Joy SDK gives you the signals to surface a tiny, on-brand reminder—right where it helps. Under the hood, we call rewardList (optionally with filters like isAvailableCoupon: true), sort for the newest unused coupon, and render a small UI.

What we’re building (tl;dr)

  • A small, dismissible UI that shows the latest unused coupon for the logged-in customer

  • No duplicates: if the same code is already in the cart, we don’t render

  • Looks native to the theme (rounded card, soft shadow, single CTA)

  • Theme Editor preview: shows a mock coupon so merchants can style it (even without live data)

This is one of many “micro-UIs” you can craft with the Joy SDK. Start here, then remix it for cart drawers, price chips, or toasts.

Get our hand on

To demo what’s possible with the Joy JS SDK, let’s craft a Shopify implementation that uses joyInstance.rewardList to show a helpful coupon reminder.

As a custom liquid block

This example adds a coupon reminder to your Online Store. It checks whether the customer has unused coupons in Joy; if so, it surfaces a reminder. If the customer already has that same code applied in the cart, it stays hidden.

Steps to take:

  1. In the Theme Editor, add a Custom liquid block where you want the reminder to appear.

  2. Set the block’s top/bottom padding to 0 so the fixed card doesn’t add extra white space.

  3. Paste the script scaffold below and replace the placeholders with your utilities/styles.

More flexibility with a Shopify section block

Prefer a reusable, configurable section? Create sections/loyalty-rewards-bar.liquid. Expose a few settings so merchants can edit copy, colors, and layout without touching code.

Steps to take:

  1. Create a new section file and add style rules for the fixed wrapper and card.

  2. Add settings for message, button text, colors, max width, padding, bottom offset, and z-index.

  3. Implement the same joy:ready → rewardList → filter unused → de-dupe /cart.js → render logic.

  4. In Theme Editor (Shopify.designMode === true), render a mock coupon (e.g., JOY-PREVIEW10) so styling is easy.

What’s more from here

You can use the same recipe to craft any custom section, block, or inline UI:

  • Cart drawer row: “You have {discount} — code {code} [Apply]”

  • Price chip on PDP: subtle pill next to the price; tap to copy/apply

  • Add-to-cart toast: quick reminder with an Apply action

  • Account rewards list / VIP tier blocks: show all unused coupons, expiry, and actions

Pattern to remember: rewardList → filter unused → de-dupe against /cart.js → render a tiny, on-brand UI → dismiss/auto-hide politely.

Last updated