Skip to main content

Metafields
API

Requires access to protected customer data for some properties.

The API for interacting with metafields.

The API object provided to this and other customer-account.order-status extension targets.

StatefulRemoteSubscribable<[]>
required

The metafields requested in the shopify.ui.extension.toml file. These metafields are updated when there's a change in the merchandise items being purchased by the customer.

Requires access to protected customer data.

StatefulRemoteSubscribable<[]>
required

The metafields that apply to the current order. The actual resource on which these metafields exist depends on the source of the order:

  • If the source is an order, then the metafields are on the order.

  • If the source is a draft order, then the initial value of metafields are from the draft order, and any new metafields you write are applied to the order created by the checkout.

  • For all other sources, the metafields are only stored locally on the client creating the checkout, and are applied to the order that results from checkout.

These metafields are shared by all extensions running on checkout, and persist for as long as the customer is working on this checkout.

Once the order is created, you can query these metafields using the GraphQL Admin API

Was this section helpful?

Returns the metafields configured with shopify.extension.toml.

Default: {}

[]
Was this section helpful?

Returns a single filtered Metafield or undefined.

required

| undefined
Was this section helpful?

Returns the current array of metafields applied to the checkout. You can optionally filter the list.

[]
Was this section helpful?