<div class="doc-version" data-version="unstable"> <p><a href="https://shopify.dev/apps/metafields">Metafields</a> enable you to attach additional information to a Shopify resource, such as a <a href="https://shopify.dev/api/admin-graphql/latest/objects/product">Product</a> or a <a href="https://shopify.dev/api/admin-graphql/latest/objects/collection">Collection</a>. For more information about the Shopify resources that you can attach metafields to, refer to <a href="https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields">HasMetafields</a>.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-unstable"> Fields </a> </li> <li> <a href="#types-that-return-metafield-unstable"> Types that return Metafield </a> </li> </ul> </div> <h2 id="fields-unstable"> Fields </h2> <ul class="fields"> <li> <div class="field" id="jsonvalue-unstable"> <div class="field-name"> jsonValue (<a href="/api/functions/reference/cart-transform/graphql/scalar#json-unstable"><code>JSON!</code></a>) </div> <div> <p>The data stored in the metafield in JSON format.</p> </div> </div> </li> <li> <div class="field" id="type-unstable"> <div class="field-name"> type (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-unstable"><code>String!</code></a>) </div> <div> <p>The type of data that the metafield stores in the <code>value</code> field. Refer to the list of <a href="https://shopify.dev/apps/metafields/types">supported types</a>.</p> </div> </div> </li> <li> <div class="field" id="value-unstable"> <div class="field-name"> value (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-unstable"><code>String!</code></a>) </div> <div> <p>The data stored in the metafield. Always stored as a string, regardless of the metafield's type.</p> </div> </div> </li> </ul> <h2 id="types-that-return-metafield-unstable"> Types that return Metafield </h2> <ul> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/carttransform#metafield-unstable"> <code>CartTransform.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/company#metafield-unstable"> <code>Company.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/companylocation#metafield-unstable"> <code>CompanyLocation.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/customer#metafield-unstable"> <code>Customer.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/gateconfiguration#metafield-unstable"> <code>GateConfiguration.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/market#metafield-unstable"> <code>Market.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/product#metafield-unstable"> <code>Product.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/productvariant#metafield-unstable"> <code>ProductVariant.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/sellingplan#metafield-unstable"> <code>SellingPlan.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/shop#metafield-unstable"> <code>Shop.metafield</code> </a> </li> </ul> </div><div class="doc-version doc-version--rc" data-version="2025-04"> <p><a href="https://shopify.dev/apps/metafields">Metafields</a> enable you to attach additional information to a Shopify resource, such as a <a href="https://shopify.dev/api/admin-graphql/latest/objects/product">Product</a> or a <a href="https://shopify.dev/api/admin-graphql/latest/objects/collection">Collection</a>. For more information about the Shopify resources that you can attach metafields to, refer to <a href="https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields">HasMetafields</a>.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-2025-04"> Fields </a> </li> <li> <a href="#types-that-return-metafield-2025-04"> Types that return Metafield </a> </li> </ul> </div> <h2 id="fields-2025-04"> Fields </h2> <ul class="fields"> <li> <div class="field" id="jsonvalue-2025-04"> <div class="field-name"> jsonValue (<a href="/api/functions/reference/cart-transform/graphql/scalar#json-2025-04"><code>JSON!</code></a>) </div> <div> <p>The data stored in the metafield in JSON format.</p> </div> </div> </li> <li> <div class="field" id="type-2025-04"> <div class="field-name"> type (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2025-04"><code>String!</code></a>) </div> <div> <p>The type of data that the metafield stores in the <code>value</code> field. Refer to the list of <a href="https://shopify.dev/apps/metafields/types">supported types</a>.</p> </div> </div> </li> <li> <div class="field" id="value-2025-04"> <div class="field-name"> value (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2025-04"><code>String!</code></a>) </div> <div> <p>The data stored in the metafield. Always stored as a string, regardless of the metafield's type.</p> </div> </div> </li> </ul> <h2 id="types-that-return-metafield-2025-04"> Types that return Metafield </h2> <ul> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/carttransform#metafield-2025-04"> <code>CartTransform.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/company#metafield-2025-04"> <code>Company.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/companylocation#metafield-2025-04"> <code>CompanyLocation.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/customer#metafield-2025-04"> <code>Customer.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/market#metafield-2025-04"> <code>Market.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/product#metafield-2025-04"> <code>Product.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/productvariant#metafield-2025-04"> <code>ProductVariant.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/sellingplan#metafield-2025-04"> <code>SellingPlan.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/shop#metafield-2025-04"> <code>Shop.metafield</code> </a> </li> </ul> </div><div class="doc-version doc-version--latest selected" data-version="2025-01"> <p><a href="https://shopify.dev/apps/metafields">Metafields</a> enable you to attach additional information to a Shopify resource, such as a <a href="https://shopify.dev/api/admin-graphql/latest/objects/product">Product</a> or a <a href="https://shopify.dev/api/admin-graphql/latest/objects/collection">Collection</a>. For more information about the Shopify resources that you can attach metafields to, refer to <a href="https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields">HasMetafields</a>.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-2025-01"> Fields </a> </li> <li> <a href="#types-that-return-metafield-2025-01"> Types that return Metafield </a> </li> </ul> </div> <h2 id="fields-2025-01"> Fields </h2> <ul class="fields"> <li> <div class="field" id="jsonvalue-2025-01"> <div class="field-name"> jsonValue (<a href="/api/functions/reference/cart-transform/graphql/scalar#json-2025-01"><code>JSON!</code></a>) </div> <div> <p>The data stored in the metafield in JSON format.</p> </div> </div> </li> <li> <div class="field" id="type-2025-01"> <div class="field-name"> type (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2025-01"><code>String!</code></a>) </div> <div> <p>The type of data that the metafield stores in the <code>value</code> field. Refer to the list of <a href="https://shopify.dev/apps/metafields/types">supported types</a>.</p> </div> </div> </li> <li> <div class="field" id="value-2025-01"> <div class="field-name"> value (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2025-01"><code>String!</code></a>) </div> <div> <p>The data stored in the metafield. Always stored as a string, regardless of the metafield's type.</p> </div> </div> </li> </ul> <h2 id="types-that-return-metafield-2025-01"> Types that return Metafield </h2> <ul> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/carttransform#metafield-2025-01"> <code>CartTransform.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/company#metafield-2025-01"> <code>Company.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/companylocation#metafield-2025-01"> <code>CompanyLocation.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/customer#metafield-2025-01"> <code>Customer.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/market#metafield-2025-01"> <code>Market.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/product#metafield-2025-01"> <code>Product.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/productvariant#metafield-2025-01"> <code>ProductVariant.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/sellingplan#metafield-2025-01"> <code>SellingPlan.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/shop#metafield-2025-01"> <code>Shop.metafield</code> </a> </li> </ul> </div><div class="doc-version" data-version="2024-10"> <p><a href="https://shopify.dev/apps/metafields">Metafields</a> enable you to attach additional information to a Shopify resource, such as a <a href="https://shopify.dev/api/admin-graphql/latest/objects/product">Product</a> or a <a href="https://shopify.dev/api/admin-graphql/latest/objects/collection">Collection</a>. For more information about the Shopify resources that you can attach metafields to, refer to <a href="https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields">HasMetafields</a>.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-2024-10"> Fields </a> </li> <li> <a href="#types-that-return-metafield-2024-10"> Types that return Metafield </a> </li> </ul> </div> <h2 id="fields-2024-10"> Fields </h2> <ul class="fields"> <li> <div class="field" id="jsonvalue-2024-10"> <div class="field-name"> jsonValue (<a href="/api/functions/reference/cart-transform/graphql/scalar#json-2024-10"><code>JSON!</code></a>) </div> <div> <p>The data stored in the metafield in JSON format.</p> </div> </div> </li> <li> <div class="field" id="type-2024-10"> <div class="field-name"> type (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2024-10"><code>String!</code></a>) </div> <div> <p>The type of data that the metafield stores in the <code>value</code> field. Refer to the list of <a href="https://shopify.dev/apps/metafields/types">supported types</a>.</p> </div> </div> </li> <li> <div class="field" id="value-2024-10"> <div class="field-name"> value (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2024-10"><code>String!</code></a>) </div> <div> <p>The data stored in the metafield. Always stored as a string, regardless of the metafield's type.</p> </div> </div> </li> </ul> <h2 id="types-that-return-metafield-2024-10"> Types that return Metafield </h2> <ul> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/carttransform#metafield-2024-10"> <code>CartTransform.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/company#metafield-2024-10"> <code>Company.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/companylocation#metafield-2024-10"> <code>CompanyLocation.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/customer#metafield-2024-10"> <code>Customer.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/market#metafield-2024-10"> <code>Market.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/product#metafield-2024-10"> <code>Product.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/productvariant#metafield-2024-10"> <code>ProductVariant.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/sellingplan#metafield-2024-10"> <code>SellingPlan.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/shop#metafield-2024-10"> <code>Shop.metafield</code> </a> </li> </ul> </div><div class="doc-version" data-version="2024-07"> <p><a href="https://shopify.dev/apps/metafields">Metafields</a> enable you to attach additional information to a Shopify resource, such as a <a href="https://shopify.dev/api/admin-graphql/latest/objects/product">Product</a> or a <a href="https://shopify.dev/api/admin-graphql/latest/objects/collection">Collection</a>. For more information about the Shopify resources that you can attach metafields to, refer to <a href="https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields">HasMetafields</a>.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-2024-07"> Fields </a> </li> <li> <a href="#types-that-return-metafield-2024-07"> Types that return Metafield </a> </li> </ul> </div> <h2 id="fields-2024-07"> Fields </h2> <ul class="fields"> <li> <div class="field" id="jsonvalue-2024-07"> <div class="field-name"> jsonValue (<a href="/api/functions/reference/cart-transform/graphql/scalar#json-2024-07"><code>JSON!</code></a>) </div> <div> <p>The data stored in the metafield in JSON format.</p> </div> </div> </li> <li> <div class="field" id="type-2024-07"> <div class="field-name"> type (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2024-07"><code>String!</code></a>) </div> <div> <p>The type of data that the metafield stores in the <code>value</code> field. Refer to the list of <a href="https://shopify.dev/apps/metafields/types">supported types</a>.</p> </div> </div> </li> <li> <div class="field" id="value-2024-07"> <div class="field-name"> value (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2024-07"><code>String!</code></a>) </div> <div> <p>The data stored in the metafield. Always stored as a string, regardless of the metafield's type.</p> </div> </div> </li> </ul> <h2 id="types-that-return-metafield-2024-07"> Types that return Metafield </h2> <ul> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/carttransform#metafield-2024-07"> <code>CartTransform.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/company#metafield-2024-07"> <code>Company.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/companylocation#metafield-2024-07"> <code>CompanyLocation.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/customer#metafield-2024-07"> <code>Customer.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/market#metafield-2024-07"> <code>Market.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/product#metafield-2024-07"> <code>Product.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/productvariant#metafield-2024-07"> <code>ProductVariant.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/sellingplan#metafield-2024-07"> <code>SellingPlan.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/shop#metafield-2024-07"> <code>Shop.metafield</code> </a> </li> </ul> </div><div class="doc-version" data-version="2024-04"> <p><a href="https://shopify.dev/apps/metafields">Metafields</a> enable you to attach additional information to a Shopify resource, such as a <a href="https://shopify.dev/api/admin-graphql/latest/objects/product">Product</a> or a <a href="https://shopify.dev/api/admin-graphql/latest/objects/collection">Collection</a>. For more information about the Shopify resources that you can attach metafields to, refer to <a href="https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields">HasMetafields</a>.</p> <div> <h2 id="on-this-page">On this page</h2> <ul> <li> <a href="#fields-2024-04"> Fields </a> </li> <li> <a href="#types-that-return-metafield-2024-04"> Types that return Metafield </a> </li> </ul> </div> <h2 id="fields-2024-04"> Fields </h2> <ul class="fields"> <li> <div class="field" id="type-2024-04"> <div class="field-name"> type (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2024-04"><code>String!</code></a>) </div> <div> <p>The type of data that the metafield stores in the <code>value</code> field. Refer to the list of <a href="https://shopify.dev/apps/metafields/types">supported types</a>.</p> </div> </div> </li> <li> <div class="field" id="value-2024-04"> <div class="field-name"> value (<a href="/api/functions/reference/cart-transform/graphql/scalar#string-2024-04"><code>String!</code></a>) </div> <div> <p>The data stored in the metafield. Always stored as a string, regardless of the metafield's type.</p> </div> </div> </li> </ul> <h2 id="types-that-return-metafield-2024-04"> Types that return Metafield </h2> <ul> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/carttransform#metafield-2024-04"> <code>CartTransform.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/company#metafield-2024-04"> <code>Company.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/companylocation#metafield-2024-04"> <code>CompanyLocation.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/customer#metafield-2024-04"> <code>Customer.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/market#metafield-2024-04"> <code>Market.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/product#metafield-2024-04"> <code>Product.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/productvariant#metafield-2024-04"> <code>ProductVariant.metafield</code> </a> </li> <li> <a href="/api/functions/reference/cart-transform/graphql/common-objects/shop#metafield-2024-04"> <code>Shop.metafield</code> </a> </li> </ul> </div>