MetafieldDefinitions
Lists metafield definitions, including validation and presentation details.
Table-Specific Information
Select
The connector uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The connector processes other filters client-side within the connector.
- Id supports the '=, IN' comparison operators.
- Namespace supports the '=' comparison operator.
- Key supports the '=' comparison operator.
- OwnerType supports the '=, IN' comparison operators.
- PinnedStatus supports the '=, IN' comparison operators.
- ConstraintStatus supports the '=, IN' comparison operators.
- ConstraintSubtypeKey supports the '=, IN' comparison operators.
- ConstraintSubtypeValue supports the '=, IN' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM MetafieldDefinitions WHERE Id = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE Namespace = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE Key = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE OwnerType = 'API_PERMISSION'
SELECT * FROM MetafieldDefinitions WHERE PinnedStatus = 'ANY'
SELECT * FROM MetafieldDefinitions WHERE ConstraintStatus = 'CONSTRAINED_AND_UNCONSTRAINED'
SELECT * FROM MetafieldDefinitions WHERE ConstraintSubtypeKey = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE ConstraintSubtypeValue = 'Val1'
Insert
The following columns can be used to create a new record:
Namespace, Key, Name, Description, OwnerType, Validations, AccessAdmin, AccessCustomerAccount, AccessStorefront, CapabilitiesAdminFilterableEnabled, CapabilitiesSmartCollectionConditionEnabled, TypeName
The following pseudo-column can be used to create a new record:
Pin
Update
The following columns can be updated:
Namespace, Key, Name, Description, OwnerType, Validations, AccessAdmin, AccessCustomerAccount, AccessStorefront, CapabilitiesAdminFilterableEnabled, CapabilitiesSmartCollectionConditionEnabled
The following pseudo-column can be used to update a record:
Pin
Delete
You can delete entries by specifying the following column:
Id
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
A globally unique Id for the metafield definition. | |
| Namespace | String | False |
The namespace, or container, that groups related metafields for this definition. | |
| Key | String | False |
The unique identifier for the metafield definition within its namespace. | |
| Name | String | False |
The human-readable name of the metafield definition. | |
| PinnedPosition | Int | True |
The position of the metafield definition in the pinned list, which determines its display order in the Shopify admin. | |
| Description | String | False |
The description of the metafield definition. | |
| OwnerType | String | False |
The resource type that the metafield definition is attached to. The allowed values are API_PERMISSION, ARTICLE, BLOG, CARTTRANSFORM, COLLECTION, COMPANY, COMPANY_LOCATION, CUSTOMER, DELIVERY_CUSTOMIZATION, DISCOUNT, DRAFTORDER, FULFILLMENT_CONSTRAINT_RULE, GIFT_CARD_TRANSACTION, LOCATION, MARKET, ORDER, ORDER_ROUTING_LOCATION_RULE, PAGE, PAYMENT_CUSTOMIZATION, PRODUCT, PRODUCTVARIANT, SELLING_PLAN, SHOP, VALIDATION, MEDIA_IMAGE. | |
| UseAsCollectionCondition | Bool | True |
Indicates whether the metafield definition can be used as a collection condition. | |
| ValidationStatus | String | True |
The validation status for the metafields that belong to the metafield definition. | |
| Validations | String | False |
A list of validations for the metafields that belong to the definition. For example, a 'date' metafield definition can include a minimum date validation so that metafields created under it can only store dates after that date. | |
| AccessAdmin | String | False |
The default admin access setting for metafields under this definition. | |
| AccessCustomerAccount | String | False |
The customer account access setting for metafields under this definition. | |
| AccessStorefront | String | False |
The storefront access setting for metafields under this definition. | |
| CapabilitiesAdminFilterableEligible | Bool | True |
Indicates whether the definition is eligible for admin filtering. | |
| CapabilitiesAdminFilterableEnabled | Bool | False |
Indicates whether admin filtering is enabled for the definition. | |
| CapabilitiesAdminFilterableStatus | String | True |
The filter status of the metafield definition for admin use. | |
| CapabilitiesSmartCollectionConditionEligible | Bool | True |
Indicates whether the definition is eligible for use in smart collection conditions. | |
| CapabilitiesSmartCollectionConditionEnabled | Bool | False |
Indicates whether smart collection conditions are enabled for the definition. | |
| ConstraintsKey | String | True |
The category of resource subtypes that the definition applies to. | |
| MetafieldsCount | Int | True |
The number of metafields associated with the definition. | |
| StandardTemplateId | String | True |
A globally unique Id for the standard template associated with the definition. | |
| TypeName | String | True |
The name of the type for the metafield definition. | |
| PinnedStatus | String | True |
Filters metafield definitions by pinned status. The allowed values are ANY, PINNED, UNPINNED. | |
| ConstraintStatus | String | True |
Filters metafield definitions by constraint status. The allowed values are CONSTRAINED_AND_UNCONSTRAINED, CONSTRAINED_ONLY, UNCONSTRAINED_ONLY. | |
| ConstraintSubtypeKey | String | True |
Filters metafield definitions by the category of resource subtype they apply to. | |
| ConstraintSubtypeValue | String | True |
Filters metafield definitions by the specific subtype value within the identified category. |
Pseudo-Columns
Pseudo-columns are fields that can only be used in the types of statements under which they are explicitly listed. They are not standard columns but instead provide additional functionality for specific operations.
| Name | Type | Description |
| Pin | Bool |
Indicates whether to pin the metafield definition. |
| DeleteAllAssociatedMetafields | Bool |
Indicates whether to delete all metafields associated with the definition. |