---
title: >-
  Delivery options in Shopify Functions input now expose their metafields -
  Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/delivery-options-in-shopify-functions-input-now-expose-their-metafields
  md: >-
    https://shopify.dev/changelog/delivery-options-in-shopify-functions-input-now-expose-their-metafields.md
metadata:
  effectiveApiVersion: 2026-10
  affectedApi:
    - displayName: Functions
      handle: functions-api
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Update
    handle: update
  indicatesActionRequired: false
  createdAt: '2026-08-20T13:53:55-04:00'
  postedAt: '2026-09-15T10:00:00-04:00'
  updatedAt: '2026-09-14T19:50:45-04:00'
  effectiveAt: '2026-08-31T09:00:00-04:00'
---

September 15, 2026

# Delivery options in Shopify Functions input now expose their metafields

DateSeptember 15, 2026

Version[2026-10](https://shopify.dev/changelog?api_version=2026-10)

FlagsUpdate

SurfacesAPI

Affected APIs[Functions](https://shopify.dev/changelog?api_type=functions-api)

Shopify Functions can now read metafields attached to delivery options in the cart. On API version `2026-10`, you can call `metafield(namespace:, key:)` on any option in `cart.deliveryGroups.deliveryOptions`. This affects apps that build Delivery Customization Functions and any other function whose input includes delivery options. No action is required.

## What changed

In the Functions cart graph, `CartDeliveryOption` now includes a `metafield` field:

```graphql
metafield(namespace: String, key: String!): Metafield
```

The returned `Metafield` exposes `value`, `type`, and `jsonValue`.

Metafields on a delivery option are not persisted after checkout. A delivery option generator function or shipping carrier service response attaches them when it generates the option, and they exist only for that checkout.

Access follows the existing [metafield ownership rules](https://shopify.dev/docs/apps/build/custom-data/ownership). A function can read metafields in its own app‑reserved namespace and in any unprefixed shared namespace. A namespace reserved by a different app resolves to `null`.

A Delivery Customization input query can now read both app-reserved and shared metafields on delivery options. For example:

```graphql
{
  cart {
    deliveryGroups {
      deliveryOptions {
        handle
        ownNamespace: metafield(namespace: "$app:carrier", key: "priority") { value }
        shared: metafield(namespace: "carrier", key: "priority") { value }
      }
    }
  }
}
```

## Who's affected

`CartDeliveryOption` is shared across the Functions cart graph, so this field is available to every Functions API whose input includes `cart.deliveryGroups.deliveryOptions`.

Apps that don’t query this field see no change in behavior. In the legacy Order Discounts and Product Discounts APIs, `cart.deliveryGroups` is always empty, so the field is present in the schema but never returns a value.

## Why this matters

Delivery option generator functions can already attach structured data to the options they create, but a downstream Delivery Customization Function couldn’t read that data. A common workaround was to pack data into the option `title` or `handle` and parse it back out, which is brittle when a merchant renames an option, when titles are translated, or when multiple options match the same pattern.

By reading a metafield, you can define an explicit contract between functions: the generating function writes a typed value to a namespace it owns, and the customizing function reads it by name.

## What to do

You don’t need to take any action. Existing functions keep working unchanged on every released API version.

If you want to use this field, update your function input queries on API version `2026-10` to request `metafield` on `CartDeliveryOption` and handle the returned `Metafield` values.

## Related docs

* [Delivery Customization Function API reference for `deliveryOptions`](https://shopify.dev/docs/api/functions/2026-10/delivery-customization#Input.fields.cart.deliveryGroups.deliveryOptions)
* [Metafields for Function input queries](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
* [Metafield ownership and app-reserved namespaces](https://shopify.dev/docs/apps/build/custom-data/ownership)
