ProductOptions
Returns a list of product options. The limit is specified 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
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 identifier. | |
| ProductId | String | False |
Products.Id |
A globally-unique identifier. |
| Name | String | False |
The product option's name. | |
| Position | Int | False |
The product option's position. | |
| Values | String | True |
The corresponding value to the product option name. | |
| OptionValues | String | True |
Similar to values, option_values returns all the corresponding option value objects to the product option, including values not assigned to any variants. |
Pseudo-Columns
疑似カラムは、明示的にリストされているタイプのステートメントでのみ使用できるフィールドです。これらは標準的なカラムではなく、特定の操作のための追加機能を提供するものです。
| Name | Type | Description |
| LinkedMetafieldKey | String |
The key of the metafield this option is linked to. |
| LinkedMetafieldNamespace | String |
The namespace of the metafield this option is linked to. |
| LinkedMetafieldValues | String |
Comma-separated list of values associated with the option. |
| DeleteVariantStrategy | String |
The strategy defines which behavior is observed, such as how to handle a situation where deleting an option would result in duplicate variants. If set to 'DEFAULT', the specified Option may only have one corresponding value. If set to 'NON_DESTRUCTIVE', an Option with multiple values can be deleted, but the operation only succeeds if no product variants get deleted. If set to 'POSITION', an Option with multiple values can be deleted. Remaining variants will be deleted, highest position first, in the event of duplicates being detected. 使用できる値は次のとおりです。DEFAULT, NON_DESTRUCTIVE, POSITION |