--- title: Metafield - Customer API description: >- The custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types. api_version: 2026-01 api_name: customer type: object api_type: graphql source_url: html: 'https://shopify.dev/docs/api/customer/latest/objects/Metafield' md: 'https://shopify.dev/docs/api/customer/latest/objects/Metafield.md' --- # Metafield object The custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types. ## Fields * compareDigest * createdAt * id * jsonValue * key * namespace * reference * references * type * updatedAt * value * description: deprecated *** ## Map ### Fields with this object * [Company.metafield](https://shopify.dev/docs/api/customer/latest/objects/Company#field-Company.fields.metafield) * [Company.metafields](https://shopify.dev/docs/api/customer/latest/objects/Company#field-Company.fields.metafields) * [CompanyLocation.metafield](https://shopify.dev/docs/api/customer/latest/objects/CompanyLocation#field-CompanyLocation.fields.metafield) * [CompanyLocation.metafields](https://shopify.dev/docs/api/customer/latest/objects/CompanyLocation#field-CompanyLocation.fields.metafields) * [Customer.metafield](https://shopify.dev/docs/api/customer/latest/objects/Customer#field-Customer.fields.metafield) * [Customer.metafields](https://shopify.dev/docs/api/customer/latest/objects/Customer#field-Customer.fields.metafields) * [HasMetafields.metafield](https://shopify.dev/docs/api/customer/latest/interfaces/HasMetafields#fields-metafield) * [HasMetafields.metafields](https://shopify.dev/docs/api/customer/latest/interfaces/HasMetafields#fields-metafields) * [Order.metafield](https://shopify.dev/docs/api/customer/latest/objects/Order#field-Order.fields.metafield) * [Order.metafields](https://shopify.dev/docs/api/customer/latest/objects/Order#field-Order.fields.metafields) * [Shop.metafield](https://shopify.dev/docs/api/customer/latest/objects/Shop#field-Shop.fields.metafield) * [Shop.metafields](https://shopify.dev/docs/api/customer/latest/objects/Shop#field-Shop.fields.metafields) *** ## Mutations * metafieldsSet *** ## Metafield Mutations ### Mutated by * [metafields​Set](https://shopify.dev/docs/api/customer/latest/mutations/metafieldsSet) *** ## Interfaces * HasCompareDigest * Node *** ## Metafield Implements ### Implements * [Has​Compare​Digest](https://shopify.dev/docs/api/customer/latest/interfaces/HasCompareDigest) * [Node](https://shopify.dev/docs/api/customer/latest/interfaces/Node)