DiscountsAutomaticBasic
Lists basic automatic discounts (for example, percentage or amount off).
Table-Specific Information
Select
The 本製品 uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The 本製品 processes other filters client-side within the 本製品.
- Title supports the '=, !=' comparison operators.
- DiscountClass supports the '=, !=' comparison operators.
- EndsAt supports the '=, !=, <, >, >=, <=' comparison operators.
- StartsAt supports the '=, !=, <, >, >=, <=' comparison operators.
- CreatedAt supports the '=, <, >, >=, <=' comparison operators.
- UpdatedAt supports the '=, <, >, >=, <=' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM DiscountsAutomaticBasic WHERE Title = 'Val1'
SELECT * FROM DiscountsAutomaticBasic WHERE DiscountClass = 'Val1'
SELECT * FROM DiscountsAutomaticBasic WHERE EndsAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticBasic WHERE StartsAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticBasic WHERE CreatedAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticBasic WHERE UpdatedAt = '2023-01-01 11:10:00'
Insert
The following columns can be used to create a new record:
Title, EndsAt, StartsAt, CombinesWithOrderDiscounts, CombinesWithProductDiscounts, CombinesWithShippingDiscounts
The following pseudo-columns can be used to create a new record:
AppliesOnEachItem, DiscountAmount, ProductsToAdd, ProductsToRemove, MinimumQuantity, MinimumSubtotal
Update
The following columns can be updated:
Title, EndsAt, StartsAt, CombinesWithOrderDiscounts, CombinesWithProductDiscounts, CombinesWithShippingDiscounts
The following pseudo-columns can be used to update a record:
AppliesOnEachItem, DiscountAmount, ProductsToAdd, ProductsToRemove
Delete
You can delete entries by specifying the following column:
Id
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The globally unique identifier of the automatic discount. | |
| Title | String | False |
The display title of the discount. | |
| Status | String | True |
The current status of the discount, such as active or expired. | |
| Summary | String | True |
A detailed summary of the discount and how it is applied. | |
| DiscountClass | String | True |
The classification of the discount, used for determining compatibility with other discounts. | |
| EndsAt | Datetime | False |
The date and time when the discount ends. Returns null for open-ended discounts. | |
| ShortSummary | String | True |
A short summary of the automatic basic discount (for example, '10% off all orders' or '$20 off orders over $100, applied automatically at checkout'). | |
| StartsAt | Datetime | False |
The date and time when the discount becomes active. | |
| AsyncUsageCount | Int | True |
The number of times the discount has been used. This value is updated asynchronously and might differ from the actual usage count. | |
| CreatedAt | Datetime | True |
The date and time when the discount record was created. | |
| UpdatedAt | Datetime | True |
The date and time when the discount was updated. | |
| CombinesWithOrderDiscounts | Bool | False |
Indicates whether the discount can be combined with order-level discounts. | |
| CombinesWithProductDiscounts | Bool | False |
Indicates whether the discount can be combined with product-level discounts. | |
| CombinesWithShippingDiscounts | Bool | False |
Indicates whether the discount can be combined with shipping-level discounts. | |
| DiscountMinimumQuantityGreaterThanOrEqualToQuantity | String | True |
The minimum number of items required for the discount to apply. |
Pseudo-Columns
疑似カラムは、明示的にリストされているタイプのステートメントでのみ使用できるフィールドです。これらは標準的なカラムではなく、特定の操作のための追加機能を提供するものです。
| Name | Type | Description |
| AppliesOnEachItem | Bool |
Indicates how the discount is applied. If true, it applies to each entitled item individually. If false, the discount amount is split across all entitled items. |
| DiscountAmount | Decimal |
The value of the discount, expressed as a decimal money amount. |
| ProductsToAdd | String |
A comma-separated list of product Ids to include in the discount. |
| ProductsToRemove | String |
A comma-separated list of product Ids to exclude from the discount. |
| MinimumQuantity | String |
The minimum number of items required for the discount to apply. |
| MinimumSubtotal | String |
The minimum subtotal required for the discount to apply. |