Shopify Scripts vs Functions: hvad migrerer du
Shopify Scripts vs Functions: hvad migrerer du
Frequently asked questions
Shopify Scripts were Ruby code running in a sandbox, limited to cart, shipping, and payment customisation at checkout. Shopify Functions are written in languages including JavaScript, TypeScript, and Rust, run directly on Shopify's infrastructure, and cover a broader range of use cases. Functions are the successor to Scripts.
A Script was an isolated block of code tied directly to checkout. A Function is built as part of an app, versioned, and deployed through Shopify's developer tooling. That gives you greater control over deployment, testing, and ongoing maintenance.
Functions operate within fixed boundaries with defined inputs and outputs, and are designed for fast, deterministic decisions. They are not suited to long-running external calls or heavy data processing, and there are limits on file size and execution time. The solution is to design your logic with those constraints in mind and combine Functions with other parts of the platform where needed.
Yes. The two technologies can run side by side in the same store during a transition period. This makes it possible to migrate logic gradually, keeping existing Scripts live until the corresponding Function has been built, tested, and deployed.
Start by mapping all existing Script logic and the business rules behind it. Discount logic is typically the first to move, using Discount Functions, followed by shipping and payment customisations. Migrate one rule at a time and verify the behaviour before making a full switch.

