ProductOptions
Lists product options (Size or Color). Limited by Shop.resourceLimits.maxProductOptions.
Table-Specific Information
Select
The 本製品 uses the Shopify API to process WHERE clause conditions built with the following column and operators. The 本製品 processes other filters client-side within the 本製品.
- ProductId supports the '=, IN' comparison operators.
For example, the following query is processed server-side:
SELECT * FROM ProductOptions WHERE ProductId = 'Val1'
Insert
The following columns can be used to create a new record:
ProductId, Name, Position, OptionValues (references ProductOptionValues)
The following pseudo-columns can be used to create a new record:
LinkedMetafieldKey, LinkedMetafieldNamespace, LinkedMetafieldValues, CreateVariantStrategy
ProductOptionValues Temporary Table Columns
| Column Name | Type | Description |
| ProductId | String | A globally-unique ID. |
| ProductOptionId | String | A globally-unique ID. |
| Name | String | Value associated with an option. |
| LinkedMetafieldValue | String | Metafield value associated with an option. |
| VariantStrategy | String | The strategy defines which behavior is observed regarding variants. The strategy 'LEAVE_AS_IS' is used by default - variants are not created nor deleted. If set to 'MANAGE', variants are created and deleted according to the option values to add and to delete. |
Update
The following columns can be updated:
ProductId, Name, Position
The following pseudo-columns can be used to update a record:
LinkedMetafieldKey, LinkedMetafieldNamespace
Delete
You can delete entries by specifying the following columns:
Id, ProductId
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
A globally unique Id of the product option. | |
| ProductId | String | False |
Products.Id |
A globally unique Id of the associated product. |
| Name | String | False |
The name of the product option. | |
| Position | Int | False |
The position of the product option. | |
| Values | String | True |
The values corresponding to the product option name. | |
| OptionValues | String | True |
All option value objects associated with the product option, including values not assigned to any variants. |
Pseudo-Columns
疑似カラムは、明示的にリストされているタイプのステートメントでのみ使用できるフィールドです。これらは標準的なカラムではなく、特定の操作のための追加機能を提供するものです。
| Name | Type | Description |
| LinkedMetafieldKey | String |
The key of the metafield linked to this option. |
| LinkedMetafieldNamespace | String |
The namespace of the metafield linked to this option. |
| LinkedMetafieldValues | String |
A comma-separated list of values associated with the option. |
| CreateVariantStrategy | String |
Defines how variants are created when new options are added. LEAVE_AS_IS: No new variants are created. Existing variants are updated with the first option value. CREATE: New variants are generated for every combination of existing variant option values and new option values. 使用できる値は次のとおりです。CREATE, LEAVE_AS_IS |
| DeleteVariantStrategy | String |
Defines how variants are handled when options are deleted. DEFAULT: The option might only have one corresponding value. NON_DESTRUCTIVE: The option can have multiple values and deletion only succeeds if no variants are removed. POSITION: The option can have multiple values. Duplicates are resolved by deleting remaining variants in descending position order. 使用できる値は次のとおりです。DEFAULT, NON_DESTRUCTIVE, POSITION |