Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.glood.ai/llms.txt

Use this file to discover all available pages before exploring further.

Glood Upsell Promotions add two merchant-controlled promotion types to your store that live on the PDP and inside the cart drawer / cart page. Both are powered by Shopify Functions (one Discount Function per type plus a shared Cart Transform Function), so the discount and gift logic survive checkout authoritatively.

The two promotion types

Product Upsell (Buy X Get Y)

Trigger by a specific product. When a customer buys X, they can add 1+ pool items (Y) at a configured price: flat price, percent off, or a fixed amount off. Per-pool-item pricing overrides supported.

Free Gift (cart-value tiers)

Trigger by cart subtotal crossing one or more thresholds. The chosen gift variant is auto-added to the cart at €0 by the Cart Transform Function — no manual checkout step.
Each promotion type registers as its own entry in Shopify’s “Select discount type” modal so the merchant always knows which one they’re creating:
  • Glood Product Upsell (Buy X Get Y) — pick offers
  • Glood Free Gift — cart-value tier offers

What the customer sees

On the product page

When a merchant has placed the Glood Upsell for PDP theme block:
  • Title + subtitle describing the offer (e.g. ”+€1 Add-On Gifts — Choose premium accessories for just €1 with your NAS purchase”).
  • Slot meter — “You have 1 add-on gift slot.” | “1 / 1 Selected” — adapts live as the customer changes the main-product quantity (slot count = slotsPerMainQty × qty, capped at maxSlots).
  • Pool item cards — checkbox + thumbnail + product name + price (struck-through compare price). The selected card expands to reveal a quantity stepper and, if the product has multiple variants, a variant selector.
  • Free-gift section — one panel per active free-gift offer (highest priority wins if multiple exist). Each tier renders as a card with three states:
    • Locked — “Spend €X more to unlock”
    • Auto-added (eligible, server-side Cart Transform pending)
    • ✓ In cart (gift line confirmed present)

In the cart drawer / cart page

The Glood Upsell for Cart block surfaces:
  • Free-gift progress and “Auto-added” / ”✓ In cart” states (same as PDP).
  • Pick offers triggered by the current cart contents but not yet redeemed (“Complete your order with…”).

How offers are wired

LayerPick offer (Buy X Get Y)Free-gift offer (cart-value)
Shopify Discount Functionupsell-offer-discount — applies per-pool-item pricingupsell-free-gift-discount — applies 100% off on auto-injected gift line
Cart Transform Functionupsell-cart-transform — injects the gift variant at $0 when threshold met
Storefront-readable dataproduct.metafields.glood.upsell_pick_offers (json, on each trigger product)shop.metaobjects.glood.values filtered by key == 'upsell_free_gift'
The canonical JSON shape is the same across admin API, Shopify metafields, and the storefront blocks — see web/backend/common/services/upsellOfferDiscount.js#toCanonicalPayload in the app codebase.

Setup

  1. Install the Glood app and ensure your plan includes the Upsell Promotions feature.
  2. From the Glood admin → Upsell Offers → create a pick or free-gift offer. Save and set status to Active.
  3. In the Shopify theme editor:
    • Open a product template → click your product-info section → Add block → search “Glood Upsell for PDP” → drag under the description.
    • Open the cart-drawer section (and/or /cart page section) → Add block → search “Glood Upsell for Cart” → drop in.
  4. Visit a triggering product page or add a triggering product to the cart — the block renders the offer.
Shopify’s Cart Transform Function requires at least one existing cart line to anchor the injected gift. Configure free-gift offers with minSubtotal > 0 so the customer has added something before they qualify.

Multi-tier free gifts

Free-gift offers support either cumulative or exclusive tier stacking:
  • Cumulative — every qualifying tier grants its reward. Customer crossing €50 and €100 thresholds gets both gifts.
  • Exclusive — only the highest qualifying tier grants its reward. Customer crossing both thresholds gets only the €100 gift.
Set the mode in the Glood admin per offer.

Combinations with other discounts

Each promotion’s combinesWith flags map directly to Shopify’s discount-stacking model:
Glood admin fieldShopify combinesWith.*
Combine with other Glood offersproductDiscounts: true (lets multiple Glood offer lines coexist)
Combine with Shopify automatic discountsproductDiscounts / orderDiscounts: true
Combine with Shopify discount codesproductDiscounts: true (Shopify’s automatic-vs-code rule lets a code stack on top)

Next steps

Theme integration & JS hooks

Wire the block into custom themes, integrate the native variant + quantity selectors, and use the window.Glood.upsell pub/sub bus to react to selections, qty changes, and cart updates from your own theme code.