Documentation

Everything you need to migrate from Shopify Scripts to Shopify Functions.

What is ScriptShift?

ScriptShift is a migration tool that converts Shopify Scripts (Ruby) into Shopify Functions (JavaScript). Shopify is deprecating Script Editor on June 30, 2026 — after that date, all Ruby scripts will stop running in checkout.

ScriptShift analyzes your existing Ruby scripts, detects the patterns used (discounts, shipping rules, payment conditions), and generates ready-to-deploy Shopify Function code with the correct API targets, input queries, and configuration.

Free tier: 5 analyses per day with full code generation. No account required.

Quick Start (Free Analysis)

  1. Go to scriptshift.projectgreenbelt.com
  2. Paste your Ruby script into the editor (or choose a sample template)
  3. Click "Analyze + Generate Code"
  4. Review the analysis: detected patterns, complexity score, migration effort
  5. Switch to the "Generated Code" tab to see your Shopify Function files
  6. Copy each file (src/run.js, input.graphql, shopify.extension.toml)
  7. Follow the install instructions to deploy to your store

Installing on Your Store

For automatic script detection and unlimited analyses, install ScriptShift on your Shopify store:

  1. Enter your *.myshopify.com URL in the install box on the homepage
  2. Authorize the app (read-only access to your Script Editor scripts)
  3. ScriptShift auto-detects all active scripts and analyzes them
  4. View migration status, generated code, and testing instructions in the dashboard

Supported Script Types

Script TypeRuby ContextShopify Function API
Line Item ScriptsInput.cart.line_itemsProduct Discounts, Order Discounts, Cart Transform, Cart Validation
Shipping ScriptsInput.shipping_ratesDelivery Customization
Payment ScriptsInput.payment_gatewaysPayment Customization

Pattern Detection

ScriptShift detects 22+ Ruby patterns across all three script types:

Percentage/Fixed Discounts
Tiered Volume Discounts
Buy X Get Y (BOGO)
Bundle/Package Pricing
Gift with Purchase
Customer Segment Pricing
Order Minimum Discounts
Custom Line Item Properties
Cart Validation
Hide Shipping Rates
Rename Shipping Rates
Reorder Shipping Rates
Free Shipping Threshold
Modify Rate Prices
Hide Payment Methods
Rename Payment Methods
Reorder Payments
COD Rules

Complexity Scoring

90/100 — Simple

1 pattern detected. Estimated < 1 hour. Auto-migration available.

60/100 — Moderate

2-3 patterns detected. Estimated 1-4 hours. Review generated code.

30/100 — Complex

4+ patterns or warnings. Estimated 4-8 hours. Manual review recommended.

Generated File Structure

Each generated Shopify Function includes three files:

my-script-discount/
├── src/run.js          # Function logic (JavaScript)
├── input.graphql       # Data query (what the function receives)
└── shopify.extension.toml  # Extension configuration
  • src/run.js — The main function. Receives cart/checkout data and returns discounts, delivery operations, or payment operations.
  • input.graphql — Defines what data the function requests from Shopify (cart lines, customer tags, metafields, etc.).
  • shopify.extension.toml — Configuration file specifying the API target, build settings, and UI paths.

Deploying Generated Code

  1. Create a Shopify app (if you don't have one): shopify app init
  2. Generate a Function extension: shopify app generate extension --type product_discounts --name my-discount
  3. Replace the generated files with ScriptShift's output
  4. Test locally: shopify app function run
  5. Deploy: shopify app deploy
  6. In Shopify admin, create a discount that uses your new Function

Testing Your Functions

Always test on a development store before going live:

  1. Install the app on your development store (not production)
  2. Create test discounts/customizations using the new Functions
  3. Run through checkout with various cart configurations
  4. Compare results with your existing Script behavior
  5. Use the Migration Risk Simulator to test logic against historical data
  6. Once verified, deploy to production and disable the old Script

POST /api/scripts/analyze

Analyze a Ruby script and detect patterns.

curl -X POST https://scriptshift.projectgreenbelt.com/api/scripts/analyze \
  -H "Content-Type: application/json" \
  -d '{"source": "Input.cart.line_items.each do |item|\n  item.change_line_price(item.line_price * 0.9, message: \"10% off\")\nend\nOutput.cart = Input.cart", "title": "My Script"}'

Returns: script type, detected patterns, complexity score, estimated effort, auto-migration eligibility.

POST /api/scripts/migrate

Analyze AND generate migration code in one call.

curl -X POST https://scriptshift.projectgreenbelt.com/api/scripts/migrate \
  -H "Content-Type: application/json" \
  -d '{"source": "...", "title": "My Script"}'

Returns: analysis results + generated Function files (run.js, input.graphql, extension.toml).

Rate Limits

TierLimitCode Gen
Free (anonymous)5 analyses / day✅ Included
Installed (authenticated)Unlimited✅ Included
Pro ($49/mo)Unlimited✅ + Auto-detect + Testing

Ready to migrate?

Try the free analyzer — no signup required.

Analyze My Scripts →