Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Functions settings
Function settings targets provide configuration interfaces for Shopify Functions within the Shopify admin. These extensions allow merchants to configure function behavior through forms and input fields, storing configuration data as metafields that your function can read at runtime.
Functions settings extensions use the FunctionSettings component to handle form submission and error handling. Configuration values are stored as metafields on the function's parent resource (discount, order routing rule, or validation).
Anchor to Use casesUse cases
- Discount configuration: Create custom interfaces for merchants to configure discount functions, such as setting percentage thresholds, quantity requirements, or product selection rules for complex discount logic.
- Order routing rules: Build configuration forms for order routing functions that help merchants define location priority, capacity constraints, fulfillment preferences, or custom routing criteria.
- Checkout validation: Design validation rule configuration interfaces for checkout validation functions that let merchants set validation thresholds, define blocking versus warning rules, customize error messages, or configure validation logic for cart and checkout operations.
- Dynamic function behavior: Store configuration values as metafields that your function reads at runtime, enabling merchants to adjust function behavior without code changes or redeployment.
- Multi-field configuration: Build forms with multiple input types (text, numbers, toggles, selections) to capture complex configuration requirements for sophisticated function logic.
Anchor to Discount details function settings ,[object Object]Discount details function settings target
admin.discount-details.function-settings.render
Renders a function settings extension for discount functions within the discount details page. Use this target to create configuration interfaces that let merchants customize discount behavior, such as setting percentage limits, quantity requirements, customer eligibility rules, or product selection criteria.
Extensions at this target can access the discount ID and existing metafields through the Discount Function Settings API. The extension must use the FunctionSettings component as its root element. Configuration values are saved as metafields on the discount, which your function can read when processing discount calculations.
Supported components
- Admin
Action - Admin
Block - Admin
Print Action - Badge
- Banner
- Block
Stack - Box
- Button
- Checkbox
- Choice
List - Color
Picker - Date
Field - Date
Picker - Divider
- Email
Field - Form
- Function
Settings - Heading
- Heading
Group - Icon
- Image
- Inline
Stack - Link
- Money
Field - Number
Field - Paragraph
- Password
Field - Pressable
- Progress
Indicator - Section
- Select
- Text
- Text
Area - Text
Field - URLField
Available APIs
Supported components
- Admin
Action - Admin
Block - Admin
Print Action - Badge
- Banner
- Block
Stack - Box
- Button
- Checkbox
- Choice
List - Color
Picker - Date
Field - Date
Picker - Divider
- Email
Field - Form
- Function
Settings - Heading
- Heading
Group - Icon
- Image
- Inline
Stack - Link
- Money
Field - Number
Field - Paragraph
- Password
Field - Pressable
- Progress
Indicator - Section
- Select
- Text
- Text
Area - Text
Field - URLField
Available APIs
Anchor to Order routing rule function settings ,[object Object]Order routing rule function settings target
admin.settings.order-routing-rule.render
Renders a function settings extension for order routing functions within the order routing settings page. Use this target to create configuration interfaces that let merchants customize order routing behavior, such as setting location priorities, capacity constraints, distance thresholds, or custom routing criteria.
Extensions at this target can access the routing rule details through the Order Routing Rule API. The extension must use the FunctionSettings component as its root element. Configuration values are saved as metafields on the order routing rule, which your function can read when determining order routing.
Supported components
- Admin
Action - Admin
Block - Admin
Print Action - Badge
- Banner
- Block
Stack - Box
- Button
- Checkbox
- Choice
List - Color
Picker - Date
Field - Date
Picker - Divider
- Email
Field - Form
- Function
Settings - Heading
- Heading
Group - Icon
- Image
- Inline
Stack - Link
- Money
Field - Number
Field - Paragraph
- Password
Field - Pressable
- Progress
Indicator - Section
- Select
- Text
- Text
Area - Text
Field - URLField
Available APIs
Supported components
- Admin
Action - Admin
Block - Admin
Print Action - Badge
- Banner
- Block
Stack - Box
- Button
- Checkbox
- Choice
List - Color
Picker - Date
Field - Date
Picker - Divider
- Email
Field - Form
- Function
Settings - Heading
- Heading
Group - Icon
- Image
- Inline
Stack - Link
- Money
Field - Number
Field - Paragraph
- Password
Field - Pressable
- Progress
Indicator - Section
- Select
- Text
- Text
Area - Text
Field - URLField
Available APIs
Anchor to Validation function settings ,[object Object]Validation function settings target
admin.settings.validation.render
Renders a function settings extension for checkout validation functions within the checkout rules settings page. Use this target to create configuration interfaces that let merchants customize checkout validation rules, such as setting minimum order values, quantity limits, product restrictions, or custom validation criteria.
Extensions at this target can access the validation details through the Validation Settings API. The extension must use the FunctionSettings component as its root element. Configuration values are saved as metafields on the validation, which your function can read when validating cart and checkout operations.
Supported components
- Admin
Action - Admin
Block - Admin
Print Action - Badge
- Banner
- Block
Stack - Box
- Button
- Checkbox
- Choice
List - Color
Picker - Date
Field - Date
Picker - Divider
- Email
Field - Form
- Function
Settings - Heading
- Heading
Group - Icon
- Image
- Inline
Stack - Link
- Money
Field - Number
Field - Paragraph
- Password
Field - Pressable
- Progress
Indicator - Section
- Select
- Text
- Text
Area - Text
Field - URLField
Available APIs
Supported components
- Admin
Action - Admin
Block - Admin
Print Action - Badge
- Banner
- Block
Stack - Box
- Button
- Checkbox
- Choice
List - Color
Picker - Date
Field - Date
Picker - Divider
- Email
Field - Form
- Function
Settings - Heading
- Heading
Group - Icon
- Image
- Inline
Stack - Link
- Money
Field - Number
Field - Paragraph
- Password
Field - Pressable
- Progress
Indicator - Section
- Select
- Text
- Text
Area - Text
Field - URLField
Available APIs
Anchor to Best practicesBest practices
- Use consistent metafield namespaces: Prefix your app's metafield namespaces with
$app:to ensure they're owned by your app. Use descriptive namespace and key names that clearly indicate their purpose. - Handle errors appropriately: The FunctionSettings component provides an
onErrorcallback. Use it to display validation errors and help merchants correct their configuration. - Set sensible default values: Initialize form fields with reasonable defaults from existing metafields or fallback values. This prevents errors when merchants haven't configured the function yet.
Anchor to LimitationsLimitations
- Single target per module: Each
[[extensions.targeting]]entry in your TOML configuration maps one target to one module file. - Root component requirement: All function settings extensions must use the FunctionSettings component as their root element. This component handles integration with the native save bar.
- Limited component set: Function settings extensions can only use form components (for example, TextField, NumberField, Select, or Checkbox). They can't use resource pickers, modals, or action extensions available to other extension types.
- Metafield storage only: Configuration values must be stored as metafields. You can't use other storage mechanisms. Metafields have size limits, so large configurations may need to be split across multiple metafields.
- Configuration is separate from execution: Function settings extensions only store configuration as metafields. Your Shopify Function reads this configuration at runtime through metafields for input queries. The extension can't directly modify function code, enforce validation rules, or preview function behavior.
- Metafield type constraints: When using
applyMetafieldsChange, you must specify a valid metafield type. Complex configurations often require usingjsontype and serializing/deserializing configuration objects.