Back

Resources

Our resources are some of the most highly regarded in ecommerce. They are utilised by brands, platforms and agencies around the world to navigate the complex world of modern commerce, enhancing knowledge and guiding strategy.

Case Studies

VIEW ALL CASE STUDIES

Blog

VIEW ALL ARTICLES

Ebooks

VIEW MORE CONTENT

Drag

Shopify Functions is Replacing Shopify Scripts – What Do You Need To Know?

Shopify Functions is set to replace Shopify Scripts over the next year. This change demonstrates Shopify’s commitment to create an increasingly versatile and robust ecommerce platform. Read on to learn what’s happening, what it means for you, and how we can help.

Written By
Alec Wayman
Featured Image: Shopify Functions is Replacing Shopify Scripts

Shopify Plus users will likely be familiar with Shopify Scripts, small snippets of code that enable you to create personalised shopping experiences in the cart and and checkout. Brands have been leveraging Scripts to enhance the checkout process and increase conversion rate since it was first launched in 2016.

However, Shopify Scripts is being deprecated and will be replaced by Shopify Functions. 

This article will cover all that you need to know about this shift, including the reasons why Shopify Functions is being introduced and how you can migrate from Scripts.

What is happening to Shopify Scripts?

Shopify Functions replaces the need for Shopify Scripts when it comes to customisation.

From Q3 2023, Scripts will no longer be available to new Shopify Plus users.

As of 13th August 2024, Shopify Scripts will no longer be supported. Merchants that are currently leveraging Scripts for customisations to discounts and checkout will need to migrate to Shopify Functions before this date.

What is Shopify Functions?

Shopify Functions allows developers to customise the backend logic that powers part of Shopify.

Similarly to the Checkout Extensibility changes, Functions will require an app to work. App developers can create and deploy apps that contain functions. These apps are then installed on Shopify stores by retailers, and Shopify executes the function when customers interact with the store.

Several capabilities are immediately available via Functions. These are served by apps created by app developers working within the Shopify ecosystem, with requirements based on their knowledge of existing customers.

For example, there will be numerous discounting functions apps that will cover the majority of requirements. The high level of competition within this space will ensure that the solutions are effective and cost efficient.

Where functionality is required that falls outside the broad spectrum of everyday uses, custom apps must be built for this use case. These can be built by a developer team and will involve ongoing hosting and maintenance.

Why is Shopify Functions replacing Shopify Scripts?

1. To extend the current functionality available

Shopify Scripts allowed developers to alter the output of the Shopify cart based on a small number of functions available in the scripting language. This allowed Scripts to be easy and quick to set up – especially when using a pre-written Script which fits requirements. However, the versatility of this approach was limited to a small number of functions available.

Shopify Functions, on the other hand, has been designed to be language-agnostic. This means any programming language can be used, as long as it can be compiled into WebAssembly and the programme size is smaller that 256kb. In other words, the only limit is a technical data limit, not a hard language restriction. The current recommendation is Rust, but the use of Javascript is also available in developer preview and general access can be expected soon.

This expansion of the languages available hugely opens up the possibilities when it comes to writing the functions themselves, because complete languages can be used rather than a truncated version of Ruby, as used in Scripts.

Scripts were also limited by the fact that any changes to the data used in them – with the exception of cart data – had to be provided from within the script. This meant at least some understanding of programming was required to make changes and came with the possibility that the logic could be broken with one errant comma left by the alterer.

Overall, the introduction of Shopify Functions (and Checkout Extensibility) denotes a new era in which Shopify is offering more control over the backend functionality of the checkout experience. 

Going forward, this creates a platform that is more versatile and more powerful for brands to use as they need to. You can find the full list of Function APIs currently available, and those in developer preview, on Shopify’s Functions API reference page.

2. Provide a better user experience

Shopify Functions has been designed with user experience in mind. It has a user-friendly interface for the store admin where checkout rules can be created and changed based on the logic in a Function.

For example, a developer will write a function which creates discounts based on volume purchase, i.e. buy X of one item and receive a Y% discount. The store admin will now be able to create and apply a new rule for volume discounts. This will be configurable – depending on what the developer has defined – on a number of criteria, including product and customer tagging, and collection type. As well as the normal threshold parameters like number of products required to receive a certain percentage discount.

Moreover, these functions-based apps are built into the relevant admin section, eliminating the need to use a completely separate app interface.

This transfer of the configuration process from code to the store admin GUI means that interacting with functions is easier to understand and more robust.

3. Developer’s involvement in functionality changes

Shopify has been quick to state that the introduction of Shopify Functions reduces the need for developers involved in a store’s functionality.

This originates from the idea that over the next year, as Shopify Functions replaces Shopify Scripts, there will be an increasingly strong ecosystem of Functions-specific apps to be installed from the app store. In the case that a brand’s functionality requirements can be met by these apps, then yes, the need for developers is reduced.

However, if a brand’s store demands complex solutions for unique functionality requirements, then a custom app will need to be built. This involves the initial developer time to create an app, as well as ongoing developer support for app maintenance and hosting.

What are the implications for Shopify Plus brands?

Brands that currently leverage Shopify Scripts will need to migrate to Shopify Functions before 13th August 2024 to avoid any impact risk to their businesses. 

For most stores, the implications of upgrading from Scripts to Functions include finding and implementing a Functions app to replace the functionality that Scripts previously permitted.

The benefits of these upgrades include:

  • offering greater scope for interesting amendments and new functionality – especially for the checkout which has previously been a very closed system;
  • more control and more options for store owners with functionality being moved to dedicated apps. This means there is less need to be tied to a development team to cover what can sometimes feel like quite simple functionality requirements; and
  • access to expert-developed apps that will be pushing the boundaries, improving functionality and maintaining stability.

How Swanky can help leverage Shopify Functions for your store

As a highly experienced Shopify Plus agency, with a world-class team of technical specialists, Swanky can help facilitate your migration from Shopify Scripts to Shopify Functions and provide bespoke development services for custom Functions apps.

Please reach out to our team to find out how our Shopify Plus Experts can help.

For current clients of Swanky, please note that we will be contacting anyone impacted by the deprecation of Scripts to discuss appropriate next steps for upgrading to Functions.

Talk ecommerce with us

Ready to grow your ecommerce business? Let’s talk.

CONTACT US

Join the Swanky Community

Want to receive regular updates and inspiration to help your business stay ahead of the game? Subscribe to our newsletter and join the community of ecommerce leaders successfully navigating the world of online retail.

SIGN ME UP
What are the Benefits
  • Be at the forefront of industry trends

    We develop and implement ecommerce tactics for industry-leading brands on a daily basis. Be the first to hear exclusive insights and learnings.

  • Get a monthly dose of inspiration

    Receive our newsletter straight to your inbox, packed full of useful marketing tips and growth strategies for your online store.

  • Join a community of fellow leaders

    Get to know like-minded entrepreneurs in the digital transformation space. Share experiences and learnings from your ecommerce journey.