Skip to main content

Function Lab Documentation

Function Lab is a powerful Shopify app that enables advanced configuration of Shopify Functions through a flexible rule-based engine. Build sophisticated discount logic, customize checkout behavior, and create dynamic cart transformations—all through JSON configuration, no code required.

What is Function Lab?

Function Lab leverages Shopify’s Functions API to provide fine-grained control over your store’s pricing, checkout, and cart behavior. Instead of writing and deploying custom functions, you configure rules using a declarative JSON format powered by the shopify-rules-engine.

Key Capabilities

  • Product Discounts: Percentage or fixed amount discounts with advanced targeting
  • Shipping Discounts: Free shipping, rate adjustments, and method-specific rules
  • Order Discounts: Cart-level discounts with flexible targeting
  • Delivery Customization: Hide, reorder, or filter shipping methods
  • Payment Customization: Control available payment methods
  • Cart Transforms: Merge line items into bundles or update cart properties

Why Use Function Lab?

No Code Required

Configure complex business logic through JSON rules instead of writing and maintaining custom functions.

Powerful Expression System

Use JMESPath or custom filter syntax to query cart data, customer attributes, product metadata, and more.

Dynamic Pricing

Implement tiered pricing, customer-specific rates, geographic pricing, and conditional discounts.

Real-Time Testing

Test your configurations directly in the Shopify admin with instant preview feedback.

Professional-Grade Features

  • Multi-rule strategies with precedence control
  • Facts system for complex calculations
  • Conditional logic with boolean operations
  • Metafield and customer attribute integration
  • Performance-optimized evaluation engine

Quick Navigation

New to Function Lab?

Start with the Quick Start Guide to create your first function in 5 minutes.

Understanding the Basics

Read Core Concepts to learn the fundamental building blocks: rules, conditions, events, and facts.

Building Specific Functions

Jump to Function Types to explore detailed documentation for each function type with examples.

Advanced Use Cases

Explore Advanced Features for complex conditions, dynamic values, and performance optimization.

Looking for Examples?

Browse the Cookbook for 30+ ready-to-use recipes covering common business scenarios.

Need Help?

Check the Troubleshooting Guide for common errors and debugging strategies.

Version & Compatibility

This documentation covers Function Lab for Shopify Functions API. All examples are tested and validated against the current Shopify Functions API specification. Requirements:
  • Shopify Plus plan (required for Functions API access)
  • Function Lab app installed from Shopify App Store
  • Admin API access for function configuration

What’s in This Documentation

SectionWhat You’ll Find
Getting StartedQuick start tutorial, core concepts, testing guide, common patterns
Function TypesDetailed reference for each function type with parameters and examples
Advanced FeaturesFacts system, complex conditions, dynamic values, optimization
ReferenceComplete API reference, cookbook recipes, troubleshooting guide

Community & Support

  • GitHub Issues: Report bugs or request features
  • Documentation Feedback: Help us improve these docs
  • App Support: Contact Function Lab support team

Ready to get started?Quick Start Guide Want to understand the concepts first?Core Concepts Looking for specific examples?Cookbook
I