Skip to main content
mutation

Sets cart metafield values. Cart metafield values will be set regardless if they were previously created or not.

Allows a maximum of 25 cart metafields to be set at a time.

Cart metafields will be copied to order metafields at order creation time if there is a matching order metafield definition with the cart to order copyable capability enabled.


Note

This mutation won't trigger Shopify Functions. The changes won't be available to Shopify Functions until the buyer goes to checkout or performs another cart interaction that triggers the functions.


•[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?

Anchor to CartMetafieldsSetPayload returnsCartMetafieldsSetPayload returns

•[Metafield!]

The list of cart metafields that were set.

•[MetafieldsSetUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?