Apps Documentation

Loyalty

Cashback loyalty program with persistent coupon codes, tier unlock gifts, and Shopify-native checkout integration.

Loyalty ProgramComing Soon

Overview

The Loyalty app turns repeat shoppers into ambassadors. Customers earn cashback on every purchase, climb through tiers as they spend, and unlock gifts at higher tiers — all without ever leaving your shop. Adverfly mints one persistent discount code per customer that tracks their live balance, so checkout is one click instead of a maze.

What's included

  • Cashback Engine — Percentage-based cashback on every purchase, with per-product / per-category overrides.
  • Persistent Customer Coupon — One Shopify discount code per customer; its value tracks the live balance via the Admin GraphQL API. No code rotation.
  • Tier System — Bronze / Silver / Gold / Platinum (configurable). Each tier sets its own cashback multiplier and can grant a one-time gift.
  • Tier Unlock Gifts — Automatic Shopify discount + storefront snippet that auto-adds the gift product to the cart.
  • Custom Earn Webhooks — One webhook URL per earn rule. Plug TrustPilot / TrustedShops / Yotpo / Zapier / your own CRM into Adverfly's webhooks/loyalty/earn endpoint.
  • Mails — Balance / after-earn / monthly summary templates with live editor preview.
  • Customer Preferences — Public preferences page (no login) for subscription opt-in/out + birthday/locale.
  • Storefront SDKwindow.adverfly.loyalty.* for custom widgets.

How it works

  1. Customer makes a purchase. Cashback accrues live (no row written — computed on the fly).
  2. On the first balance change, Adverfly mints a persistent Shopify discount code scoped to that customer. The code value = current balance.
  3. Customer goes to checkout, pastes the code → Shopify deducts their balance from the cart.
  4. Shopify fires the orders/create webhook → Adverfly debits the actual discount amount → PUTs the new value to Shopify.
  5. Customer can use the same code again on the next checkout, with the updated value.

Tier gifts work in parallel: when a customer crosses a tier threshold, Adverfly creates an automatic Shopify discount (no code entry) for that customer + the gift product. The storefront snippet shows a "Claim" button in the cart drawer; one click adds the product, the discount fires at checkout, the line drops to €0.

Getting Started

  1. Open Loyalty from the sidebar
  2. Program Basics — set your default cashback rate (3–5% is typical) and currency
  3. Tiers — define your tier ladder + optional unlock gifts
  4. Custom Earn (optional) — wire signup / review / birthday webhooks
  5. Integration — copy the Liquid snippets into your Shopify theme; install the Shopify Order webhook
  6. Mails — review and customize the three lifecycle templates

Developer docs