An open library of custom blocks for subscription customer portals
All blocks
No. 19Upsell

Subscription Product Upsell Incentive

An extra first-order discount for adding a product to the subscription.

Elliot MitchellLinkedIn
Preview animationNeeds a live customer portal to run
Customer portal · Subscription Product Upsell Incentive
Subscription Product Upsell Incentive 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 limited-time offer card in the customer portal: one product, its first-order price and a live countdown. One click adds the product to the subscription as a recurring item and applies a discount code, so the subscriber gets an extra discount on their first order with it. The card only shows on active subscriptions that don't already include the product, and it hides itself when the countdown ends.

Why it exists

For subscription brands that want existing subscribers to add products as recurring items, not one-off add-ons. A first-order discount with a deadline is an easy yes, and every product added this way keeps shipping on future orders.

The code

Paste it as-is, or download subscription-product-upsell-incentive.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, so the card stays hidden until you fill in the CONFIG block: skioVariantId (the Skio ProductVariant id of the product to offer), discountCode, and the product's title, image URL and price (the image is a sample). Create one Shopify product discount code per offered product; if it should only cover the first order, set that limit in Shopify. Set offerEndsAt to your deal's end date: the card hides itself after it (the sample date is 28 Nov 2026). The 10% in the badge, copy and messages is written out, so change it there too if you change discountPercent. After a successful add the page reloads (reloadAfterMs) and the new line carries a _source: portal-upsell attribute. The discount code is applied client-side, so set usage and expiry limits on it in Shopify. 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>