DiscountsAutomaticApp
Lists automatic discounts defined and managed by apps.
Table-Specific Information
Select
The provider uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The provider processes other filters client-side within the provider.
- Title supports the '=, !=' comparison operators.
- Status 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.
- AppDiscountTypeTitle supports the '=, !=' comparison operators.
- AppDiscountTypeDiscountClass supports the '=, !=' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM DiscountsAutomaticApp WHERE Title = 'Val1'
SELECT * FROM DiscountsAutomaticApp WHERE Status = 'Val1'
SELECT * FROM DiscountsAutomaticApp WHERE DiscountClass = 'Val1'
SELECT * FROM DiscountsAutomaticApp WHERE EndsAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticApp WHERE StartsAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticApp WHERE CreatedAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticApp WHERE UpdatedAt = '2023-01-01 11:10:00'
SELECT * FROM DiscountsAutomaticApp WHERE AppDiscountTypeTitle = 'Val1'
SELECT * FROM DiscountsAutomaticApp WHERE AppDiscountTypeDiscountClass = 'Val1'
Insert
The following columns can be used to create a new record:
Title, AppliesOnSubscription, RecurringCycleLimit, EndsAt, StartsAt, AppDiscountTypeFunctionId, CombinesWithOrderDiscounts, CombinesWithProductDiscounts, CombinesWithShippingDiscounts
The following pseudo-columns can be used to create a new record:
AddAllCustomers, CustomersToAdd, CustomersToRemove, CustomerSegmentsToAdd, CustomerSegmentsToRemove
Update
The following columns can be updated:
Title, AppliesOnSubscription, RecurringCycleLimit, EndsAt, StartsAt, AppDiscountTypeFunctionId, CombinesWithOrderDiscounts, CombinesWithProductDiscounts, CombinesWithShippingDiscounts
The following pseudo-columns can be used to update a record:
AddAllCustomers, CustomersToAdd, CustomersToRemove, CustomerSegmentsToAdd, CustomerSegmentsToRemove
Delete
You can delete entries by specifying the following column:
Id
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | False |
The globally unique identifier of the automatic app discount. | |
| DiscountId | String | True |
The globally unique identifier of the discount associated with this app discount. | |
| Title | String | False |
The display title of the discount. | |
| Status | String | True |
The current status of the discount, such as active or expired. | |
| DiscountClass | String | True |
The classification of the discount, used for determining compatibility with other discounts. | |
| AppliesOnSubscription | Bool | False |
Indicates whether the discount applies to subscription items. Subscriptions allow customers to purchase products on a recurring basis. | |
| RecurringCycleLimit | Int | False |
The maximum number of billing cycles during which the discount can be applied for subscriptions. For example, a value of 3 applies the discount to the first three billing cycles, while 0 applies it indefinitely. | |
| EndsAt | Datetime | False |
The date and time when the discount ends. Returns null for open-ended discounts. | |
| 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 record was last updated. | |
| AppDiscountTypeFunctionId | String | False |
The globally unique identifier of the function that provides the app discount type. | |
| AppDiscountTypeTitle | String | True |
The display title of the app discount type. | |
| AppDiscountTypeDescription | String | True |
The description of the app discount type. | |
| AppDiscountTypeAppKey | String | True |
The client identifier of the app that provides the app discount type. | |
| AppDiscountTypeDiscountClass | String | True |
The classification of the app discount type, used for combining logic. | |
| AppDiscountTypeTargetType | String | True |
The target type of the app discount type. Possible values include 'SHIPPING_LINE' and 'LINE_ITEM'. | |
| 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. | |
| ErrorHistoryFirstOccurredAt | Datetime | True |
The date and time when the first error related to this discount occurred. | |
| ErrorHistoryErrorsFirstOccurredAt | Datetime | True |
The date and time when the first error entry was recorded in the error history. | |
| ErrorHistoryHasSharedRecentErrors | Bool | True |
Indicates whether the merchant has shared recent errors with the app developer. | |
| ErrorHistoryHasBeenSharedSinceLastError | Bool | True |
Indicates whether the merchant has shared errors with the app developer since the most recent error occurred. |
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 |
| AddAllCustomers | String |
Whether all customers can use this discount. |
| CustomersToAdd | String |
A simple, comma-separated list of customers IDs to add. |
| CustomersToRemove | String |
A simple, comma-separated list of customers IDs to remove. |
| CustomerSegmentsToAdd | String |
A simple, comma-separated list of customers IDs to add. |
| CustomerSegmentsToRemove | String |
A simple, comma-separated list of customers IDs to remove. |