---
title: >-
  Metafield Definition Capability Framework and Deprecation of
  use_as_collection_condition - Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/metafield-definition-capability-framework-and-deprecation-of-use_as_collection_condition
  md: >-
    https://shopify.dev/changelog/metafield-definition-capability-framework-and-deprecation-of-use_as_collection_condition.md
metadata:
  effectiveApiVersion: 2024-10
  affectedApi:
    - displayName: Admin GraphQL API
      handle: admin-graphql
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Deprecation Announcement
    handle: deprecation
  indicatesActionRequired: true
  createdAt: '2024-09-06T15:54:36-04:00'
  postedAt: '2024-09-20T15:35:00-04:00'
  updatedAt: '2024-10-31T11:14:02-04:00'
  effectiveAt: '2024-09-20T15:35:00-04:00'
---

September 20, 2024

Tags:

* Action Required
* Admin GraphQL API
* 2024-10

# Metafield Definition Capability Framework and Deprecation of `use_as_collection_condition`

As of API version 2024-10, we're introducing the Metafield Definition Capability Framework and deprecating the `use_as_collection_condition` field on the Metafield Definition object. The new `smart_collection_condition` capability will replace the deprecated field, providing a more flexible and extensible way to manage metafield behaviors in smart collections.

## What's changing?

* The `use_as_collection_condition` field on Metafield Definitions is being deprecated.
* A new `smart_collection_condition` capability is being introduced as part of the Metafield Definition Capability Framework.

## Why it matters

The new Capability Framework offers several benefits:

1. **Improved flexibility**: Capabilities can be easily added, removed, or modified without changing the core Metafield Definition structure.
2. **Better extensibility**: New capabilities can be introduced in the future without affecting existing implementations.
3. **Clearer semantics**: Capabilities provide a more explicit way to define metafield behaviors.

## How to update

To prepare for this change, update your API calls and app logic as follows:

1. Instead of setting `use_as_collection_condition: true`, use:

   ```graphql
   capabilities: {
     smartCollectionCondition: {
       enabled: true
     }
   }
   ```

2. When querying metafield definitions, check the `smart_collection_condition` capability instead of the `use_as_collection_condition` field:

   ```graphql
   query {
     metafieldDefinition(id: "gid://shopify/MetafieldDefinition/1234") {
       capabilities {
         smartCollectionCondition {
           enabled
         }
       }
     }
   }
   ```

## Timeline

* **API version 2024-10**: The new capability is available, and `use_as_collection_condition` is deprecated but still functional.
* **Future version**: The `use_as_collection_condition` field will be removed entirely.

We recommend updating your integrations to use the new capability as soon as possible to ensure a smooth transition.

Learn more about metafield capabilities at [Shopify.dev](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities) Learn more about the Metafield Definition Capability Framework at [Shopify.dev](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition).
