Skip to main content

Migrating your seamless free product rewards to Shopify Functions

Moving older Seamless Free Product rewards from Shopify Scripts to Shopify Functions.

Written by Jason Leader

Shopify has retired the Scripts App, and almost every merchant has already moved. This guide is kept for anyone still running Seamless Free Product rewards on the old script or variant-based method. Functions-based rewards need Shopify Checkout Extensibility. If you are not sure whether you have it, check with your Shopify account manager or contact us at support@loyaltylion.com.

In this article:


Overview

Seamless Free Product rewards used to be delivered through the Shopify Scripts App. They are now delivered through Shopify Functions, which every Shopify store can use. All new Seamless Free Product rewards are created on the Functions method, so this guide only matters if you still have older rewards to move across.


What you gain

  • Seamless Free Products work with Shopify bundles, so you can offer a bundle as a reward

  • The rewards work with Shopify Checkout Extensibility

  • Migrated rewards keep the same reward ID, so your dashboard reporting and any custom CSS on your storefront keep working


What changes

Before you migrate, be aware of the following:

  • If you use our API for seamless rewards, the method changes from buy_with_points to function

  • The context property attached to discounted products becomes __lion_sfp_id instead of __lion_context

  • A reward whose product no longer exists will not migrate

  • Script-based discounts combined with other discount types automatically. Functions-based discounts do not, so you may need to update your discounts in Shopify and your discount combination settings in LoyaltyLion


How to migrate

  1. Create a new Seamless Free Product reward. In your Shopify admin, on the Discounts page, you will now see a LoyaltyLion Seamless Product Discounts entry. That single discount supports every Seamless Free Product reward you offer, so do not delete or deactivate it

  2. Test the new reward from your loyalty page. Your customer claims it, the product is added to the cart, and the cost is taken off at the checkout

  3. When you are happy it behaves as expected, go to your rewards page and use the migrate all Seamless Free Product rewards banner. The banner only appears while you still have script or variant-based rewards left to move, so if you cannot see it there may be nothing left to migrate. If you think there is, contact our Support team

The LoyaltyLion Seamless Product Discounts entry on the Shopify Discounts page
A seamless free product reward being claimed from the loyalty page
The migrate all Seamless Free Product rewards banner

Migrating carries every existing reward across with its title, points cost, images and usage data intact, and each reward keeps its ID. You do not need to reconfigure anything.

Every product used by a Functions reward needs its normal price set in Shopify. A product priced at zero will not work, because the reward is what makes it free at the checkout.

A claimed seamless free product is held in the cart for 2 hours by default. If your customer has not checked out by then, we return their points and remove the product. You can shorten that window on each reward.


FAQ

I use the custom properties passed via Scripts to manage my product rewards. Can I still migrate?

Yes. We pass the same properties for Functions-based rewards as we did for script-based ones, so your existing logic should behave the same.

I have a headless store. Can I migrate?

Yes, as long as you use Checkout Extensibility. We still recommend creating a Functions-based reward and testing the shopper journey before you migrate the rest.

I use the API rather than the JavaScript SDK. Can I migrate?

Yes. The API contract is unchanged, except that the method becomes function instead of buy_with_points.

What happens to the duplicate products I created to support my existing rewards?

Functions rewards do not need duplicate variants. You can either create new rewards pointing at the real product, or update the migrated reward to point at it.

What happens if a reward's product no longer exists?

That reward will not migrate, because we need an active product to migrate to. We list the rewards that could not be migrated once the others have moved across.

What happens to my tier-specific Seamless Free Product rewards?

They keep their tier and their points value.

Did this answer your question?