When you [generate an app extension](/docs/api/shopify-cli/app/app-generate-extension), a TOML configuration file named `shopify.extension.toml` is automatically generated in your app's extension directory. > Note: > This guide describes the TOML file structure that only applies to [checkout UI](/docs/api/checkout-ui-extensions), [admin UI](/docs/api/admin-extensions), [customer account UI](/docs/api/customer-account-ui-extensions), [product configuration](/docs/apps/build/product-merchandising/bundles/add-merchant-config-ui), [Shopify Flow triggers](/docs/apps/build/flow/triggers), [Shopify Flow actions](/docs/apps/build/flow/actions), [Shopify Flow templates](/docs/apps/build/flow/templates), and [Shopify Functions](/docs/apps/build/functions) extensions. > > The TOML file structure for other extensions follow a different pattern: > > - [Post-purchase UI](/docs/api/checkout-extensions/post-purchase/configuration) > - [Product subscription](/docs/apps/build/purchase-options/product-subscription-app-extensions/start-building) > - [Web pixel](/docs/apps/build/marketing-analytics/build-web-pixels) > - [Shopify POS UI](/docs/api/pos-ui-extensions/getting-started) > - [Theme app extensions](/docs/apps/build/online-store/theme-app-extensions/build) ## How it works [Shopify CLI](/docs/apps/build/cli-for-apps) builds and serves app extensions using information defined in a TOML file named `shopify.extension.toml`. The TOML file is located in a directory within the [`extensions/` directory](/docs/apps/build/cli-for-apps/app-structure#directory-structure) of your app project. The following example shows a `shopify.extension.toml` file that contains configuration settings for a [checkout UI extension](/docs/api/checkout-ui-extensions).

## Extension types Some extensions require specific configurations. To accommodate this, Shopify CLI groups extensions into different types in the TOML file: | Extension |`type` value in the TOML file | `--template` flag value in the generate command | | --- | --- | --- | | [Checkout UI](/docs/api/checkout-ui-extensions) |`ui_extension` | `checkout_ui` | | [Customer account UI](/docs/api/customer-account-ui-extensions) |`ui_extension` | `customer_account_ui` | | [Editor extension collection](/docs/apps/build/customer-accounts/editor-extension-collections)
Developer preview |`editor_extension_collection` | `editor_extension_collection` | | [Admin action](/docs/apps/build/admin/actions-blocks/build-admin-action) | `ui_extension` | `admin_action` | | [Admin block](/docs/apps/build/admin/actions-blocks/build-admin-block) | `ui_extension` | `admin_block` | | [Product configuration](/docs/apps/build/product-merchandising/bundles/add-merchant-config-ui) | `ui_extension` | `product_configuration` | | [Shopify Flow trigger](/docs/apps/build/flow/triggers) | `flow_trigger` | `flow_trigger` | | [Shopify Flow action](/docs/apps/build/flow/actions) | `flow_action` | `flow_action` | | [Shopify Flow template](/docs/apps/build/flow/templates) | `flow_template` | `flow_template` | | [Order discount](/docs/api/functions/reference/order-discounts) | `function` | `order_discounts` | | [Product discount](/docs/api/functions/reference/product-discounts) | `function` | `product_discounts` | | [Shipping discount](/docs/api/functions/reference/shipping-discounts)
Developer preview | `function` | `shipping_discounts` | | [Discounts allocator](/docs/api/functions/reference/discounts-allocator)
Developer preview | `function` | `discounts_allocator` | | [Delivery customization](/docs/api/functions/reference/delivery-customization) | `function` | `delivery_customization` | | [Payment customization](/docs/api/functions/reference/payment-customization) | `function` | `payment_customization` | | [Order routing location rule](/docs/api/functions/reference/order-routing-location-rule)
Beta | `function` | `order_routing_location_rule` | | [Cart and checkout validation](/docs/api/functions/reference/cart-checkout-validation) | `function` |`cart_checkout_validation` | | [Cart transform](/docs/api/functions/reference/cart-transform) | `function` | `cart_transform` | | [Fulfillment constraints](/docs/api/functions/reference/fulfillment-constraints) | `function` | `fulfillment_constraints` | ## Targets A target is an identifier in `shopify.extension.toml` that specifies where you're injecting code into Shopify APIs, or other parts of the Shopify platform. Each target is composed of three to four namespaces. The name begins with a broad Shopify context and ends with the behavior of the extensible element. For example, a checkout UI extension that renders a shipping address form has a target named `purchase.checkout.delivery-address.render-before`: - `purchase`: The broad Shopify context. - `checkout`: The targeted page. - `delivery-address`: The element that the extension will be positioned near. - `render-before`: An action verb that describes the behavior of the extensible element. ### Supported targets The following table provides links to documentation on the supported targets associated with each app extension type. > Note: > Shopify Flow triggers and actions don't support configurable targets. | Extension type | Documentation on supported targets | | --- | --- | | Checkout UI | [Checkout UI targets](/docs/api/checkout-ui-extensions/current/targets) | | Customer account UI | [Customer Account UI targets](/docs/api/customer-account-ui-extensions/targets) | | Admin UI | [Admin UI targets](/docs/api/admin-extensions/extension-targets) | | Product configuration | Product configuration app extensions use the [admin.product-details.configuration.render](/docs/api/admin-extensions/extension-targets#extensiontargets-propertydetail-adminproductdetailsconfigurationrender) or [admin.product-variant-details.configuration.render](/docs/api/admin-extensions/extension-targets#extensiontargets-propertydetail-adminproductvariantdetailsconfigurationrender) target. | | Shopify Functions | [Shopify function APIs and targets](/docs/api/functions#available-apis)

The available targets depend on the Function APIs that you're using. | ## Common properties This section describes the configuration settings in `shopify.extension.toml` that are common to [checkout UI extensions](/docs/apps/build/checkout/technologies), [admin UI](/docs/api/admin-extensions), [product configuration](/docs/apps/build/product-merchandising/bundles/add-merchant-config-ui), [Shopify Flow triggers](/docs/apps/build/flow/triggers), [Shopify Flow actions](/docs/apps/build/flow/actions), [Shopify Flow templates](/docs/apps/build/flow/templates), and [Shopify Functions](/docs/apps/build/functions) extensions. | Property | Description | |---|---| | `api_version`
Required | The version of the API that's being used for the extension. If provided in the `[[extensions]]` array, then the specified API version is used instead of the root level `api_version`. | | `[[extensions]]`
Required | The name of the array that contains all extensions listed in the TOML file. Contains the following properties:

| | `[settings]`
Optional | The name of the array that defines settings that a merchant can set values for. If provided in the `[[extensions]]` array, then the specified settings are used instead of the root level `settings`. | | `[[settings.fields]]`
Optional | The name of the array that contains the [settings fields](/docs/api/checkout-ui-extensions/latest/configuration#settings-definition). | | `[[extensions.targeting]]`
Required | The name of the array that contains a target and path to the related extension code. Contains the following required properties:

| ## Extension-specific properties This section describes the configuration settings in `shopify.extension.toml` that are specific to the following extensions: - [Checkout UI extensions](#checkout-ui-extensions) - [Customer account UI extensions](#customer-account-ui-extensions) - [Editor extension collection](#editor-extension-collection) - [Admin UI extensions](#admin-ui-extensions) - [Product configuration extensions](#product-configuration-extensions) - [Shopify Flow actions](#shopify-flow-actions) - [Shopify Flow triggers](#shopify-flow-triggers) - [Shopify Flow templates](#shopify-flow-templates) - [Shopify Functions extensions](#shopify-functions-extensions) ### Checkout UI extensions The following example TOML file contains configuration settings for a [checkout UI extension](/docs/api/checkout-ui-extensions):

The following table describes the properties in the TOML file that are specific to checkout UI extensions: | Property | Description | |---|---| | `[extensions.capabilities]`
Optional | The name of the array that contains the checkout UI extension's capabilities: | | `[extensions.metafields]`
Optional | An array that sets the default for each `[[extensions.targeting.metafields]]`, if `[[extensions.targeting.metafields]]` isn't specified. | | `[[extensions.targeting.metafields]]`
Optional | The [metafields](/docs/api/checkout-ui-extensions/latest/targets/block/purchase-thank-you-block-render#standardapi-propertydetail-metafields) that your extension target needs to read: You can specify up to five `key` and `namespace` pairs in the configuration file. When the extension is executed, Shopify looks for the metafields in each resource and returns their contents. | | `[[extensions.targeting.default_placement]]`
Optional | Defines which location of a block extension target an extension is placed in when added. After adding the extension, the merchant can move it to other locations. Value must be one of the [checkout placements](/docs/apps/build/checkout/test-checkout-ui-extensions#block-targets) for the block extension target. | ### Customer account UI extensions The following example TOML files contain configuration settings for [a static and a full page extension](/docs/api/customer-account-ui-extensions/extension-targets-overview). The properties in the TOML files are similar to [checkout UI extensions](#checkout-ui-extensions):

The following table describes the properties in the TOML file that are specific to customer account UI extensions: | Property | Description | |---|---| | `[extensions.capabilities]`
Optional | The name of the array that contains the checkout UI extension's capabilities: | | `[extensions.metafields]`
Optional| An array that sets the default for each `[[extensions.targeting.metafields]]`, if `[[extensions.targeting.metafields]]` isn't specified. | | `[[extensions.targeting.metafields]]`
Optional | The [metafields](/docs/api/customer-account-ui-extensions/latest/targets/order-status/customer-account-order-status-block-render#orderstatusapi-propertydetail-metafields) that your extension target needs to read: You can specify up to five `key` and `namespace` pairs in the configuration file. When the extension is executed, Shopify looks for the metafields in each resource and returns their contents. | | `[[extensions.targeting.default_placement]]`
Optional | Defines which location of a block extension target an extension is placed in when added. After adding the extension, the merchant can move it to other locations. Value must be one of the [customer account placements](/docs/apps/build/customer-accounts/extension-placement#define-default-placement) for the block extension target.| ### Editor extension collection The following example TOML files contain configuration settings for an [editor extension collection](/docs/apps/build/customer-accounts/editor-extension-collections):

The following table describes the properties in the TOML file that are specific to editor extension collections: | Property | Required? | Description | |---|---|---| | `[extensions.includes]` | Yes | An array that sets the supported extensions that belong in the editor extension collection.

Limitations: