Skip to main content
All CollectionsIntegrationsShopify
Migrating your Seamless Free Product Rewards to Shopify Functions
Migrating your Seamless Free Product Rewards to Shopify Functions
F
Written by Freddie Wynne
Updated over a week ago

Functions facilitated Seamless Free Product rewards will only work for brands using Shopify's Checkout Extensibility. If you are unsure, you can check in your Shopify admin, with your Shopify Account Manager or contact us at support@loyaltylion.com

Shopify is deprecating the Shopify Scripts App and the method used to handle variant-based Seamless Free Product rewards. To continue using Seamless Free Product rewards, you must migrate them to the Shopify Functions method. Shopify Functions are available to all Shopify stores.
​
This method of facilitating Seamless Free Product rewards is recommended and benefits your program.

πŸ‘‰ Going forward, all newly created Seamless Free Product rewards will use the Shopify Functions method.

Benefits:

  • Seamless Free Products now can be applied to Shopify Bundles, meaning you can offer a bundle of products as a reward

  • Works with Shopify's latest checkout offering; Checkout Extensibility

  • Migrated rewards will retain the same reward ID used for dashboard reporting on usage and any custom CSS targeting used on the storefront

Changes:

Before migrating your rewards, please be aware of the following:

  • If you use our API for Seamless rewards then the method has changed from buy_with_points to function

  • The context property we attach to discounted products will be __lion_sfp_id rather than __lion_context

  • Rewards associated with a product that no longer exists will not be migrated

  • By default, Script-based discounting in the checkout automatically combine with other discount types, Function-based discounting do not automatically combinable and you may need to update existing discounts on Shopify and update your discount combinations setting on LoyaltyLion

Migration guide:

Here is our guide to testing and migrating your existing rewards:

  1. Create a new Seamless Free Product reward. In your Shopify admin, on the Discounts page, you should now see a LoyaltyLion Seamless Product Discounts discount. This is a universal discount that supports all Seamless Free Product rewards that you offer your customers. Please do not delete this discount as it will mean Seamless Free Product rewards via Functions will not work.
    ​

    ​

  2. You can test this reward type from your Loyalty page; the customer journey will be the same. Customers can claim the reward, the product is added to the cart, and when the customer reaches the checkout the cost of the item is deducted and they have a free item. These rewards expire after 90 minutes and if the product is removed from the cart, then the points are refunded to the customer.
    ​

    ​

  3. Once you're happy that the new Functions-based rewards are behaving as expected, you can migrate your existing Seamless Free Product rewards. On your rewards page UI, you will see a migrate all Seamless Free Product rewards banner.
    ​

    ​
    By completing this migration, all of your existing Seamless Free Product rewards will be migrated over. All of the existing reward configurations will be carried over; title, cost to redeem, images etc. You will not need to make any changes. In addition, the migrated rewards will retain their reward_id in case you use that class to make custom CSS changes on the loyalty page and all usage data will also be retained.


FAQs

Can I migrate if I use the custom properties passed via Scripts to manage my product rewards in checkout and inventory?

We pass the same properties for Functions-based rewards as we do for Script-based rewards, all your existing logic should behave the same.

I have a headless store, can I migrate to use Functions?

As long as you use Checkout Extensibility, this shouldn't be a problem. We do strongly recommend you create a Functions-based reward and then test the shopper journey first though.

Can I migrate if I use the API to manage Seamless Free Product Rewards?

If you don't use our JavaScript SDK but our API to claim rewards, then the API contract is the same but the method has changed from buy_with_points to function.

I'm still using checkout.liquid, can I migrate to Functions-based Product Rewards?

You can migrate your rewards over to use Functions, however they may not work due to Shopify deprecated checkout.liquid functionality. We strongly recommend that you test with a new reward before migrating your existing rewards.

What happens if I've created a duplicate product to support my existing reward?

With Functions, you won't need to create duplicate variants to facilitate the reward. You can either create new rewards for the product or update the migrated reward to point to a non-duplicated product.

What happens if the product or variant ID no longer exists, ie the product has been deleted when I migrate?

The reward will not be migrated as we need an active product to migrate. The list of rewards that could not be migrated will be surfaced when you migrate the other rewards over.

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

All your migrated products will be assigned to the same tier and retain their points value.

Did this answer your question?