Skip to main content
Anchor to MetafieldsSetUserError

MetafieldsSetUserError

object

An error that occurs during the execution of MetafieldsSet.

•MetafieldsSetUserErrorCode

The error code.

•Int

The index of the array element that's causing the error.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•mutation

Sets Metafield values on a cart, creating new metafields or updating existing ones. Accepts up to 25 metafields per request.

Cart metafields can automatically copy to order metafields when an order is created, if there's a matching order metafield definition with the cart to order copyable capability enabled.


Note

This mutation doesn't trigger Shopify Functions. Changes aren't available to Shopify Functions until the buyer goes to checkout or performs another cart interaction that triggers the functions.


Arguments

•[CartMetafieldsSetInput!]!
required

The list of Cart metafield values to set. Maximum of 25.

The input must not contain more than 250 values.



Was this section helpful?


Was this section helpful?