An open library of custom blocks for subscription customer portals
All blocks
No. 20Retention

Gift Picker

Subscribers pick one free gift for their next order.

Jordan BryantLinkedIn
Preview animationNeeds a live customer portal to run
Customer portal · Gift Picker
Gift Picker preview

This block reads live subscription data, so it only runs inside a real customer portal. The animation shows what subscribers see.

What it does

A “A gift is waiting for you” card in the customer portal. The subscriber reveals the gift options, picks one, and it's added to their next order at $0 as a one-time item. Once they've claimed it, the card says “You claimed the [gift]” and the other options lock across all their subscriptions and past orders. It only shows on active subscriptions during the campaign dates, can be limited to subscriptions created between two dates, and hides itself if anything fails.

Why it exists

For subscription brands running a limited-time thank-you, like a December gift for subscribers who joined over Black Friday. Picking the gift is something subscribers do themselves, so they know it's coming, unlike a surprise item they might never notice. The merchant controls the window and who qualifies, each subscriber gets one gift in total, and claimed gifts still ship if the card is removed.

The code

Paste it as-is, or download gift-picker.html

How to install

  1. Copy the code above, or download the .html file.
Your portal
  1. Go to Storefront → Customization → Blocks, then click Add block → Custom block.
  2. Name it and paste the whole file into the code editor.
  3. Swap anything the file asks you to, like [BRAND], product names or Quick Action IDs. The AI prompt below can walk you through it.
  4. Save, drag it where you want it in the layout, then Publish. Check it on a test subscription’s magic link with ?forcePreview=true, since some scripts don’t run in Preview.
Before you paste

It ships unconfigured: the three gifts in SETTINGS are placeholders (platformId REPLACE_ME), so the card stays hidden until you add your own. In Shopify, create a gift-only product for each gift, priced at $0 and kept off the Online Store; the block never sends a price, so a gift bills at its variant's own price. For each gift, set its Shopify variant ID (platformId), title, image URL (https only) and an optional value, shown as “worth $X” (leave it at 0 for non-dollar or multi-currency stores). Set campaignStart and campaignEnd (the sample is 1–31 Dec 2026) and, optionally, eligibleCreatedFrom and eligibleCreatedTo to limit it to subscriptions created between two dates. Write dates with a time zone offset, e.g. 2026-12-31T23:59:59-08:00. Dates are checked against the customer's device clock, and migrated subscriptions carry their migration date. The gift line carries two properties: _holidayGift (set by campaignTag, sample “2026”) and _loyaltyFreeProduct: true (lockProperty), which keeps the gift as a reward the subscriber can't change. Rename them if they clash with an app you use, or set sendAttributes to false. Known limits: the one-gift rule runs in the browser, so a customer using developer tools could add a second gift (a Shopify Flow that holds orders with more than one gift item catches it). Right after “Get now”, Skio takes about 25 seconds to clear the one-time line, so ordering again in that gap ships the gift on another order too. Test on a live subscription page; the admin preview doesn't run block code. It uses Skio's portal API (fetchSkioAPI), so it needs a Skio customer portal.

Customize it with AI

Paste this prompt into Claude Code or Codex. It asks for the code and your brand and product details, then writes a version for your store.

Blocks are shared as-is by the people who built them. Read the code before you add it to your portal, and test it with a test subscriber first.

Built a custom extension your subscribers love?

Share it with us, we'll review it, we'll get it live, then we'll add it to the site so anyone can copy + customize.

your-block.html
<!-- your-block.html -->
<div class="my-block">
  <p class="my-block__title">Your next order ships Friday</p>
  <button class="my-block__cta">Add a bonus item</button>
</div>

<style>
  .my-block { padding: 20px; border-radius: 16px; }
  .my-block__cta { background: var(--brand); }
</style>

<script>
  // read the subscription, then do the useful thing
  const sub = window.__subscription;
</script>