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 . 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, now includes a metafield field:
metafield(namespace: String, key: String!): MetafieldThe returned Metafield exposes value, type, and .
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. 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:
{
cart {
deliveryGroups {
deliveryOptions {
handle
ownNamespace: metafield(namespace: "$app:carrier", key: "priority") { value }
shared: metafield(namespace: "carrier", key: "priority") { value }
}
}
}
}Who's affected
is shared across the Functions cart graph, so this field is available to every Functions API whose input includes .
Apps that don’t query this field see no change in behavior. In the legacy Order Discounts and Product Discounts APIs, 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 and handle the returned Metafield values.