2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed
Loyalty

Referral with store credit

Every new customer gets a personal 10% code to give to friends; when a friend pays their first order with it, the customer who shared it gets store credit.

How it runs.

It starts in Shopify: no form involved.

Workflow 1Give every customer a code

  1. TriggerCustomer created
  2. Action 1

    Create the customer’s discount code, REF followed by their id, 10% off, once per customer (“Send Admin API request”: discountCodeBasicCreate)

  3. Action 2

    Save it in the customer metafield custom.referral_code

Workflow 2Reward the referral

  1. TriggerOrder paid
  2. ConditionCheck if
    • The order used a code starting with REF, it is the buyer’s first order, and the code is not the buyer’s own

    Otherwise the workflow stops here.

  3. Action 1

    Credit 10 in the shop’s currency to the store credit of the customer who shared the code (storeCreditAccountCredit)

  4. Action 2

    Email them (the file sends it with a “Send HTTP request” to Resend)

What you need, and how to install it.

What you need
  • Shopify Flow, free in Shopify
  • Plan: Every plan The codes and the credit live in Shopify; showing them needs customer accounts.
  • Element: customer-metafield="referral_code" in the account, to show the code, with a link to share next to it: any page with ?discount= and the code adds it to the friend’s cart
  • Element: store-credit in the account, to show the credit received
  • A customer metafield definition custom.referral_code (single line text) with Customer Account API read access: without it, the account cannot show the code
  • Shopify’s new customer accounts, which store credit needs
How to install
  1. Install Shopify Flow from the Shopify App Store. It is free in Shopify, but it is a separate app.
  2. Place the Smootify element in Webflow: customer-metafield="referral_code" in the account, to show the code, with a link to share next to it: any page with ?discount= and the code adds it to the friend’s cart.
  3. Download the .flow file and import it in Shopify Flow.
  4. Set the discount in workflow 1 (0.1 is 10%) and the credit in workflow 2 (10.00), and say both on your site.
  5. In workflow 2, replace YOUR_RESEND_API_KEY with your Resend API key, set a sender on a domain you verified in Resend instead of noreply@example.com, and point the button to your Webflow site instead of www.example.com.
  6. Test it once with a real submission or order, then turn the flow on.

Where people get stuck.

  1. 01

    The code is a 10% code anyone can use once, the customer who owns it included: only the friend’s first order is rewarded.

  2. 02

    Every new customer gets a code, also those created by a newsletter form: the discounts list in the admin grows with them.

  3. 03

    A code on an empty cart waits and applies with the first product: tell the friend the discount is there before they see it.

  4. 04

    The credit is not taken back if the friend returns the order.

Get the .flow file.

In Shopify Flow, choose Import and pick the file. The workflow opens turned off: check that it reads your metaobject definition and its field keys, then turn it on.

Shopify plan. This file sends its email with Flow’s “Send HTTP request”, which runs only on the Grow, Advanced and Plus plans. On Basic, replace that step with the action of an app that sends transactional emails from Shopify Flow, such as Workflow Email: the rest of the workflow stays as it is.

Related.

Webflow writes.
Shopify reacts.

Forms that write to Shopify are on the Server plan, and Shopify Flow is free in Shopify. One Shopify app, billed on the store’s Shopify invoice.

  • One app on the Shopify bill, not ten
  • Free to build, pay only when you go live
  • Works on Basic, Grow and Advanced
  • Your 1.x store keeps working
  • Every element stays yours to change
  • Docs indexed in llms.txt